> ## 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.

# Environment Protocol

> Required environment interface for TypeScript

## Interface

```ts theme={null}
interface Environment {
  reset(goal: string): string | Promise<string>;
  step(action: string): StepResult | Promise<StepResult>;
}
```

## StepResult

```ts theme={null}
interface StepResult {
  observation: string;
  done: boolean;
  success: boolean;
}
```

`reset` returns the initial observation. `step` executes an action and returns the result. The environment should store the goal internally for success determination in `step`.
