Skip to main content

Available in arize-phoenix-client 2.3.0+ (Python)

Phoenix now ingests ATIF (Agent Trajectory Interchange Format) trajectories directly. upload_atif_trajectories_as_spans converts ATIF JSON files into OpenTelemetry-compatible span trees and uploads them to any Phoenix project, letting you visualize offline agent runs alongside live instrumented traces.

Trace Structure#

Each trajectory becomes one trace. The span hierarchy follows the causal model used by real-time instrumentors — TOOL spans are siblings of the LLM spans under the AGENT, not children:

Multi-turn conversations get nested per-turn AGENT spans. Trajectories that reference each other via subagent_trajectory_ref are linked into a single trace when uploaded together.

Usage#

Upload multiple trajectories in a single call to enable subagent linking:

Key Details#

  • Supported versions: ATIF schema v1.0 through v1.6
  • Deterministic IDs: trace and span IDs are derived from session_id via SHA-256 — re-uploading the same trajectory is idempotent
  • Multimodal content (v1.6+): image content parts are stored using the OpenInference message.contents array format
  • Continuation merging: sessions split across files (session_id ending in -cont-N) are automatically merged into one trace
  • Attribute mapping: token counts, cost, model name, tool definitions, and reasoning content are mapped to standard OpenInference attributes