pom

View as MarkdownOpen in Claude

Getter that returns the agent’s prompt as a PromptObjectModel 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() for the raw section array.

Parameters

None.

Returns

PromptObjectModel | null — A snapshot built from the agent’s current prompt sections, or null when POM mode is disabled.

Example

1import { AgentBase } from '@signalwire/sdk';
2
3const agent = new AgentBase({ name: 'support', route: '/support' });
4agent.promptAddSection('Role', { body: 'You are a support agent.' });
5
6const model = agent.pom;
7console.log(model?.toYaml());