Skip to main content

Sessions

MCP tools for the Sessions module. See the Sessions module docs for permissions and data model.

create-session

Create a session

Arguments

ArgumentTypeRequiredDescription
agentIdstringyesAgent this session belongs to
namestringnoOptional session name
actorIdstringnoOptional public ID of an existing actor to use as the user actor. Actors are created separately (POST /actors); this field only links one. Omit it and the session has no end user, so its generations match no actor-scoped quota.
autoGeneratebooleannoWhen true, automatically triggers generation after each user message.
toolContextobjectnoKey-value pairs forwarded as X-Soat-Context-<Key> headers on every http, mcp and soat tool call in this session. Each key's first character is uppercased and the rest is used verbatim. Keys are never case-converted — they round-trip exactly as sent. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with 400 INVALID_TOOL_CONTEXT_KEY.
inactivityTtlSecondsnumbernoNumber of seconds of inactivity after which the session expires. 0 means the session never expires.
messageDelaySecondsnumbernoNumber of seconds to wait after the last user message before sending to the LLM. Acts as a debounce: each new message resets the timer. null or absent means no delay (immediate processing).

list-sessions

List sessions

Arguments

ArgumentTypeRequiredDescription
agentIdstringnoFilter by agent public ID
actorIdstringnoFilter by actor public ID
statusstringnoFilter by session status (open, closed, or expired)
limitnumberno
offsetnumberno

get-session

Get a session

Arguments

This tool takes no arguments.

update-session

Update a session

Arguments

ArgumentTypeRequiredDescription
namestringnoSession name (set to null to clear)
statusstringnoSession status
autoGeneratebooleannoEnable or disable automatic generation after user messages.
toolContextobjectnoKey-value pairs forwarded as X-Soat-Context-<Key> headers on every http, mcp and soat tool call in this session. Each key's first character is uppercased and the rest is used verbatim. Keys are never case-converted — they round-trip exactly as sent. A key that is not a valid HTTP header name, or two keys that map to the same header, are rejected with 400 INVALID_TOOL_CONTEXT_KEY.
inactivityTtlSecondsnumbernoNumber of seconds of inactivity after which the session expires. 0 means the session never expires. Updates the stored TTL; the inactivity clock continues from the last activity timestamp.
messageDelaySecondsnumbernoNumber of seconds to wait after the last user message before sending to the LLM. Acts as a debounce: each new message resets the timer. Set to null to disable the delay.

delete-session

Delete a session

Arguments

This tool takes no arguments.

add-session-message

Add a user message

Arguments

This tool takes no arguments.

generate-session-response

Trigger agent generation

Arguments

ArgumentTypeRequiredDescription
asyncbooleannoWhen true, generation runs in the background and 202 is returned immediately
modelstringnoOptional model override
toolContextobjectnoKey-value pairs forwarded as X-Soat-Context-<Key> headers on every http, mcp and soat tool call in this generation. Each key's first character is uppercased and the rest is used verbatim. Keys are never case-converted — they round-trip exactly as sent. An invalid or colliding key is rejected with 400 INVALID_TOOL_CONTEXT_KEY.

submit-session-tool-outputs

Submit tool outputs

Arguments

ArgumentTypeRequiredDescription
generationIdstringyesThe generation ID from the requires_action response
toolOutputsarray<object>yes

get-session-tags

Get session tags

Arguments

This tool takes no arguments.

replace-session-tags

Replace session tags

Arguments

This tool takes no arguments.

merge-session-tags

Merge session tags

Arguments

This tool takes no arguments.