AgentsAgentBase

prompt_add_to_section

View as MarkdownOpen in Claude

Append content to an existing section. If the section does not exist, it is created automatically.

Parameters

title
strRequired

Title of the section to update (or create).

body
Optional[str]

Text to append to the section body.

bullet
Optional[str]

A single bullet point to add.

bullets
Optional[list[str]]

Multiple bullet points to add.

Returns

AgentBase — Returns self for method chaining.

Example

1from signalwire import AgentBase
2
3agent = AgentBase(name="support", route="/support")
4agent.prompt_add_section("Rules", bullets=["Be polite"])
5agent.prompt_add_to_section("Rules", bullet="Never lie")
6agent.prompt_add_to_section("Rules", bullets=[
7 "Keep responses concise",
8 "Ask clarifying questions when needed"
9])
10agent.serve()