***

title: promptAddSubsection
slug: /reference/typescript/agents/agent-base/prompt-add-subsection
description: Add a subsection to an existing prompt section.
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 subsection to an existing section.

## **Parameters**

<ParamField path="parentTitle" type="string" required={true} toc={true}>
  Title of the parent section.
</ParamField>

<ParamField path="title" type="string" required={true} toc={true}>
  Subsection heading.
</ParamField>

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

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

  <ParamField path="opts.bullets" type="string[]" toc={true}>
    Subsection bullet points.
  </ParamField>
</Indent>

## **Returns**

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

## **Example**

```typescript {7}
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();
```