Task.aget_activity_log returns the full thread of activity for a task: user messages, assistant messages, tool calls, tool results, reasoning steps, sub-agent triggers, and auth events. Unlike task.aevents() (live SSE for in-flight tasks), the activity log is a historical record you can fetch at any time, including for completed tasks.
Parameters
None.Returns AgentActivityThread
| Field | Type | Description |
|---|---|---|
messages | list[AgentActivityThread*] | Ordered union of message types (see below). |
| (other fields) | – | Thread metadata (id, agent_id, organization_id, …). |
| Type | Fields |
|---|---|
AgentActivityThreadMessage | role, content.text (string), content (rich content). |
AgentActivityThreadToolCall | tool_name, payload, result. |
AgentActivityThreadReasoning | type ("think" / "analyze"), thought. |
isinstance or type(msg).__name__ to handle them.)
Examples
Just the user/assistant transcript
Audit tool usage
Reasoning trace
Sync version
Errors
RaisesModuleException if the activity log can’t be retrieved:
| Status | Cause |
|---|---|
| 404 | Task has no activity log (e.g. it never started). |
| 500 | Server error or network failure. |

