set_prompt_pom
set_prompt_pom
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()
to build POM prompts incrementally.
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.
Parameters
pom
POM structure. A list of section dictionaries is converted to a
PromptObjectModel before it is stored; an existing PromptObjectModel is
accepted as-is. Each section dictionary has keys:
title(str) — Section headingbody(str) — Section body textbullets(list[str]) — Optional bullet pointsnumbered(bool) — Whether the section is numberedsubsections(list[dict]) — Optional nested sections with the same keys
Returns
AgentBase — Returns self for method chaining.