setPromptText
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.
Mixing raw text prompts with POM-based prompt sections (promptAddSection()) in the
same agent may produce unexpected results. 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 this for method chaining.