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
str | NoneDefaults to None

Text to append to the section body.

bullet
str | NoneDefaults to None

A single bullet point to add.

bullets
list[str] | NoneDefaults to None

Multiple bullet points to add.

Returns

AgentBase — Returns self for method chaining.

Example

from signalwire import AgentBase
agent = AgentBase(name="support", route="/support")
agent.prompt_add_section("Rules", bullets=["Be polite"])
agent.prompt_add_to_section("Rules", bullet="Never lie")
agent.prompt_add_to_section("Rules", bullets=[
"Keep responses concise",
"Ask clarifying questions when needed"
])
agent.serve()