v4

latestOpenAPI 3.1.0raw.githubusercontent.com2026-06-13216144508.7 KB
sdk-v1

Get Chat Task Steps

Return the public-timeline steps for a task.

Pulls all :class:TraceEvent rows for the task in DB order, then collapses them via :func:map_trace_events_to_public_steps into the 4 stable public step types: thinking, tool_call, agent_delegation, message.

The internal trace event taxonomy has ~32 event_type strings today; SDK callers see only the 4 types listed above. Internal events not on the public allow-list (LLM calls, memory ops, visualization ticks, DAG bookkeeping) are silently dropped -- intentionally, so internal trace evolution doesn't break the SDK contract.

Args: task_id: Path parameter; the target task's primary key. authed: (Agent, AgentApiKey) tuple resolved by the auth dependency. The agent here is the key-bound agent. db: SQLAlchemy session.

Returns: :class:StepsResponse with task_id, agent_id, and the steps array in started_at ascending order. In-flight steps appear with status='running' and completed_at=null so SDK clients can poll this endpoint and observe progress.

Raises: V1ApiError 401: missing / invalid / revoked key. V1ApiError 404: task missing or not owned by the calling agent.

get/v1/chat/tasks/{task_id}/steps

Path parameters

task_idinteger required

Response

Successful Response

task_idinteger required

The task these steps belong to.

agent_idinteger required

The task's agent.