跳转到主要内容
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 中传入。
Authorization
string
必填
Bearer JWT Token(user_id 从中自动提取)
session_id
string
必填
被中断的会话 ID
llm_config
object
必填
LLM 模型配置(同 invoke)
tool_call_results
array
必填
工具调用审批结果列表
human_order
string
人工指令 — 随审批结果传递给 Agent 的额外说明
tool_interrupt_config
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"}