nat.utils.atif_converter#
Convert NAT IntermediateStep traces to the Agent Trajectory Interchange Format (ATIF).
ATIF is a standardized JSON format for logging the complete interaction history of autonomous LLM agents. Reference: laude-institute/harbor
This module provides:
- Conversion helpers built on shared ATIF v1.6 models
- IntermediateStepToATIFConverter for batch conversion
- ATIFStreamConverter for incremental / streaming conversion
Classes#
Convert a complete list of NAT IntermediateSteps to an ATIF trajectory. |
|
Stateful converter that emits ATIF steps incrementally. |
Module Contents#
- class IntermediateStepToATIFConverter#
Convert a complete list of NAT IntermediateSteps to an ATIF trajectory.
- class ATIFStreamConverter(agent_name: str = 'nat-agent')#
Stateful converter that emits ATIF steps incrementally.
- _agent_config#
- _tool_defs_captured = False#
- _total_prompt = 0#
- _total_completion = 0#
- _total_cached = 0#
- property agent_config: nat.atif.ATIFAgentConfig#
Current agent configuration (populated as steps arrive).
- push( ) nat.atif.ATIFStep | None#
Process one IntermediateStep and return a flushed ATIF step if available.
- get_trajectory() nat.atif.ATIFTrajectory#
Build the complete ATIF trajectory from all emitted steps.