POST /chat
Send a message to the agent and receive a complete response synchronously. This endpoint invokes the LangGraph agent, processes the user’s message, and returns the final result.For streaming responses with real-time token updates, use the two-step streaming pattern with
/chat/message and /chat/stream.Authentication
Requires a valid session cookie (session_id) obtained through the OAuth flow.
Request Body
The user’s message or query to the agent.
- Minimum length: 1 character
- Maximum length: 10,000 characters
"What meetings do I have tomorrow?""Create a task to review the budget report"
Optional thread ID for conversation continuity. If not provided, a new thread is created.Example:
"thread_abc123"Optional conversation history for additional context. Defaults to an empty array.Each item should be a dictionary with message data.
Request Example
Response
The agent’s natural language response to the user’s query
Thread ID for conversation continuity. Use this in subsequent requests to maintain context.
List of actions executed by the agent during processing.Each action contains:
id(string): Unique action identifiertool(string): Name of the tool that was executedsuccess(boolean): Whether the action succeededresult(object, optional): Result data from the toolerror(string, optional): Error message if the action failed
Whether the agent is waiting for user confirmation before executing planned actions.
Message asking for confirmation (only present if
requires_confirmation is true)Response Example
Confirmation Flow
Ifrequires_confirmation is true, the agent has planned actions but needs user approval:
Status Codes
| Code | Description |
|---|---|
| 200 | Successful response |
| 401 | Not authenticated - missing or invalid session cookie |
| 429 | Rate limit exceeded |
| 500 | Server error - agent processing failed |