curl --request GET \
--url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/sessions' \
--header 'Authorization: Bearer <YOUR_API_KEY>'{
"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-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"
}
],
"next_page": "xxx",
"request_id": "xxx"
}Authorizations
DashScope API Key
Query Parameters
Response
Session 对象数组
Show child attributes
Show child attributes
会话 ID,格式 sesn_<ULID>
固定为 session
会话状态:idle / running / terminated
会话回到 idle 的原因,是一个判别联合:null(running,或 idle 刚创建、尚未产生结束原因)| end_turn(模型主动结束)| retries_exhausted(重试耗尽)| requires_action(等待工具审批)。stop_reason 仅在会话状态为 idle 时用于判断交互状态:running 时为 null;terminated 是终态,接口可能保留此前值,客户端不应依赖或解释。仅 requires_action 分支携带 pending_batch_id 与非空 pending_call_ids,指出待裁决的审批批次与调用。畸形对象应校验失败,例如 {}、{"type":"requires_action"}(缺 pending_batch_id/pending_call_ids)、{"type":"requires_action","pending_call_ids":[]}(pending_call_ids 为空)、{"type":"requires_action","pending_batch_id":"","pending_call_ids":["call_xxx"]}(空批次 ID)、{"type":"requires_action","pending_batch_id":"b","pending_call_ids":[""]}(pending_call_ids 含空 item)、{"type":"end_turn","pending_batch_id":"b","pending_call_ids":["c"]}(终态夹带 pending 字段)均非法。全部审批批次/调用 ID 均非空(minLength: 1)
Show child attributes
Show child attributes
end_turn(模型主动结束)/ retries_exhausted(重试耗尽)
智能体配置快照,含 id/version/name/model/system/tools 等
Show child attributes
Show child attributes
Show child attributes
Show child attributes
工具包类型
当前工具包中单个工具的启用和审批策略配置;逐工具配置覆盖 default_config
Show child attributes
Show child attributes
mcp_toolkit 类型对应的 MCP Server 名称
绑定的运行环境 ID
会话标题
业务自定义元数据
归档时间,未归档时为 null
创建时间,ISO 8601
最近更新时间,ISO 8601
下一页游标
本次请求的唯一标识