Expand description
Agent Trajectory Interchange Format (ATIF) types and builder.
Implements the ATIF specification v1.4 for logging complete agent interaction histories in a standardized, JSON-based format usable across debugging, visualization, SFT, and RL pipelines.
§Overview
ATIF provides a complete session trajectory: user messages, agent responses,
tool executions, observations, and per-step/aggregate LLM metrics. The
AtifTrajectoryBuilder converts live ThreadEvent
streams into a finished Trajectory.
§Example
use vtcode_exec_events::atif::*;
let agent = AtifAgent::new("vtcode", env!("CARGO_PKG_VERSION"));
let mut builder = AtifTrajectoryBuilder::new(agent);
// Feed ThreadEvents as they arrive …
// builder.process_event(&event);
let trajectory = builder.finish(None);
let json = serde_json::to_string_pretty(&trajectory).unwrap();Structs§
- Atif
Agent - Agent configuration metadata.
- Atif
Tool Call - Structured tool/function invocation.
- Atif
Trajectory Builder - Stateful collector that converts a live
ThreadEventstream into an ATIF-compliantTrajectory. - Final
Metrics - Trajectory-level aggregate metrics.
- Observation
- Environment feedback container.
- Observation
Result - Individual observation result tied to a tool call.
- Step
- Individual interaction step.
- Step
Metrics - Per-step LLM operational metrics.
- Trajectory
- Root-level ATIF trajectory object.
Enums§
- Step
Source - The originator of a step.
Constants§
- ATIF_
SCHEMA_ VERSION - Current ATIF schema version supported by this implementation.