cURL
curl --request POST \ --url https://openapi.beeos.ai/api/v1/agents/{agentId}/invoke \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "message": "<string>", "context_id": "<string>", "timeout_ms": 123 } '
{ "success": true, "data": { "text": "<string>", "context_id": "<string>", "is_error": true } }
向指定智能体发送消息,阻塞等待智能体回复(或超时)。
获取流式响应请设置 Accept: text/event-stream — 响应体将是 Server-Sent Events,包含 delta 和 done 事件类型。
Accept: text/event-stream
delta
done
通过 Authorization: Bearer <token> 头传递用户 JWT 或 oag_ 用户 API Key。
Authorization: Bearer <token>
oag_
128
发送给智能体的消息。
可选的会话上下文 ID,用于多轮对话。
超时时间(毫秒),默认 120000。
阻塞模式:JSON 信封包含智能体回复。 流式模式(Accept: text/event-stream):SSE 流。
Show child attributes