Execution traces
Execution traces answer operational questions: which steps ran, how long they took, whether tools and memory were used, and where failures occurred. ArcFlow exposes the same metadata through the SDK, HTTP API, CLI, and Postgres persistence. All trace payloads follow trace data policy (counts and ids, not prompts or tool bodies).
Python: raw events on the result
After workflow.run(), read the flat event list:
SDK exports may use event_kind as the field name in Python bindings; HTTP trace JSON uses kind.
Required lifecycle kinds for a healthy two-step stub run:
Python: structured trace()
workflow.trace() builds a TraceResult after run() on the same instance:
TraceResult fields:
| Field | Meaning |
|---|---|
run_id | UUID for this execution |
workflow_name | Declared workflow name |
status | completed, failed, or partial |
started_at / completed_at | UTC timestamps |
total_duration_seconds | Wall clock |
total_tokens_consumed | Sum from step token usage |
steps | Tuple of StepTrace |
warnings | e.g. dropped events from store capacity |
trace.summary() returns a one-line human report. trace.failed_step() returns the first failed StepTrace if any.
TypeScript
Raw events: result.traceEvents with event_kind per integration tests.
Server API
Fetch persisted trace after a server run:
Response is an ExecutionTrace JSON document: ordered events plus optional aggregated step summaries depending on export version. Events are metadata-only.
Relay path for static sites:
CLI
Requires access to the trace store (local SDK run or server-backed persistence).
Annotated sample (three-step workflow with tool)
Metadata-only excerpt from a research → tool → write pipeline:
Reading guide:
prompt_size_bytesandoutput_size_bytesreplace raw text.MemoryRetrievedreportschunk_countandtotal_bytes, not chunk content.ToolCallStartedusesinput_schema_hash, not argument JSON.
Full field catalog: trace event reference.
Postgres
When trace persistence is enabled, rows land in arcflow_trace_events. Operators may SQL-query by run_id for dashboards until Operator dashboard UI dashboard UI exits private repo CI.
Related pages
- Trace event reference for every
TraceEventKind - Trace data policy rules for allowed and forbidden fields
- Track A first workflow for hands-on trace verification