Start a chat session with an agent. Given a user query, the agent responds by leveraging the language model and tools associated with it.
Although this API is stateless, users can ensure conversation continuity by including the cursor from the previous response in subsequent requests.
Providing the cursor allows the agent to maintain the context of the conversation and deliver more accurate responses.
When the cursor is provided, there is no need to include the previous message history in the messages
field.
Note: A cursor is short-lived and may expire over time. Clients should not cache or rely on its long-term availability.
Successful Response
The response for a failed request.
{- "agentId": "string",
- "cursor": "string",
- "messages": [
- {
- "content": {
- "text": "string",
- "type": "text"
}, - "role": "user"
}
]
}
{- "agentId": "string",
- "response": {
- "cursor": "string",
- "messages": [
- {
- "content": {
- "text": "string",
- "type": "text"
}, - "data": [
- {
- "instances": { },
- "type": "instances"
}
], - "reasoning": [
- {
- "content": [
- {
- "text": null,
- "type": null
}
]
}
], - "role": "agent"
}
], - "type": "result"
}
}