> 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. # PromptManager > Manages agent prompt text, supporting both raw text and structured POM-based prompts. [pombuilder]: /docs/server-sdks/reference/typescript/agents/pom-builder `PromptManager` manages agent prompt text, supporting both raw text and structured POM-based prompts. When POM mode is active (the default), sections are rendered to Markdown via the underlying [`PomBuilder`][pombuilder]. ```typescript {3} import { PromptManager } from '@signalwire/sdk'; const pm = new PromptManager(); pm.addSection('Role', { body: 'You are a helpful support agent.' }); pm.addSection('Rules', { bullets: ['Be concise', 'Be polite'] }); console.log(pm.getPrompt()); ``` ## **Constructor** **`usePom`** `boolean` — default: true Whether to use structured POM sections. When `false`, only raw text via `setPromptText()` is supported. --- ## **Methods** #### [setPromptText](/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/set-prompt-text) Set raw prompt text, bypassing POM rendering. #### [setPostPrompt](/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/set-post-prompt) Set the post-prompt text appended after the main prompt. #### [addSection](/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/add-section) Add a POM section with body, bullets, or subsections. #### [addToSection](/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/add-to-section) Append body text or bullets to an existing POM section. #### [addSubsection](/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/add-subsection) Add a subsection under a parent POM section. #### [hasSection](/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/has-section) Check whether a POM section with the given title exists. #### [getPrompt](/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/get-prompt) Return the fully rendered prompt text. #### [getRawPrompt](/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/get-raw-prompt) Return the raw stored prompt text, unrendered. #### [getPostPrompt](/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/get-post-prompt) Return the post-prompt text. #### [getPomBuilder](/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/get-pom-builder) Return the underlying PomBuilder instance. ## **Example** ```typescript {3-6,8} import { PromptManager } from '@signalwire/sdk'; const pm = new PromptManager(); pm.addSection('Role', { body: 'You are a friendly customer support agent.' }); pm.addSection('Rules', { bullets: ['Be concise', 'Be polite', 'Never guess'] }); pm.setPostPrompt('Summarize the conversation in JSON format.'); console.log(pm.getPrompt()); // ## Role // You are a friendly customer support agent. // // ## Rules // - Be concise // - Be polite // - Never guess ``` > Manages agent prompt text, supporting both raw text and structured POM-based prompts. ## Docs - [addSection](https://signalwire.com/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/add-section.md): Add a POM section to the prompt. - [addSubsection](https://signalwire.com/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/add-subsection.md): Add a subsection under a parent POM section. - [addToSection](https://signalwire.com/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/add-to-section.md): Append body text or bullets to an existing POM section. - [getPomBuilder](https://signalwire.com/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/get-pom-builder.md): Return the underlying PomBuilder instance. - [getPostPrompt](https://signalwire.com/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/get-post-prompt.md): Return the post-prompt text. - [getPrompt](https://signalwire.com/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/get-prompt.md): Return the fully rendered prompt text. - [getRawPrompt](https://signalwire.com/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/get-raw-prompt.md): Return the raw stored prompt text, unrendered. - [hasSection](https://signalwire.com/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/has-section.md): Check whether a POM section with the given title exists. - [setPostPrompt](https://signalwire.com/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/set-post-prompt.md): Set the post-prompt text appended after the main prompt. - [setPromptText](https://signalwire.com/docs/server-sdks/reference/typescript/agents/configuration/prompt-manager/set-prompt-text.md): Set raw prompt text, bypassing POM rendering.