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

# pom

> Get the agent's prompt as a PromptObjectModel snapshot.

[ref-pom]: /docs/server-sdks/reference/typescript/agents/pom-object-model

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

Getter that returns the agent's prompt as a [`PromptObjectModel`][ref-pom]
instance, built from the agent's current POM state. Returns `null` when POM mode
is off (`usePom: false`).

The returned model is a **snapshot**. Mutating it does not feed back into the
agent. To change the agent's prompt, use the prompt builder methods (such as
`promptAddSection()`) or [`getPromptPom()`][get-prompt-pom] for the raw section
array.

## **Parameters**

None.

## **Returns**

[`PromptObjectModel`][ref-pom]` | null` -- A snapshot built from the agent's
current prompt sections, or `null` when POM mode is disabled.

## **Example**

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

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

const model = agent.pom;
console.log(model?.toYaml());
```