Module atif

View as Markdown

Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.

Agent Trajectory Interchange Format (ATIF) exporter.

This module provides types and an exporter that collects lifecycle events from the NeMo Relay runtime and converts them into ATIF trajectories conforming to the ATIF v1.7 schema.

Overview

The AtifExporter registers as an event subscriber, collects all events, and can export them as an AtifTrajectory via AtifExporter::export.

Event-to-Step Mapping

The core conversion from NeMo Relay events to ATIF steps follows these rules:

  • NeMo Relay Event | ATIF Step | Notes
  • LLM Start | user step | Messages extracted from LlmRequest
  • LLM End | agent step | Response content, tool_calls promoted
  • Tool Start | (skipped) | tool_calls come from LLM End instead
  • Tool End | agent observation | Correlated by source_call_id
  • Mark (with data) | system step | Custom event data preserved
  • Scope Start/End | (skipped) | Structural events, not trajectory

The exporter serializes the full collected event stream into a single ATIF trajectory.

Structs

Constants