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

# getPromptPom

> Return the current prompt as a POM (Prompt Object Model) array.

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

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

Return the current prompt as a POM (Prompt Object Model) array — the structured,
section-based representation built via [`setPromptPom()`][set-prompt-pom] or
[`promptAddSection()`][prompt-add-section]. Returns `null` when the agent is
configured with a raw text prompt (`usePom: false`) or when no sections have been
added.

## **Parameters**

None.

## **Returns**

`Record<string, unknown>[] | null` -- Array of POM section data objects, or
`null` if not in POM mode or POM is empty.

## **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 sections = agent.getPromptPom();
console.log(sections);
```