nat.atif.subagent_trajectory_ref#

Subagent trajectory reference model for ATIF trajectories.

Classes#

SubagentTrajectoryRef

Reference to a delegated subagent trajectory (ATIF v1.7).

Module Contents#

class SubagentTrajectoryRef(/, **data: Any)#

Bases: pydantic.BaseModel

Reference to a delegated subagent trajectory (ATIF v1.7).

A ref MUST be resolvable via at least one of two mechanisms:

  • Embedded formtrajectory_id matches the trajectory_id of an entry in the parent Trajectory.subagent_trajectories array.

  • File-ref formtrajectory_path references an external file (path, S3 URL, database identifier, etc.).

A ref MUST set at least one of trajectory_id or trajectory_path; setting both is permitted (an embedded ref MAY also record the original file path for debug). session_id is run-scoped and informational only — it is NOT a valid resolution key (two sibling subagents MAY legitimately share a session_id).

Breaking vs. v1.6: in v1.6 session_id was required on the ref and served as the resolution key. Under v1.7 a ref of the shape {"session_id": "..."} (no trajectory_id and no trajectory_path) no longer validates. Producers MUST migrate by setting trajectory_id for embedded refs or trajectory_path for external-file refs. Pre-v1.7 refs that already set trajectory_path remain valid.

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.

self is explicitly positional-only to allow self as a field name.

trajectory_id: str | None = None#
trajectory_path: str | None = None#
session_id: str | None = None#
extra: dict[str, Any] | None = None#
model_config#

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

_validate_resolution_key_present() Self#