Skip to main content
POST
Create agent session

Authorizations

X-API-KEY
string
header
required

Headers

X-End-User-ID
string | null

Body

application/json
title
string | null

Optional title for the session.

Example:

"Q3 Analysis"

assistant_id
string<uuid> | null

ID of an assistant to base the session on.

model_name
string | null

Model to use (overrides assistant default).

Example:

"gpt-4o"

initial_system_prompt
string | null

System prompt to initialize the session with.

tool_ids
string<uuid>[] | null

List of tool IDs to enable for this session.

skill_ids
string<uuid>[] | null

List of skill IDs to enable for this session.

external_user_id
string | null

A unique identifier for your end-user. If provided, access to this session will be restricted to requests providing the 'X-End-User-ID' header with this value.

prompt_variables
Prompt Variables · object | null

A dictionary of variables to inject into the system prompt template (e.g. {'tone': 'formal'} for {{tone}}). These variables can be defined in the assistant's parameters (as defaults) or provided here at runtime to override them.

mcp_config
Mcp Config · object | null

Optional MCP configuration to override the assistant's default servers for this session.

Response

Successful Response

id
string<uuid>
required

Unique identifier for the session.

status
string
required

Current status (e.g., 'active', 'completed').

created_at
string<date-time>
required

Creation timestamp.

updated_at
string<date-time>
required

Last update timestamp.

title
string | null

Title of the session.

model_name
string | null

Model being used.

external_user_id
string | null

The external user ID associated with this session, if any.

active_tools
PublicToolListItem · object[]

List of tools enabled for this session.

active_skills
PublicSkillListItem · object[]

List of skills enabled for this session.

documents
PublicSessionDocumentListItem · object[]

List of documents linked to this session.

workspaces
PublicWorkspace · object[]

List of workspaces linked to this session.

mcp_config
Mcp Config · object | null

The currently active MCP configuration for this session.