set_prompt_text
set_prompt_text
Set the agent’s system prompt as a raw text string. This is the simplest way to configure what the AI knows and how it behaves.
This sets the SWML ai.prompt field. See the
SWML prompt reference for details on prompt behavior.
Cannot be mixed with POM-based prompt sections (prompt_add_section()) in the same
agent. Use one approach or the other for the main prompt. Contexts can still be used
alongside either approach.
Parameters
text
The complete system prompt text. Supports multi-line strings.
Returns
AgentBase — Returns self for method chaining.