Prompts & POM
The Prompt Object Model (POM) provides a structured way to build AI prompts using sections, subsections, and bullets rather than raw text.
Why POM?
Raw Text Problems:
- Everything mixed together in one string
- Hard to find and update specific instructions
- Difficult to share sections between agents
POM Benefits:
- Sections keep concerns separated
- Bullets make lists scannable
- Subsections add depth without clutter
- Renders to clean, formatted markdown
POM Structure

Adding Sections
Basic Section with Body
Section with Bullets
Section with Numbered Bullets
Subsections
Add nested structure within sections:
Declarative Prompts (PROMPT_SECTIONS)
Define prompts declaratively as a class attribute:
POM Builder Direct Access
For advanced use, access the POM builder directly:
Post-Call Prompts
Post-prompts run after a call ends, allowing the AI to generate summaries, extract data, or create structured output from the conversation.
When Post-Prompts Run
Post-prompts execute:
- After the caller hangs up
- After a transfer completes
- After an inactivity timeout
- Before any post-call webhooks fire
The AI has access to the full conversation history when generating the post-prompt response.
set_post_prompt() vs set_post_prompt_data()
Use set_post_prompt() for simple text instructions:
Use set_post_prompt_data() for full control over generation parameters:
Post-Prompt Data Options
Common Post-Prompt Use Cases
Call summarization:
Structured data extraction:
CRM notes:
Compliance logging:
Accessing Post-Prompt Output
The post-prompt output is sent to your configured webhooks. To receive it, configure a post-prompt webhook:
Post-Prompt Best Practices
DO:
- Use low temperature (0.1-0.3) for structured extraction
- Keep instructions clear and specific
- Test with various conversation types
- Use JSON format for machine-readable output
DON’T:
- Expect post-prompt to modify call behavior (call already ended)
- Use high temperature for data extraction
- Request very long outputs (increases latency)
- Assume all fields will always be populated
Voice-Optimized Prompts
Write prompts optimized for voice conversations:
Prompt Best Practices
1. Lead with Role Definition
2. Separate Concerns
3. Use Bullets for Lists
4. Be Specific About Restrictions
Generated Prompt Output
POM converts your structure to formatted text: