Messages
GET /api/messages
GET /api/messages?task_id=task_abc&limit=50| Param | Required | Description |
|---|---|---|
task_id | ✅ | The task to retrieve messages for |
limit | ❌ | Number of messages (default: 50, max: 200) |
before | ❌ | Cursor for pagination |
include_tool_calls | ❌ | Include tool calls inline (default: false) |
Response:
{ "messages": [ { "message_id": "msg_001", "role": "user", "content": "Review the open GitHub issues", "created_at": "2025-04-01T09:00:00Z" }, { "message_id": "msg_002", "role": "assistant", "content": "I found 5 open issues. Here's the summary...", "created_at": "2025-04-01T09:00:45Z", "run_id": "run_xyz", "credits_used": 6 } ], "has_more": false}Message roles
| Role | Description |
|---|---|
user | Message from the user |
assistant | Response from the agent |
tool | Tool call result (visible when include_tool_calls=true) |