OpenAgentPack Kit
POST
/api/kit/sessions

Request Body

application/json
  1. body
agent_slug*string
Length1 <= length
title?string
Lengthlength <= 120
files?array<>
Itemsitems <= 10

Response Body

会话已创建(files 为已挂载进 sandbox 的附件)

application/json
  1. response
data*
curl -X POST 'https://example.com/api/kit/sessions' \  -H 'Content-Type: application/json' \  -d '{  "agent_slug": "string"}'
{  "data": {    "session_id": "string",    "agent_slug": "string",    "title": "string",    "status": "string",    "created_at": "string",    "last_event_at": "string",    "usage": {      "input_tokens": 0,      "output_tokens": 0,      "cache_read_input_tokens": 0,      "cache_creation_input_tokens": 0    },    "stats": {      "active_seconds": 0,      "duration_seconds": 0    },    "remote_status": "string",    "files": [      {        "file_id": "string",        "filename": "string",        "mount_path": "string",        "size": 0      }    ],    "message_files": [      {        "event_ids": [          "string"        ],        "files": [          {            "file_id": "string",            "filename": "string",            "mount_path": "string",            "size": 0          }        ]      }    ]  }}