Skip to content
AdiosDocumentation
Browse documentation

Agent sessions API

Manage conversation state. Creating a session record alone does not start an AI run. Use the Adios application or MCP integration to start agent work.

Use API authentication for protected requests. Examples use your own resource IDs and a temporary token; saved response examples are synthetic.

MethodPathOperation
GET/v1/agent_sessionList agent sessions
POST/v1/agent_sessionCreate agent session
GET/v1/agent_session/{id}Get agent session
PUT/v1/agent_session/{id}Update agent session
DELETE/v1/agent_session/{id}Delete agent session
GET/v1/agent_session/{id}/stateGet agent session state
GET/v1/agent_session/{id}/planGet agent session plan
POST/v1/agent_session/{id}/runs/{run_id}/cancelCancel agent run

List agent sessions

GET /v1/agent_session

Returns a paginated list of AgentSession

Authentication: bearer token and the team header shown below.

Parameters

NameLocationRequiredDescription
X-Tenant-IDheaderyesActive team ID. Must match the tenant bound to a diagnostic token.
pagequerynoPage number
per_pagequerynoItems per page

Request example

Set ADIOS_API_URL=https://api.adios.dev. For protected requests, set ADIOS_ACCESS_TOKEN and ADIOS_TEAM_ID as in the quickstart. Set any additional ADIOS_* variables from your own resource results.

curl --fail-with-body --request GET "$ADIOS_API_URL/v1/agent_session" \
  -H "Authorization: Bearer $ADIOS_ACCESS_TOKEN" \
  -H "X-Tenant-ID: $ADIOS_TEAM_ID"

Response: HTTP 200

List of AgentSession

Response fields

FieldTypeDescription
dataarray
data[].agent_session_idstring
data[].channel_idstring
data[].company_project_idstring
data[].context_snapshotobject
data[].created_atinteger(Unix timestamp)
data[].deleted_atinteger(Unix timestamp)
data[].last_message_atinteger(Unix timestamp)
data[].memory_summaryobject
data[].metadataobject
data[].modestringAllowed: build, debug, ops, review, chat.
data[].modelstring
data[].owner_idstring
data[].providerstring
data[].sharing_scopestringAllowed: private, team.
data[].sourcestringAllowed: app, slack, cli.
data[].statusstringAllowed: active, paused, blocked, complete, failed.
data[].team_idstring
data[].thread_idstring
data[].updated_atinteger(Unix timestamp)
data[].workspace_idstring
data[].writable_repository_idstring
paginationobject
pagination.pageintegerCurrent page number
pagination.per_pageintegerNumber of items per page
pagination.totalintegerTotal number of items

Illustrative example; not a live response:

{
  "data": [
    {
      "agent_session_id": "000000000000000000000000001",
      "channel_id": "",
      "company_project_id": "",
      "context_snapshot": {},
      "created_at": 1791072000,
      "deleted_at": 0,
      "last_message_at": 0,
      "memory_summary": {},
      "metadata": {},
      "mode": "chat",
      "model": "",
      "owner_id": "",
      "provider": "",
      "sharing_scope": "private",
      "source": "app",
      "status": "active",
      "team_id": "000000000000000000000000001",
      "thread_id": "",
      "updated_at": 1791072000,
      "workspace_id": "",
      "writable_repository_id": ""
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 1,
    "total": 1
  }
}

Create agent session

POST /v1/agent_session

Creates a new AgentSession

This request changes data or starts an action. Review the target and body before sending it.

Request fields (the body contains an editable example):

FieldTypeRequiredDescription
channel_idstringnoDefault: "".
company_project_idstringnoDefault: "".
context_snapshotobjectno
last_message_atintegerno(Unix timestamp) Default: 0.
memory_summaryobjectno
metadataobjectno
modestringyesAllowed: build, debug, ops, review, chat. Default: "chat".
modelstringnoDefault: "".
owner_idstringnoDefault: "".
providerstringnoDefault: "".
sharing_scopestringyesAllowed: private, team. Default: "private".
sourcestringyesAllowed: app, slack, cli.
statusstringyesAllowed: active, paused, blocked, complete, failed. Default: "active".
team_idstringyes
thread_idstringnoDefault: "".
workspace_idstringnoDefault: "".
writable_repository_idstringnoDefault: "".

Authentication: bearer token and the team header shown below.

Parameters

NameLocationRequiredDescription
X-Tenant-IDheaderyesActive team ID. Must match the tenant bound to a diagnostic token.

Request example

Set ADIOS_API_URL=https://api.adios.dev. For protected requests, set ADIOS_ACCESS_TOKEN and ADIOS_TEAM_ID as in the quickstart. Set any additional ADIOS_* variables from your own resource results.

curl --fail-with-body --request POST "$ADIOS_API_URL/v1/agent_session" \
  -H "Authorization: Bearer $ADIOS_ACCESS_TOKEN" \
  -H "X-Tenant-ID: $ADIOS_TEAM_ID" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "team_id": "YOUR_TEAM_ID",
  "owner_id": "YOUR_USER_ID",
  "workspace_id": "YOUR_WORKSPACE_ID",
  "sharing_scope": "private",
  "source": "app",
  "mode": "chat",
  "status": "active"
}
JSON

Replace YOUR_* body placeholders before sending. The quoted heredoc keeps the JSON literal.

Response: HTTP 201

AgentSession created

Response fields

FieldTypeDescription
agent_session_idstring
channel_idstring
company_project_idstring
context_snapshotobject
created_atinteger(Unix timestamp)
deleted_atinteger(Unix timestamp)
last_message_atinteger(Unix timestamp)
memory_summaryobject
metadataobject
modestringAllowed: build, debug, ops, review, chat.
modelstring
owner_idstring
providerstring
sharing_scopestringAllowed: private, team.
sourcestringAllowed: app, slack, cli.
statusstringAllowed: active, paused, blocked, complete, failed.
team_idstring
thread_idstring
updated_atinteger(Unix timestamp)
workspace_idstring
writable_repository_idstring

Illustrative example; not a live response:

{
  "agent_session_id": "000000000000000000000000001",
  "channel_id": "",
  "company_project_id": "",
  "context_snapshot": {},
  "created_at": 1791072000,
  "deleted_at": 0,
  "last_message_at": 0,
  "memory_summary": {},
  "metadata": {},
  "mode": "chat",
  "model": "",
  "owner_id": "",
  "provider": "",
  "sharing_scope": "private",
  "source": "app",
  "status": "active",
  "team_id": "000000000000000000000000001",
  "thread_id": "",
  "updated_at": 1791072000,
  "workspace_id": "",
  "writable_repository_id": ""
}

Get agent session

GET /v1/agent_session/{id}

Returns a single AgentSession

Set agent_session_id using IDs from your own API responses.

Authentication: bearer token and the team header shown below.

Parameters

NameLocationRequiredDescription
idpathyesResource identifier from your team's API results.
X-Tenant-IDheaderyesActive team ID. Must match the tenant bound to a diagnostic token.

Request example

Set ADIOS_API_URL=https://api.adios.dev. For protected requests, set ADIOS_ACCESS_TOKEN and ADIOS_TEAM_ID as in the quickstart. Set any additional ADIOS_* variables from your own resource results.

curl --fail-with-body --request GET "$ADIOS_API_URL/v1/agent_session/${ADIOS_AGENT_SESSION_ID}" \
  -H "Authorization: Bearer $ADIOS_ACCESS_TOKEN" \
  -H "X-Tenant-ID: $ADIOS_TEAM_ID"

Response: HTTP 200

AgentSession

Response fields

FieldTypeDescription
agent_session_idstring
channel_idstring
company_project_idstring
context_snapshotobject
created_atinteger(Unix timestamp)
deleted_atinteger(Unix timestamp)
last_message_atinteger(Unix timestamp)
memory_summaryobject
metadataobject
modestringAllowed: build, debug, ops, review, chat.
modelstring
owner_idstring
providerstring
sharing_scopestringAllowed: private, team.
sourcestringAllowed: app, slack, cli.
statusstringAllowed: active, paused, blocked, complete, failed.
team_idstring
thread_idstring
updated_atinteger(Unix timestamp)
workspace_idstring
writable_repository_idstring

Illustrative example; not a live response:

{
  "agent_session_id": "000000000000000000000000001",
  "channel_id": "",
  "company_project_id": "",
  "context_snapshot": {},
  "created_at": 1791072000,
  "deleted_at": 0,
  "last_message_at": 0,
  "memory_summary": {},
  "metadata": {},
  "mode": "chat",
  "model": "",
  "owner_id": "",
  "provider": "",
  "sharing_scope": "private",
  "source": "app",
  "status": "active",
  "team_id": "000000000000000000000000001",
  "thread_id": "",
  "updated_at": 1791072000,
  "workspace_id": "",
  "writable_repository_id": ""
}

Update agent session

PUT /v1/agent_session/{id}

Updates an existing AgentSession

Set agent_session_id using IDs from your own API responses.

This request changes data or starts an action. Review the target and body before sending it.

Request fields (the body contains an editable example):

FieldTypeRequiredDescription
channel_idstringnoDefault: "".
company_project_idstringnoDefault: "".
context_snapshotobjectno
last_message_atintegerno(Unix timestamp) Default: 0.
memory_summaryobjectno
metadataobjectno
modestringyesAllowed: build, debug, ops, review, chat. Default: "chat".
modelstringnoDefault: "".
owner_idstringnoDefault: "".
providerstringnoDefault: "".
sharing_scopestringyesAllowed: private, team. Default: "private".
sourcestringyesAllowed: app, slack, cli.
statusstringyesAllowed: active, paused, blocked, complete, failed. Default: "active".
team_idstringyes
thread_idstringnoDefault: "".
workspace_idstringnoDefault: "".
writable_repository_idstringnoDefault: "".

Authentication: bearer token and the team header shown below.

Parameters

NameLocationRequiredDescription
idpathyesResource identifier from your team's API results.
X-Tenant-IDheaderyesActive team ID. Must match the tenant bound to a diagnostic token.

Request example

Set ADIOS_API_URL=https://api.adios.dev. For protected requests, set ADIOS_ACCESS_TOKEN and ADIOS_TEAM_ID as in the quickstart. Set any additional ADIOS_* variables from your own resource results.

curl --fail-with-body --request PUT "$ADIOS_API_URL/v1/agent_session/${ADIOS_AGENT_SESSION_ID}" \
  -H "Authorization: Bearer $ADIOS_ACCESS_TOKEN" \
  -H "X-Tenant-ID: $ADIOS_TEAM_ID" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'JSON'
{
  "team_id": "YOUR_TEAM_ID",
  "owner_id": "YOUR_USER_ID",
  "workspace_id": "YOUR_WORKSPACE_ID",
  "sharing_scope": "private",
  "source": "app",
  "mode": "chat",
  "status": "active"
}
JSON

Replace YOUR_* body placeholders before sending. The quoted heredoc keeps the JSON literal.

Response: HTTP 200

AgentSession updated

Response fields

FieldTypeDescription
agent_session_idstring
channel_idstring
company_project_idstring
context_snapshotobject
created_atinteger(Unix timestamp)
deleted_atinteger(Unix timestamp)
last_message_atinteger(Unix timestamp)
memory_summaryobject
metadataobject
modestringAllowed: build, debug, ops, review, chat.
modelstring
owner_idstring
providerstring
sharing_scopestringAllowed: private, team.
sourcestringAllowed: app, slack, cli.
statusstringAllowed: active, paused, blocked, complete, failed.
team_idstring
thread_idstring
updated_atinteger(Unix timestamp)
workspace_idstring
writable_repository_idstring

Illustrative example; not a live response:

{
  "agent_session_id": "000000000000000000000000001",
  "channel_id": "",
  "company_project_id": "",
  "context_snapshot": {},
  "created_at": 1791072000,
  "deleted_at": 0,
  "last_message_at": 0,
  "memory_summary": {},
  "metadata": {},
  "mode": "chat",
  "model": "",
  "owner_id": "",
  "provider": "",
  "sharing_scope": "private",
  "source": "app",
  "status": "active",
  "team_id": "000000000000000000000000001",
  "thread_id": "",
  "updated_at": 1791072000,
  "workspace_id": "",
  "writable_repository_id": ""
}

Delete agent session

DELETE /v1/agent_session/{id}

Deletes a AgentSession

Set agent_session_id using IDs from your own API responses.

This request changes data or starts an action. Review the target and body before sending it.

Authentication: bearer token and the team header shown below.

Parameters

NameLocationRequiredDescription
idpathyesResource identifier from your team's API results.
X-Tenant-IDheaderyesActive team ID. Must match the tenant bound to a diagnostic token.

Request example

Set ADIOS_API_URL=https://api.adios.dev. For protected requests, set ADIOS_ACCESS_TOKEN and ADIOS_TEAM_ID as in the quickstart. Set any additional ADIOS_* variables from your own resource results.

curl --fail-with-body --request DELETE "$ADIOS_API_URL/v1/agent_session/${ADIOS_AGENT_SESSION_ID}" \
  -H "Authorization: Bearer $ADIOS_ACCESS_TOKEN" \
  -H "X-Tenant-ID: $ADIOS_TEAM_ID"

Response: HTTP 200

Resource deleted.

Response fields

FieldTypeDescription
messagestring

Illustrative example; not a live response:

{
  "message": "Deleted successfully"
}

Get agent session state

GET /v1/agent_session/{id}/state

Read the session state.

Set agent_session_id using IDs from your own API responses.

Authentication: bearer token and the team header shown below.

Parameters

NameLocationRequiredDescription
idpathyesResource identifier from your team's API results.
X-Tenant-IDheaderyesActive team ID. Must match the tenant bound to a diagnostic token.

Request example

Set ADIOS_API_URL=https://api.adios.dev. For protected requests, set ADIOS_ACCESS_TOKEN and ADIOS_TEAM_ID as in the quickstart. Set any additional ADIOS_* variables from your own resource results.

curl --fail-with-body --request GET "$ADIOS_API_URL/v1/agent_session/${ADIOS_AGENT_SESSION_ID}/state" \
  -H "Authorization: Bearer $ADIOS_ACCESS_TOKEN" \
  -H "X-Tenant-ID: $ADIOS_TEAM_ID"

Response: HTTP 200

Successful response. Inspect returned state for operations that start asynchronous work.

A complete response-body schema is not published for this custom operation. Inspect the returned content and status; no payload is assumed here.

Get agent session plan

GET /v1/agent_session/{id}/plan

Read the session's current plan.

Set agent_session_id using IDs from your own API responses.

Authentication: bearer token and the team header shown below.

Parameters

NameLocationRequiredDescription
idpathyesResource identifier from your team's API results.
X-Tenant-IDheaderyesActive team ID. Must match the tenant bound to a diagnostic token.

Request example

Set ADIOS_API_URL=https://api.adios.dev. For protected requests, set ADIOS_ACCESS_TOKEN and ADIOS_TEAM_ID as in the quickstart. Set any additional ADIOS_* variables from your own resource results.

curl --fail-with-body --request GET "$ADIOS_API_URL/v1/agent_session/${ADIOS_AGENT_SESSION_ID}/plan" \
  -H "Authorization: Bearer $ADIOS_ACCESS_TOKEN" \
  -H "X-Tenant-ID: $ADIOS_TEAM_ID"

Response: HTTP 200

Successful response. Inspect returned state for operations that start asynchronous work.

A complete response-body schema is not published for this custom operation. Inspect the returned content and status; no payload is assumed here.

Cancel agent run

POST /v1/agent_session/{id}/runs/{run_id}/cancel

Request cancellation of an active run in the session.

Set agent_session_id, agent_run_id using IDs from your own API responses.

This request changes data or starts an action. Review the target and body before sending it.

Authentication: bearer token and the team header shown below.

Parameters

NameLocationRequiredDescription
idpathyesResource identifier from your team's API results.
run_idpathyesResource identifier from your team's API results.
X-Tenant-IDheaderyesActive team ID. Must match the tenant bound to a diagnostic token.

Request example

Set ADIOS_API_URL=https://api.adios.dev. For protected requests, set ADIOS_ACCESS_TOKEN and ADIOS_TEAM_ID as in the quickstart. Set any additional ADIOS_* variables from your own resource results.

curl --fail-with-body --request POST "$ADIOS_API_URL/v1/agent_session/${ADIOS_AGENT_SESSION_ID}/runs/${ADIOS_AGENT_RUN_ID}/cancel" \
  -H "Authorization: Bearer $ADIOS_ACCESS_TOKEN" \
  -H "X-Tenant-ID: $ADIOS_TEAM_ID"

Response: HTTP 200

Successful response. Inspect returned state for operations that start asynchronous work.

A complete response-body schema is not published for this custom operation. Inspect the returned content and status; no payload is assumed here.