nat.atif.trajectory#
Trajectory (root) model for ATIF (Agent Trajectory Interchange Format).
Attributes#
Classes#
ATIF trajectory — the complete interaction history of an agent run. |
Module Contents#
- ATIF_VERSION = 'ATIF-v1.6'#
- class Trajectory(/, **data: Any)#
Bases:
pydantic.BaseModelATIF trajectory — the complete interaction history of an agent run.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.selfis explicitly positional-only to allowselfas a field name.- schema_version: Literal['ATIF-v1.0', 'ATIF-v1.1', 'ATIF-v1.2', 'ATIF-v1.3', 'ATIF-v1.4', 'ATIF-v1.5', 'ATIF-v1.6'] = None#
- agent: nat.atif.agent.Agent = None#
- steps: list[nat.atif.step.Step] = None#
- final_metrics: nat.atif.final_metrics.FinalMetrics | None = None#
- model_config#
Configuration for the model, should be a dictionary conforming to [
ConfigDict][pydantic.config.ConfigDict].
- to_json_dict(exclude_none: bool = True) dict[str, Any]#
Export trajectory to a dictionary suitable for JSON serialization.
- validate_step_ids() Trajectory#
Validate that step_ids are sequential starting from 1.
- validate_tool_call_references() Trajectory#
Validate that observation source_call_ids reference valid tool_call_ids.