promptAddToSection

View as MarkdownOpen in Claude

Append content to an existing section.

Parameters

title
stringRequired

Title of the section to update.

opts
object

Content to add.

opts.body
string

Text to append to the section body.

opts.bullet
string

A single bullet point to add.

opts.bullets
string[]

Multiple bullet points to add.

Returns

AgentBase — Returns this for method chaining.

Example

1import { AgentBase } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'support', route: '/support' });
4agent.promptAddSection('Rules', {
5 bullets: ['Be polite.'],
6});
7agent.promptAddToSection('Rules', { bullet: 'Never lie.' });
8agent.promptAddToSection('Rules', {
9 bullets: [
10 'Keep responses concise',
11 'Ask clarifying questions when needed',
12 ],
13});
14await agent.serve();