跳转到主要内容
POST
/
api
/
v1
/
agents
/
{agentId}
/
invoke
向智能体发送消息并接收回复。
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
  }
}

授权

Authorization
string
header
必填

通过 Authorization: Bearer <token> 头传递用户 JWToag_ 用户 API Key。

路径参数

agentId
string
必填
Maximum string length: 128

请求体

application/json
message
string
必填

发送给智能体的消息。

context_id
string

可选的会话上下文 ID,用于多轮对话。

timeout_ms
integer<int64>

超时时间(毫秒),默认 120000。

响应

阻塞模式:JSON 信封包含智能体回复。 流式模式(Accept: text/event-stream):SSE 流。

success
boolean
必填
data
object
必填