Skip to main content

Module atif

Module atif 

Source
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§

AtifAgent
Agent configuration metadata.
AtifToolCall
Structured tool/function invocation.
AtifTrajectoryBuilder
Stateful collector that converts a live ThreadEvent stream into an ATIF-compliant Trajectory.
FinalMetrics
Trajectory-level aggregate metrics.
Observation
Environment feedback container.
ObservationResult
Individual observation result tied to a tool call.
Step
Individual interaction step.
StepMetrics
Per-step LLM operational metrics.
Trajectory
Root-level ATIF trajectory object.

Enums§

StepSource
The originator of a step.

Constants§

ATIF_SCHEMA_VERSION
Current ATIF schema version supported by this implementation.