> This page is for Server SDKs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# 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`).

> **Note**
>
> 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());
```