CognitiveX Docs
API

POST /api/agents/{slug}/handoff

Handoff To Agent

POST /api/agents/{slug}/handoff

Handoff To Agent

Authentication: Authorization: Bearer <key> or X-API-Key: <key>. Create keys at developers.cognitivx.io/keys.

Parameters

NameInTypeRequiredDescription
slugpathstringYes-
X-Org-IDheaderstring | nullNo-

Request body

A JSON request body is required.

FieldTypeRequiredDescription
to_slugstringYes-
context_explanationstringYes-
referenced_memory_idsstring[]No-
active_task_summarystringYes-

Example request

curl -X POST https://api.cognitivx.io/api/agents/{slug}/handoff \
  -H "Authorization: Bearer icog_..." \
  -H "Content-Type: application/json" \
  -d '{
    "to_slug": "string",
    "context_explanation": "Parsa prefers limit/offset pagination",
    "referenced_memory_ids": [
      "string"
    ],
    "active_task_summary": "string"
  }'

Example response

200 application/json

{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "sender_agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "sender_slug": "string",
  "recipient_agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "recipient_team_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "thread_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "in_reply_to_message_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "content": "Parsa prefers limit/offset pagination",
  "context_explanation": "Parsa prefers limit/offset pagination",
  "referenced_memory_ids": [
    "string"
  ],
  "referenced_message_ids": [
    "Parsa prefers limit/offset pagination"
  ],
  "message_kind": "Parsa prefers limit/offset pagination",
  "delivery_status": "ok",
  "sent_at": "2026-06-16T08:30:00Z",
  "delivered_at": "2026-06-16T08:30:00Z",
  "read_at": "2026-06-16T08:30:00Z"
}

Responses

StatusDescription
200Success. Returns the response body shown below.
422Request validation failed. detail lists each offending field.