> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/gym/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/gym/_mcp/server.

# nemo_gym.atif_v1_7

Strict models for Gym's supported ATIF v1.7 subset.

This is deliberately not a general ATIF implementation. It describes the
fields consumed and produced by Gym's ATIF adapters and rejects unknown
structural fields so schema drift cannot silently alter their behavior. Provider
payloads and extension metadata remain JSON objects at their declared extension
points.

## Module Contents

### Classes

| Name                                                                 | Description                                                     |
| -------------------------------------------------------------------- | --------------------------------------------------------------- |
| [`AtifAgent`](#nemo_gym-atif_v1_7-AtifAgent)                         | -                                                               |
| [`AtifContentPart`](#nemo_gym-atif_v1_7-AtifContentPart)             | Validated ATIF text or image content part.                      |
| [`AtifFinalMetrics`](#nemo_gym-atif_v1_7-AtifFinalMetrics)           | -                                                               |
| [`AtifImageSource`](#nemo_gym-atif_v1_7-AtifImageSource)             | -                                                               |
| [`AtifObservation`](#nemo_gym-atif_v1_7-AtifObservation)             | -                                                               |
| [`AtifObservationResult`](#nemo_gym-atif_v1_7-AtifObservationResult) | -                                                               |
| [`AtifStep`](#nemo_gym-atif_v1_7-AtifStep)                           | -                                                               |
| [`AtifStepMetrics`](#nemo_gym-atif_v1_7-AtifStepMetrics)             | -                                                               |
| [`AtifToolCall`](#nemo_gym-atif_v1_7-AtifToolCall)                   | -                                                               |
| [`AtifTrajectoryV1_7`](#nemo_gym-atif_v1_7-AtifTrajectoryV1_7)       | The version-gated ATIF v1.7 subset supported by Gym's adapters. |
| [`_AtifModel`](#nemo_gym-atif_v1_7-_AtifModel)                       | -                                                               |

### Data

[`ATIF_SCHEMA_VERSION`](#nemo_gym-atif_v1_7-ATIF_SCHEMA_VERSION)

[`AtifContent`](#nemo_gym-atif_v1_7-AtifContent)

### API

```python
class nemo_gym.atif_v1_7.AtifAgent()
```

**Bases:** [\_AtifModel](#nemo_gym-atif_v1_7-_AtifModel)

**`extra`** `dict[str, Any] | None = None`

---

**`model_name`** `str | None = None`

---

**`name`** `str`

---

**`tool_definitions`** `list[dict[str, Any]] | None = None`

---

**`version`** `str`

---

```python
class nemo_gym.atif_v1_7.AtifContentPart()
```

**Bases:** [\_AtifModel](#nemo_gym-atif_v1_7-_AtifModel)

Validated ATIF text or image content part.

**`source`** `AtifImageSource | None = None`

---

**`text`** `str | None = None`

---

**`type`** `Literal['text', 'image']`

---

```python
nemo_gym.atif_v1_7.AtifContentPart.validate_content_type() -> 'AtifContentPart'
```

```python
class nemo_gym.atif_v1_7.AtifFinalMetrics()
```

**Bases:** [\_AtifModel](#nemo_gym-atif_v1_7-_AtifModel)

**`extra`** `dict[str, Any] | None = None`

---

**`total_cached_tokens`** `int | None = Field(default=None, ge=0, strict=True)`

---

**`total_completion_tokens`** `int | None = Field(default=None, ge=0, strict=True)`

---

**`total_cost_usd`** `float | None = Field(default=None, ge=0, strict=True)`

---

**`total_prompt_tokens`** `int | None = Field(default=None, ge=0, strict=True)`

---

**`total_steps`** `int | None = Field(default=None, ge=0)`

---

```python
class nemo_gym.atif_v1_7.AtifImageSource()
```

**Bases:** [\_AtifModel](#nemo_gym-atif_v1_7-_AtifModel)

**`media_type`** `Literal['image/jpeg', 'image/png', 'image/gif', 'image/webp']`

---

**`path`** `str`

---

```python
class nemo_gym.atif_v1_7.AtifObservation()
```

**Bases:** [\_AtifModel](#nemo_gym-atif_v1_7-_AtifModel)

**`results`** `list[AtifObservationResult]`

---

```python
class nemo_gym.atif_v1_7.AtifObservationResult()
```

**Bases:** [\_AtifModel](#nemo_gym-atif_v1_7-_AtifModel)

**`content`** `AtifContent | None = None`

---

**`extra`** `dict[str, Any] | None = None`

---

**`source_call_id`** `str | None = None`

---

**`subagent_trajectory_ref`** `list[dict[str, Any]] | None = None`

---

```python
class nemo_gym.atif_v1_7.AtifStep()
```

**Bases:** [\_AtifModel](#nemo_gym-atif_v1_7-_AtifModel)

**`extra`** `dict[str, Any] | None = None`

---

**`is_copied_context`** `bool | None = None`

---

**`llm_call_count`** `int | None = Field(default=None, ge=0, strict=True)`

---

**`message`** `AtifContent`

---

**`metrics`** `AtifStepMetrics | None = None`

---

**`model_name`** `str | None = None`

---

**`observation`** `AtifObservation | None = None`

---

**`reasoning_content`** `str | None = None`

---

**`reasoning_effort`** `str | float | None = None`

---

**`source`** `Literal['system', 'user', 'agent']`

---

**`step_id`** `int = Field(ge=1, strict=True)`

---

**`timestamp`** `str | None = None`

---

**`tool_calls`** `list[AtifToolCall] | None = None`

---

```python
nemo_gym.atif_v1_7.AtifStep.validate_agent_only_fields() -> 'AtifStep'
```

```python
nemo_gym.atif_v1_7.AtifStep.validate_timestamp(
    value: str | None
) -> str | None
```

classmethod

```python
nemo_gym.atif_v1_7.AtifStep.validate_zero_llm_call_count() -> 'AtifStep'
```

```python
class nemo_gym.atif_v1_7.AtifStepMetrics()
```

**Bases:** [\_AtifModel](#nemo_gym-atif_v1_7-_AtifModel)

**`cached_tokens`** `int | None = Field(default=None, ge=0, strict=True)`

---

**`completion_token_ids`** `list[int] | None = None`

---

**`completion_tokens`** `int | None = Field(default=None, ge=0, strict=True)`

---

**`cost_usd`** `float | None = Field(default=None, ge=0, strict=True)`

---

**`extra`** `dict[str, Any] | None = None`

---

**`logprobs`** `list[float] | None = None`

---

**`prompt_token_ids`** `list[int] | None = None`

---

**`prompt_tokens`** `int | None = Field(default=None, ge=0, strict=True)`

---

```python
nemo_gym.atif_v1_7.AtifStepMetrics.validate_logprob_types(
    value: typing.Any
) -> typing.Any
```

classmethod

```python
nemo_gym.atif_v1_7.AtifStepMetrics.validate_token_id_types(
    value: typing.Any
) -> typing.Any
```

classmethod

```python
class nemo_gym.atif_v1_7.AtifToolCall()
```

**Bases:** [\_AtifModel](#nemo_gym-atif_v1_7-_AtifModel)

**`arguments`** `dict[str, Any]`

---

**`extra`** `dict[str, Any] | None = None`

---

**`function_name`** `str`

---

**`tool_call_id`** `str`

---

```python
class nemo_gym.atif_v1_7.AtifTrajectoryV1_7()
```

**Bases:** [\_AtifModel](#nemo_gym-atif_v1_7-_AtifModel)

The version-gated ATIF v1.7 subset supported by Gym's adapters.

**`agent`** `AtifAgent`

---

**`continued_trajectory_ref`** `str | None = None`

---

**`extra`** `dict[str, Any] | None = None`

---

**`final_metrics`** `AtifFinalMetrics | None = None`

---

**`notes`** `str | None = None`

---

**`schema_version`** `Literal['ATIF-v1.7']`

---

**`session_id`** `str | None = None`

---

**`steps`** `list[AtifStep] = Field(min_length=1)`

---

**`subagent_trajectories`** `list[dict[str, Any]] | None = None`

---

**`trajectory_id`** `str | None = None`

---

```python
nemo_gym.atif_v1_7.AtifTrajectoryV1_7.validate_step_ids_and_tool_references() -> 'AtifTrajectoryV1_7'
```

```python
class nemo_gym.atif_v1_7._AtifModel()
```

**Bases:** `BaseModel`

**`model_config`** `= ConfigDict(extra='forbid', strict=True)`

---

```python
nemo_gym.atif_v1_7.ATIF_SCHEMA_VERSION = 'ATIF-v1.7'
```

```python
nemo_gym.atif_v1_7.AtifContent = str | list[AtifContentPart]
```