Get Messages
Agent Interaction
Get Messages
Poll for messages and updates from the agent.
GET
Get Messages
Overview
Retrieve messages from the agent, including thoughts, questions, results, and errors. Use theafter_id parameter to implement efficient polling.
Request
The UUID of the session
Bearer token for authentication
Return only messages with ID greater than this value. Use for incremental polling.
Filter out system messages, internal prompts, and images. Set to
false for debugging.Response
Array of message objects
Current execution status:
running, waiting_for_input, finished, errorWhether the agent is connected and active
Example Requests
Message Types
THOUGHT
Agent’s reasoning or actions being takenQUESTION
Agent needs user input to continueDONE
Task completion with resultsERROR
Error occurred during executionLOG
Additional context or debugging infoUse Cases
Incremental Polling
Interactive Q&A
Extract Final Results
Polling Pattern
For real-time updates without polling, consider using Server-Sent Events instead.
Best Practices
Poll interval recommendation: 1-3 seconds. Balance between responsiveness and API load.