curl --request POST \
--url https://zeus-api.agentspro.cn/api/agent/resume \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"session_id": "sess_456",
"llm_config": {
"baseUrl": "https://api.openai.com/v1",
"apiKey": "sk-...",
"modelName": "gpt-4o"
},
"tool_call_results": [
{
"tool_call_id": "call_abc",
"tool_name": "sandbox_exec",
"decision": "approved"
}
],
"human_order": "执行时注意备份文件"
}'
data: {"type": "tool_result", "tool_name": "sandbox_exec", "result": "..."}
data: {"type": "message_chunk", "content": "操作已完成,已备份文件。"}
data: {"type": "done", "session_id": "sess_456"}
Agent API
恢复 Agent
恢复被中断的 Agent 执行 — HITL 审批后继续
POST
/
api
/
agent
/
resume
curl --request POST \
--url https://zeus-api.agentspro.cn/api/agent/resume \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"session_id": "sess_456",
"llm_config": {
"baseUrl": "https://api.openai.com/v1",
"apiKey": "sk-...",
"modelName": "gpt-4o"
},
"tool_call_results": [
{
"tool_call_id": "call_abc",
"tool_name": "sandbox_exec",
"decision": "approved"
}
],
"human_order": "执行时注意备份文件"
}'
data: {"type": "tool_result", "tool_name": "sandbox_exec", "result": "..."}
data: {"type": "message_chunk", "content": "操作已完成,已备份文件。"}
data: {"type": "done", "session_id": "sess_456"}
当 Agent 执行中某个工具触发了 HITL(Human-in-the-Loop)中断后,前端收集用户的审批决策,通过此接口恢复执行。
返回 SSE 流式响应,从中断点继续执行。
user_id 从 JWT Token 中自动提取,无需在 body 中传入。
string
必填
Bearer JWT Token(
user_id 从中自动提取)string
必填
被中断的会话 ID
object
必填
array
必填
string
人工指令 — 随审批结果传递给 Agent 的额外说明
object
工具中断配置(后续工具调用仍可触发中断)
curl --request POST \
--url https://zeus-api.agentspro.cn/api/agent/resume \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"session_id": "sess_456",
"llm_config": {
"baseUrl": "https://api.openai.com/v1",
"apiKey": "sk-...",
"modelName": "gpt-4o"
},
"tool_call_results": [
{
"tool_call_id": "call_abc",
"tool_name": "sandbox_exec",
"decision": "approved"
}
],
"human_order": "执行时注意备份文件"
}'
data: {"type": "tool_result", "tool_name": "sandbox_exec", "result": "..."}
data: {"type": "message_chunk", "content": "操作已完成,已备份文件。"}
data: {"type": "done", "session_id": "sess_456"}
⌘I