AgentsAgentBase

prompt_add_subsection

View as MarkdownOpen in Claude

Add a subsection to an existing section. If the parent section does not exist, it is created automatically.

Parameters

parent_title
strRequired

Title of the parent section.

title
strRequired

Subsection heading.

body
str

Subsection body text.

bullets
list[str] | NoneDefaults to None

Subsection bullet points.

Returns

AgentBase — Returns self for method chaining.

Example

from signalwire import AgentBase
agent = AgentBase(name="support", route="/support")
agent.prompt_add_section("Capabilities",
body="You can help with the following:")
agent.prompt_add_subsection("Capabilities", "Orders",
body="Look up order status, process returns and exchanges.")
agent.prompt_add_subsection("Capabilities", "Billing",
body="Check account balances and explain recent charges.")
agent.serve()