add_system_section

View as MarkdownOpen in Claude

Add a POM section to the system prompt. Cannot be combined with set_system_prompt().

Parameters

title
strRequired

Section heading.

body
strRequired

Section body text.

Returns

Context — Self for method chaining.

Example

1from signalwire import AgentBase
2
3agent = AgentBase(name="my-agent", route="/agent")
4
5contexts = agent.define_contexts()
6contexts.add_context("default").add_step("menu").set_text("Ask what the caller needs.")
7
8billing = contexts.add_context("billing")
9billing.add_system_section("Role", "You are a billing specialist.")
10billing.add_system_section("Tone", "Be professional and empathetic.")
11billing.add_step("review").set_text("Review the caller's account and recent charges.")
12
13agent.serve()