> ## Documentation Index
> Fetch the complete documentation index at: https://icrl.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# StepContext

> Prompt-formatting context for one step

## Schema

```python theme={null}
class StepContext(BaseModel):
    goal: str
    plan: str
    observation: str
    reasoning: str = ""
    history: list[Step] = []
    examples: list[StepExample] = []
```

## Methods

```python theme={null}
context.format_examples() -> str
context.format_history() -> str
```

Behavior includes built-in truncation and limits to reduce prompt blowups.

Related model:

```python theme={null}
class StepExample(BaseModel):
    goal: str
    plan: str
    observation: str
    reasoning: str
    action: str
    trajectory_id: str
    step_index: int
```
