List Session Requests (Extension)
Call Create session first and replace the example session ID with its returned ID.
/agent/v1/sessions/{session_id}/requests● SupportedRequest parameters
session_idstringrequiredpath: Session id from session creation or listing.
Returns
200
Own-face extension. When a session stops at session.status_idle with stop_reason requires_action, read what it waits on here instead of replaying events. Returns { data: Request[] } ordered by create_time, an empty array when nothing is pending, not paginated. Each request has id (the pending tool call id), object (request), kind (always approval, a tool waiting for permission; question is kept for compatibility and is never returned), status (pending), tool_name, input (the same input the agent.tool_use event shows), create_time and expire_time. Answer a request as before: send a user.tool_confirmation event for its id. expire_time is set only for a session with no collaboration mode while the requests-v1 release is on (create_time plus 24 hours; an expired request counts as declined), otherwise null. Answered, expired and superseded requests are not listed, and neither are pending custom tool results (user.custom_tool_result). Whoever may read the session may read its requests; a session that is missing or not yours returns 404.
Errors follow the Anthropic error format (type / message / request_id) — see error codes
Request
curl
# Call Create session first and replace the example session ID with its returned ID.
curl https://api.deepraxis.com/agent/v1/sessions/sesn_123/requests \
-H "Authorization: Bearer $PRAXIS_API_KEY"Python
# Call Create session first and replace the example session ID with its returned ID.
import requests
opts = dict(
base_url="https://api.deepraxis.com/agent",
api_key="$PRAXIS_API_KEY",
)
# /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
resp = requests.get(
f"{opts['base_url']}/v1/sessions/sesn_123/requests",
headers={"Authorization": f"Bearer {opts['api_key']}"},
)
print(resp.status_code, resp.json())TypeScript
// Call Create session first and replace the example session ID with its returned ID.
const opts = {
baseURL: "https://api.deepraxis.com/agent",
apiKey: "$PRAXIS_API_KEY",
};
// /agent 是我们自己的 Managed Agents 形状,直接发 HTTP 请求(Bearer 认证)
const resp = await fetch(`${opts.baseURL}/v1/sessions/sesn_123/requests`, {
headers: { Authorization: `Bearer ${opts.apiKey}` },
});
console.log(resp.status, await resp.json());Response 200
{
"data": [
{
"id": "toolu_13fbe42c3c3d48f4b55bef4f",
"object": "request",
"status": "pending",
"kind": "question",
"tool_name": "ask_user_question",
"input": {
"questions": [
{
"question": "会议室订在哪一天?",
"header": "日期",
"options": [
{
"label": "今天 11月14日(周六)",
"description": "当天使用"
},
{
"label": "明天 11月15日(周日)",
"description": "次日使用"
},
{
"label": "下周一 11月16日",
"description": "工作日使用"
}
]
},
{
"question": "希望什么时间段开始?",
"header": "时间",
"options": [
{
"label": "上午 9:00",
"description": "上午时段"
},
{
"label": "上午 10:00",
"description": "上午时段"
},
{
"label": "下午 14:00",
"description": "下午时段"
},
{
"label": "下午 16:00",
"description": "傍晚时段"
}
]
},
{
"question": "需要多长时间?",
"header": "时长",
"options": [
{
"label": "30 分钟",
"description": "短会"
},
{
"label": "1 小时",
"description": "常规会议"
},
{
"label": "2 小时",
"description": "较长会议"
},
{
"label": "半天",
"description": "约 3-4 小时"
}
]
},
{
"question": "参会人数大概多少?",
"header": "人数",
"options": [
{
"label": "2-4 人",
"description": "小会议室"
},
{
"label": "5-8 人",
"description": "中型会议室"
},
{
"label": "9-15 人",
"description": "大会议室"
},
{
"label": "16 人以上",
"description": "培训室/大会议室"
}
]
}
]
},
"create_time": "2026-11-14T16:27:00.504Z",
"expire_time": "2026-11-15T16:27:00.504Z"
}
]
}Response
HTTP 200
The requests this session waits on
application/json
| Name | Type | Description |
|---|---|---|
| data | array<object> | The requests the session waits on, oldest first; empty when it waits on nothing. |
| data[].id | string | The pending tool call's id (the tool_use id on the agent.tool_use event); answer it with a user.tool_confirmation event carrying this id as tool_use_id. |
| data[].object | string | Object type, always request. |
| data[].kind | string | Always approval: a tool waits for permission. question is kept for compatibility and is never returned: the agent asks with a card or in words and the person answers with a message. |
| data[].status | string | Always pending: answered, expired and superseded requests are not listed. |
| data[].tool_name | string | The tool the agent called, such as bash. |
| data[].input | any | The tool call's input exactly as the agent.tool_use event shows it: the tool's arguments. |
| data[].create_time | string | When the call became pending, RFC 3339; the time of its agent.tool_use event. |
| data[].expire_time | string | null | When the request expires and counts as declined, RFC 3339; null when it does not expire, which is every session that runs a collaboration mode and every session while the requests-v1 release is off. |