promptAddSubsection

View as MarkdownOpen in Claude

Add a subsection to an existing section.

Parameters

parentTitle
stringRequired

Title of the parent section.

title
stringRequired

Subsection heading.

opts
object

Optional subsection content.

opts.body
string

Subsection body text.

opts.bullets
string[]

Subsection bullet points.

Returns

AgentBase — Returns this for method chaining.

Example

1import { AgentBase } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'support', route: '/support' });
4agent.promptAddSection('Capabilities', {
5 body: 'You can help with the following:',
6});
7agent.promptAddSubsection('Capabilities', 'Orders', {
8 body: 'Look up order status, process returns and exchanges.',
9});
10agent.promptAddSubsection('Capabilities', 'Billing', {
11 body: 'Check account balances and explain recent charges.',
12});
13await agent.serve();