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

# setPromptPom

> Replace the agent's prompt with the supplied POM sections.

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

[prompt-add-section]: /docs/server-sdks/reference/typescript/agents/agent-base/prompt-add-section

[get-prompt-pom]: /docs/server-sdks/reference/typescript/agents/agent-base/get-prompt-pom

Replace the agent's prompt with the supplied POM (Prompt Object Model) array.
Existing sections are cleared before the new ones are applied, so this is the
batch equivalent of calling [`promptAddSection()`][prompt-add-section] for
every entry. The shape must match what [`getPromptPom()`][get-prompt-pom]
returns.

<Warning>
  Requires the agent to be constructed with `usePom: true`. Throws `Error("usePom must be true to use setPromptPom")` otherwise.
</Warning>

## **Parameters**

<ParamField path="pom" type={"Record<string, unknown>[]"} required={true} toc={true}>
  Ordered array of POM section objects. Each section supports `title` (string),
  `body` (string), `bullets` (string\[]), `numbered` (boolean),
  `numberedBullets` (boolean), and `subsections` (array of
  `{ title, body?, bullets? }`).
</ParamField>

## **Returns**

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

## **Example**

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

const agent = new AgentBase({ name: 'support', route: '/support', usePom: true });

agent.setPromptPom([
  { title: 'Role', body: 'You are a support agent for Acme Corp.' },
  {
    title: 'Guidelines',
    bullets: ['Greet by name', 'Never share internal pricing'],
  },
]);
await agent.serve();
```