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

import { AgentBase } from '@signalwire/sdk';
const agent = new AgentBase({ name: 'support', route: '/support' });
agent.promptAddSection('Capabilities', {
body: 'You can help with the following:',
});
agent.promptAddSubsection('Capabilities', 'Orders', {
body: 'Look up order status, process returns and exchanges.',
});
agent.promptAddSubsection('Capabilities', 'Billing', {
body: 'Check account balances and explain recent charges.',
});
await agent.serve();