***

title: promptAddSection
slug: /reference/typescript/agents/agent-base/prompt-add-section
description: Add a new section to the agent's structured prompt.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[ref-agentbase]: /docs/server-sdks/reference/typescript/agents/agent-base

Add a new section to the prompt. Sections give the AI structured instructions that
are easier to follow than a single block of text. Each section has a title and
optional body text, bullet points, and subsections.

<Warning>
  POM sections cannot be mixed with `setPromptText()` in the same agent. Use one
  approach or the other.
</Warning>

## **Parameters**

<ParamField path="title" type="string" required={true} toc={true}>
  Section heading displayed to the AI.
</ParamField>

<ParamField path="opts" type="object" toc={true}>
  Optional section content.
</ParamField>

<Indent>
  <ParamField path="opts.body" type="string" toc={true}>
    Section body text.
  </ParamField>

  <ParamField path="opts.bullets" type="string[]" toc={true}>
    List of bullet point strings.
  </ParamField>

  <ParamField path="opts.numbered" type="boolean" toc={true}>
    Whether the section itself should be numbered.
  </ParamField>

  <ParamField path="opts.numberedBullets" type="boolean" toc={true}>
    Whether bullet points should be numbered instead of bulleted.
  </ParamField>

  <ParamField path="opts.subsections" type="object[]" toc={true}>
    List of subsection objects, each with `title`, optional `body`, and optional `bullets`.
  </ParamField>
</Indent>

## **Returns**

[`AgentBase`][ref-agentbase] -- Returns `this` for method chaining.

## **Example**

```typescript {4}
import { AgentBase } from '@signalwire/sdk';

const agent = new AgentBase({ name: 'support', route: '/support' });
agent.promptAddSection('Role', {
  body: 'You are a customer support agent for Acme Corp.',
});

agent.promptAddSection('Guidelines', {
  bullets: [
    'Always greet the caller by name if available',
    'Never share internal pricing details',
    'Escalate to a human if the caller asks',
  ],
});
await agent.serve();
```