add_section
add_section
Add a POM section to the context prompt. Cannot be used together with set_prompt().
Parameters
title
Section heading.
body
Section body text.
Returns
Context — Self for method chaining.
add_section
Add a POM section to the context prompt. Cannot be used together with set_prompt().
Section heading.
Section body text.
Context — Self for method chaining.
1 from signalwire import AgentBase 2 3 agent = AgentBase(name="my-agent", route="/agent") 4 5 contexts = agent.define_contexts() 6 ctx = contexts.add_context("default") 7 ctx.add_section("Role", "You are a billing specialist.") 8 ctx.add_section("Guidelines", "Always verify account ownership first.") 9 ctx.add_step("greet").set_text("Greet the caller and ask how you can help.") 10 11 agent.serve()