Add variables
Define dynamic variables on an agent and supply values at session start
Variables let one agent serve many contexts. For the syntax, types, and precedence, see Variables.
Define variables on the agent
PATCH the agent’s variable catalog. Each variable has a key, type, optional default, and optional description. The call replaces the list wholesale (up to 20 variables per agent) — send "variables": [] to clear it.
Reference them in the prompt and tools
Use {{key}} in the prompt, first message, or webhook tool config:
Inside a JSON tool body, use the {{key|json}} form so the value is safely escaped — see Variables → Interpolation.
system__* keys are reserved — they’re rejected in both the agent catalog and session overrides.