Skip to main content
PATCH
/
agent-sessions
/
{session_id}
Update agent session
import requests

url = "https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}"

payload = {
    "title": "<string>",
    "tool_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
    "skill_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
    "model_name": "<string>",
    "status": "<string>",
    "external_user_id": "<string>",
    "mcp_config": {}
}
headers = {
    "X-API-KEY": "<api-key>",
    "Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: '<string>',
tool_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
skill_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
model_name: '<string>',
status: '<string>',
external_user_id: '<string>',
mcp_config: {}
})
};

fetch('https://app.ubik-agent.com/api/v1/agent-sessions/{session_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
curl --request PATCH \
--url https://app.ubik-agent.com/api/v1/agent-sessions/{session_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"title": "<string>",
"tool_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"skill_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"model_name": "<string>",
"status": "<string>",
"external_user_id": "<string>",
"mcp_config": {}
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "title": "<string>",
  "model_name": "<string>",
  "external_user_id": "<string>",
  "active_tools": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "description": "<string>"
    }
  ],
  "active_skills": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "description": "<string>"
    }
  ],
  "documents": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "status": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "file_type": "<string>",
      "processing_pipeline": "<string>",
      "error_message": "<string>",
      "api_metadata": {},
      "is_starred": false
    }
  ],
  "workspaces": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "document_count": 123,
      "description": "<string>",
      "is_default": false,
      "workspace_metadata": {}
    }
  ],
  "mcp_config": {}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Authorizations

X-API-KEY
string
header
required

Headers

X-End-User-ID
string | null

Path Parameters

session_id
string<uuid>
required

Body

application/json
title
string | null

New title for the session.

tool_ids
string<uuid>[] | null

List of tool IDs to enable for this session. Replaces existing tools.

skill_ids
string<uuid>[] | null

List of skill IDs to enable for this session. Replaces existing skills.

model_name
string | null

Model to use for this session.

status
string | null

Status of the session.

external_user_id
string | null

The external user ID associated with this session.

mcp_config
Mcp Config · object | null

Update the active MCP servers for this session mid-conversation.

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.