First stable release of atif, a Pydantic-based implementation of the Agent Trajectory Interchange Format (ATIF) v1.7.
Highlights
- Full ATIF v1.7 schema as Pydantic v2 models:
Trajectory,Step,Agent,ToolCall,Observation,ObservationResult,Metrics,FinalMetrics,ContentPart,ImageSource,SubagentTrajectoryRef. - Cross-field validators: sequential
step_ids, ISO 8601 timestamps, agent-only fields gated onsource == "agent", tool-call / observation correlation, embedded-subagenttrajectory_iduniqueness,ContentParttext/image XOR,llm_call_count == 0deterministic-dispatch constraints. - Multimodal content (text + image
ContentParts) on bothStep.messageandObservationResult.content. - Embedded subagent trajectories via
subagent_trajectoriesandSubagentTrajectoryRef(with the v1.7trajectory_idresolution rules). - Strict-by-default: unknown fields are rejected (
extra = "forbid"). - PEP 561
py.typedmarker so downstream type-checkers pick up the annotations. - 100% line and branch coverage.
- Python 3.11+.
Install
pip install atiffrom atif import Trajectory
trajectory = Trajectory.model_validate(payload)Versioning
atif's MAJOR.MINOR tracks the ATIF RFC version it implements (1.7.x ⇔ ATIF v1.7); PATCH is reserved for library-only fixes. Pin to atif~=1.7.0 to stay on a single ATIF version.