v1

latestOpenAPI 3.1.02026-07-26142186376.1 KB
Sessions

Create New Session

Create a new empty session with optional configuration. Useful for pre-creating sessions with specific session_state, metadata, or other properties before running any agent/team/workflow interactions. The session can later be used by providing its session_id in run requests.

post/sessions

Query parameters

type'agent' | 'team' | 'workflow'

Type of session to create (agent, team, or workflow)

db_idstring nullable

Database ID to create session in

Database ID to create session in

Request body

session_idstring nullable

Optional session ID (generated if not provided)

session_namestring nullable

Name for the session

session_stateobject nullable

Initial session state

metadataobject nullable

Additional metadata

user_idstring nullable

User ID associated with the session

agent_idstring nullable

Agent ID if this is an agent session

team_idstring nullable

Team ID if this is a team session

workflow_idstring nullable

Workflow ID if this is a workflow session

Response

Session created successfully

OR
OR