Agent
回答 Agent 的交互请求
Changed on回答 Agent 运行中发起的交互(ask_user 提问、工具审批,或由浏览器自动应答的页面读写)。 kind 须与交互一致,response 为该类型的回答 JSON(不接受未知字段): ask_user 为 {selected?, values?, text?, declined?}; tool_approval 为 {approved: bool, modified_args?: object, reason?: string, allow_in_session?: bool}; page_action 为 {declined?, error?, location?, snapshot?, applied?: [{ref, label?, summary?}], stayed?, return_path?}。 返回 resumed=true 表示挂起的运行已请求恢复(自动化由调度器恢复),客户端需携带 resume_pending_id 重新接入该消息的事件流
post/agent/prompts/{prompt_id}
Request
- Base URL/api/v1 (relative, and the document was published on a file host, not at the API’s origin)
- URL/api/v1/agent/prompts/{prompt_id}
- Auth
- API key in header Authorization
- or API key in header X-API-Key
Path parameters
prompt_idstring required
交互 ID(事件中的 pending_id)
Request body
object required
Response
{success: true, resumed: bool}
object required
Changes
- info
endpoint added
- info