POST /v1/agent/sessions request:
Dynamic variables
Write{{variable_name}} placeholders in your agent’s system prompt or first message and supply values when you create the session. Substitution happens once, when the published configuration is assembled for the session.
System prompt
[A-Za-z][A-Za-z0-9_]* (no hyphens or dots), string values are capped at 1,000 characters, and a request can carry at most 50 variables — violations reject session creation with 422:
Session records never store dynamic variable values.
Overrides
Overrides replace configuration fields wholesale for one session — for example, forcing a different language for a caller. Because they change agent behavior, each agent declares which fields callers may override; everything else is rejected.The language shorthand
Overriding the session language is common enough that the request accepts a top-level language field as shorthand for overrides.language. Both forms pass through the same allowlist gate — if language is not overridable on the agent, both are rejected.
Validation
The session record stores which overrides took effect.
Who supplies the values
Where variables and overrides come from depends on how the session is authenticated:
In
sessionToken mode the SDK’s overrides, dynamicVariables, and language options have no effect — the session already exists by the time the token reaches the browser. Attach personalization server-side instead:
Backend (sessionToken mode)
Going further
Agent configuration
The fields your placeholders and overrides act on.
Authentication
API keys, session tokens, and the two session modes.
Versions & publishing
Sessions assemble the published configuration.
Web SDK
Every
AgentSession.start() option.
