Session 对象字段 响应包含 data(Session 对象数组)与 next_page(下一页游标)。Session 对象字段如下: idstring会话 ID,格式 sesn_<ULID> typestring固定为 session statusstring会话状态:idle / running / terminated stop_reasonobject / null会话回到 idle 的原因,判别联合。null / {"type":"end_turn"} / {"type":"retries_exhausted"} / {"type":"requires_action","pending_batch_id":"...","pending_call_ids":[...]}。仅在 status=idle 时用于判断交互状态 agentobject智能体配置快照,含 id / version / name / model / system / tools 等 environment_idstring绑定的运行环境 ID title / metadatastring / object会话标题与业务自定义元数据 archived_atstring / null归档时间,未归档时为 null created_at / updated_atstring创建 / 最近更新时间,ISO 8601 environment_variablesobject会话运行时注入的环境变量,字符串键值对,沙箱代码中可直接按名读取 | 响应示例 {
"data": [
{
"id": "sesn_xxx",
"type": "session",
"status": "idle",
"stop_reason": null,
"agent": {
"id": "agent_xxx",
"type": "agent",
"version": 1,
"name": "data-analyst",
"model": {"id": "qwen3.7-max"},
"system": "你是数据分析专家,使用 pandas 处理 CSV 文件。",
"tools": []
},
"environment_id": "env_xxx",
"title": "Q3 销售数据分析",
"metadata": {"biz_ticket_id": "1234"},
"archived_at": null,
"created_at": "2026-05-28T08:23:11.456000Z",
"updated_at": "2026-05-28T08:23:25.789000Z",
"environment_variables": {"API_BASE_URL": "https://api.example.com", "LOG_LEVEL": "info"}
}
],
"next_page": "xxx",
"request_id": "xxx"
}
|