***

title: set_prompt_pom
slug: /reference/python/agents/agent-base/set-prompt-pom
description: Set the prompt using a raw Prompt Object Model dictionary structure.
max-toc-depth: 3
---------------------

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

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

[ref-agentbase]: /docs/server-sdks/reference/python/agents/agent-base

Set the prompt directly as a POM (Prompt Object Model) dictionary structure. This is
a low-level method that accepts the POM data format directly. For most cases, use
[`prompt_add_section()`][prompt-add-section]
to build POM prompts incrementally.

<Info>
  The POM format structures prompts into titled sections with body text, bullet points,
  and nested subsections. This structure helps the AI model parse complex instructions
  more reliably than flat text.
</Info>

## **Parameters**

<ParamField path="pom" type="list[dict[str, Any]]" required={true} toc={true}>
  POM dictionary structure. Each item in the list is a section with keys:

  * `title` (str) -- Section heading
  * `body` (str) -- Section body text
  * `bullets` (list\[str]) -- Optional bullet points
  * `numbered` (bool) -- Whether the section is numbered
  * `subsections` (list\[dict]) -- Optional nested sections with the same keys
</ParamField>

## **Returns**

[`AgentBase`][ref-agentbase] -- Returns self for method chaining.

## **Example**

```python {4}
from signalwire import AgentBase

agent = AgentBase(name="support", route="/support")
agent.set_prompt_pom([
    {
        "title": "Role",
        "body": "You are a customer support agent for Acme Corp."
    },
    {
        "title": "Guidelines",
        "body": "",
        "bullets": [
            "Always greet the caller by name if available",
            "Never share internal pricing details",
            "Escalate to a human if the caller requests it"
        ]
    },
    {
        "title": "Capabilities",
        "body": "You can help with the following:",
        "subsections": [
            {"title": "Orders", "body": "Look up order status, process returns"},
            {"title": "Billing", "body": "Check balances, explain charges"}
        ]
    }
])
agent.serve()
```