Trace event reference

Complete reference for engine TraceEventKind variants emitted by arcflow-core. Each event serializes as { "kind": "<Name>",...fields } with PascalCase kind tags.

Trace data policy: All listed events are metadata-only in storage and HTTP export. No prompt text, tool payloads, or chunk content.

See Trace events (normative).

Total engine kinds: 37 (see Trace events (normative) for graph export kinds).

Workflow lifecycle

WorkflowStarted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
workflow_namestringDeclared workflow nameSafe
step_countusizeLinear step count or graph step countSafe

Emitter: workflow engine at run start.

WorkflowCompleted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
duration_msu64Total wall timeSafe
total_tokensTokenUsageAggregate input/output/total countsSafe

Emitter: workflow engine on success.

WorkflowFailed

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
duration_msu64Time until failureSafe
failed_step_indexusize optionalZero-based step indexSafe
error_codestringworkflow specification error codeSafe

Emitter: workflow engine on terminal failure.

WorkflowValidationFailed

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
reasonstringValidation summary (must not embed user input)Safe if bounded

Emitter: validation layer before execution.

WorkflowRecoveryStarted

FieldTypeMeaningTrace policy
run_idstringNew resume run idSafe
original_run_idstringFailed run idSafe
resume_from_stepusizeStep index to resumeSafe

Emitter: recovery subsystem.

WorkflowRecoveryCompleted

FieldTypeMeaningTrace policy
run_idstringResume run idSafe
original_run_idstringSource failed runSafe
steps_re_executedusizeSteps run on resumeSafe

Emitter: recovery subsystem.

Step lifecycle

StepStarted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
step_indexusizeZero-based orderSafe
agent_namestringAgent name from definitionSafe if not PII
agent_rolestringAgent roleSafe

Emitter: step scheduler.

StepCompleted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
step_indexusizeStep orderSafe
duration_msu64Step wall timeSafe
tokensTokenUsageStep token countsSafe
output_size_bytesusizeOutput byte size, not textSafe

Emitter: step executor.

StepFailed

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
step_indexusizeStep orderSafe
duration_msu64Time until failureSafe
error_codestringworkflow specification codeSafe
error_messagestringSafe summary textSafe if no user content

Emitter: step executor.

StateCommitted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
committed_step_countusizeRecovery checkpoint depthSafe

Emitter: recovery / state store.

StepFallbackActivated

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
primary_agent_namestringPrimary agentSafe
fallback_agent_namestringFallback agentSafe

Emitter: step fallback resolver.

Agent and provider

AgentInvoked

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
agent_namestringAgent nameSafe if not PII
input_size_bytesusizeInput byte sizeSafe

Emitter: agent runtime.

AgentResponseReceived

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
agent_namestringAgent nameSafe
output_size_bytesusizeResponse byte sizeSafe

Emitter: agent runtime.

TokensConsumed

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
agent_namestringAgent nameSafe
tokensTokenUsageCountsSafe

Emitter: agent / billing hook.

ProviderRequestSent

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
provider_idstringProvider slugSafe
model_idstringModel idSafe
max_tokensu32Request capSafe
prompt_size_bytesusizePrompt size, not contentSafe

Emitter: provider adapter.

ProviderResponseReceived

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
provider_idstringProvider slugSafe
model_idstringModel idSafe
tokensTokenUsageUsage countsSafe
latency_msu64Round-trip timeSafe

Emitter: provider adapter.

ProviderRateLimited

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
provider_idstringProvider slugSafe
retry_after_secondsu64 optionalProvider hintSafe

Emitter: provider adapter.

ProviderError

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
provider_idstringProvider slugSafe
error_codestringProvider or workflow specification codeSafe
error_messagestringSafe summarySafe if bounded

Emitter: provider adapter.

Tools

ToolCallStarted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
tool_namestringRegistered tool nameSafe
input_schema_hashstringHash of input schema, not argsSafe

Emitter: tool executor.

ToolCallCompleted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
tool_namestringTool nameSafe
duration_msu64Tool runtimeSafe
output_size_bytesusizeResult size, not payloadSafe

Emitter: tool executor.

ToolCallFailed

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
tool_namestringTool nameSafe
duration_msu64Time until failureSafe
failure_reasonstringBounded reasonSafe if bounded
error_codestringworkflow specification codeSafe

Emitter: tool executor.

ToolInputValidationFailed

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
tool_namestringTool nameSafe
violation_descriptionstringSchema violation summarySafe if no raw args

Emitter: tool validator.

Memory

MemoryWrite

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
agent_namestringAgent nameSafe
memory_typestringBackend type slugSafe
keystringMemory key (avoid PII in keys)Caution
duration_msu64Operation timeSafe

Emitter: memory coordinator.

MemoryRead

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
agent_namestringAgent nameSafe
memory_typestringBackend typeSafe
keystringMemory keyCaution
hitboolCache hitSafe
duration_msu64Operation timeSafe

Emitter: memory coordinator.

MemoryRetrieved

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
agent_namestringAgent nameSafe
chunk_countusizeNumber of chunksSafe
total_bytesusizeAggregate chunk bytesSafe

Emitter: vector retrieval (RAG).

MemoryDegraded

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
memory_typestringBackend typeSafe
backendstringBackend idSafe
reasonstringDegradation reasonSafe

Emitter: memory coordinator.

MemoryEvicted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
memory_typestringBackend typeSafe
keystringEvicted keyCaution
eviction_reasonstringReason enum / slugSafe

Emitter: memory eviction policy.

Reliability

RetryAttempted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
attempt_numberu32Current attemptSafe
max_attemptsu32Configured capSafe
backoff_msu64Wait before retrySafe
trigger_error_codestringCode that triggered retrySafe

Emitter: retry policy.

RetryExhausted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
total_attemptsu32Attempts madeSafe
last_error_codestringFinal error codeSafe

Emitter: retry policy.

TimeoutEnforced

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
timeout_typestringworkflow or stepSafe
configured_msu64LimitSafe
elapsed_msu64Observed elapsedSafe

Emitter: timeout enforcer.

TraceStorageWarning

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
events_droppedu32Dropped event countSafe
capacity_limitu32Store capacitySafe

Emitter: trace ring buffer.

Streaming

StreamChunkReceived

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
chunk_bytesusizeChunk sizeSafe

Emitter: streaming provider adapter.

TokenEmitted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
step_idstringStep UUIDSafe
completion_token_deltau32Completion tokens in deltaSafe
prompt_token_deltau32Prompt tokens in deltaSafe

Emitter: streaming provider adapter. Browser poll uses this for progress UX.

External bindings

ExternalBindingStarted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
binding_idstringBinding idSafe
step_idstringAttached step UUIDSafe
modestringasync_callback or sync_toolSafe

Emitter: external monitor at step completion.

ExternalBindingCompleted

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
binding_idstringBinding idSafe
step_idstringStep UUIDSafe
duration_msu64Wait durationSafe

Emitter: external monitor on success callback.

ExternalBindingFailed

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
binding_idstringBinding idSafe
step_idstringStep UUIDSafe
error_codestringOutcome or workflow specification codeSafe
statusstringOutcome status stringSafe

Emitter: external monitor on failed callback.

ExternalRecoveryTriggered

FieldTypeMeaningTrace policy
run_idstringExecution UUIDSafe
binding_idstringBinding idSafe
actionstringRecovery action nameSafe
attempt_numberu32Retry attemptSafe

Emitter: external recovery policy.

workflow graph kinds (extended exports)

These kinds are documented in the workflow specification types and may appear alongside engine events in graph workflow exports. They follow the same trace data policy rule (metadata only):

EventTypical fields
GraphNodeStartedrun_id, node_id, iteration
GraphNodeCompletedrun_id, node_id, duration_ms
GraphIterationLimitReachedrun_id, node_id, limit

Confirm availability in your runtime version via a sample graph trace export.

TokenUsage struct

Nested in multiple events:

FieldMeaningTrace policy
inputPrompt token countSafe
outputCompletion token countSafe
totalSumSafe

Example full trace (metadata only)

json
[
 { "kind": "WorkflowStarted", "run_id": "r1", "workflow_name": "demo", "step_count": 2 },
 { "kind": "StepStarted", "run_id": "r1", "step_id": "s1", "step_index": 0, "agent_name": "a1", "agent_role": "Analyst" },
 { "kind": "ProviderRequestSent", "run_id": "r1", "step_id": "s1", "provider_id": "openai", "model_id": "gpt-4o-mini", "max_tokens": 1024, "prompt_size_bytes": 512 },
 { "kind": "ProviderResponseReceived", "run_id": "r1", "step_id": "s1", "provider_id": "openai", "model_id": "gpt-4o-mini", "tokens": { "input": 120, "output": 45, "total": 165 }, "latency_ms": 890 },
 { "kind": "StepCompleted", "run_id": "r1", "step_id": "s1", "step_index": 0, "duration_ms": 920, "tokens": { "input": 120, "output": 45, "total": 165 }, "output_size_bytes": 180 },
 { "kind": "WorkflowCompleted", "run_id": "r1", "duration_ms": 950, "total_tokens": { "input": 120, "output": 45, "total": 165 } }
]