Skip to main content
The Agent Trajectory Interchange Format (ATIF) records an agent’s complete interaction history as JSON: messages, reasoning, tool calls, observations, and metrics.

Why

Agents produce different native logs. Without a shared format, every viewer, dataset, and training pipeline needs an agent-specific parser. ATIF provides one stable representation across agents, making trajectories easier to inspect, compare, validate, load, and reuse. See the ATIF RFC for the complete specification.

trajectory.json in Harbor

In Harbor, an ATIF trajectory is usually named trajectory.json.
Agents with capabilities.atif = true write it to the agent log directory. In a downloaded trial result, the path is agent/trajectory.json. Harbor uses this file to:
  • Render trajectories: The results viewer reads agent/trajectory.json and displays its steps in the Trajectory tab.
  • Load trajectories: Supported agents can use an ATIF trajectory to seed a new session.
Producing ATIF and loading ATIF are separate capabilities. An agent may write trajectory.json without supporting loading trajectories.
Custom agents should declare AgentCapabilities(atif=True) only when they write a valid self.logs_dir / "trajectory.json".

Structure

Harbor’s current format is ATIF-v1.7. A trajectory contains: Step IDs start at 1 and remain sequential. Agent steps can include tool_calls, matching observation results, and per-step metrics.
Harbor provides Pydantic models in harbor.models.trajectories:

Validate a trajectory

Validation checks the schema, sequential step IDs, tool-call references, timestamps, and referenced local images. Use --no-validate-images to skip the image-file check.

Versions and extensions

Harbor accepts ATIF-v1.0 through ATIF-v1.7. Version 1.7 adds embedded subagent trajectories, per-document trajectory IDs, llm_call_count, and additional extension fields. See the RFC changelog for earlier versions.
Use the schema’s extra fields for custom metadata. Harbor’s Pydantic models reject undeclared fields.

Resources

ATIF RFC, Harbor trajectory models, Valid trajectory examples, Trajectory validator