# Inspect Steward > An agent that supervises evaluations, monitoring progress, diagnosing problems, and adjusting runtime state on your behalf. # Inspect Steward ## Overview Welcome to Steward, a system for automated execution and supervision of long-running evaluations. Steward enables you to launch a large run and walk away while a coding agent monitors it. Here’s how it works: 1. Define your eval set and policies that will govern the run (Steward works with [eval_set()](https://inspect.aisi.org.uk/reference/inspect_ai.html#eval_set) as well as with execution frameworks like [Inspect Flow](https://meridianlabs-ai.github.io/inspect_flow/) and [Inspect Hawk](https://hawk.metr.org)) 2. Launch the eval set for unattended execution. Let standing policies and agents handle tuning and errors whenever possible. Receive notifications whenever something needs your attention and make whatever decisions are required. 3. At the end of the run, make final judgements about how to score anomolies and then signoff the completed run. [![](diagrams/workflow.excalidraw.svg)](diagrams/workflow.excalidraw.svg) ## Quick Tour ### Setup First, install Steward from PyPI with: Terminal ``` bash pip install inspect_steward ``` To use Steward, create a directory, switch to it, then call `steward init`: Terminal ``` bash mkdir -p ~/runs/swe-evals cd ~/runs/swe-evals steward init ``` This will scaffold up a Steward workspace with a placeholder `evalset.py`, a `_steward.yaml` for your standing rules, and an `AGENTS.md` file that teaches the agent how to use Steward to run an evaluation. First, define your eval set: evalset.py ``` python from inspect_ai import eval_set from inspect_harbor import cais_swebenchpro, datacurve_deep_swe eval_set( tasks=[cais_swebenchpro(), datacurve_deep_swe()], model=["openai/gpt-5.6-sol", "anthropic/claude-opus-5"], ) ``` Steward can manage any evalution defined with a script that ends in a call to [eval_set()](https://inspect.aisi.org.uk/reference/inspect_ai.html#eval_set) or alternatively a `config.py` from [Flow](https://meridianlabs-ai.github.io/inspect_flow/) or a `hawk.yaml` from [Hawk](https://hawk.metr.org). > **NOTE: NoteLog Directory** > > One other thing you should typically define up front is a root directory for eval logs. If you define the `STEWARD_LOG_ROOT` environment variable then a `log_dir` matching the workspace directory name will be automatically created and used for your eval set. For example: > > .env > > ``` ini > STEWARD_LOG_ROOT=s3://inspect-logs > ``` ### Run the Eval Next, launch your coding agent from the workspace and tell it to run the evaluation (you should typically run from a [tmux](https://github.com/tmux/tmux/wiki) detached terminal so the agent is persistent): Coding Agent ``` bash ───────────────────────────────────────────── swe-evals ─ ❯ please run this evaluation. ───────────────────────────────────────────────────────── ``` The agent will launch all of the tasks, setup a background monitoring process, and respond to alerts that require its intervention. From here you can detach and walk away. > **NOTE: NoteNotifications** > > To be notified when things require your attention, we strongly recommend you also configure a notification channel. Put it in `_steward.yaml`, or — to keep the token out of your repository — in your `.env` file: > > .env > > ``` ini > STEWARD_NOTIFICATION=slack://{OAuthToken}/{ChannelID} > ``` > > See [Notifications](./workflow.html.md#notifications) for more details on configuring notifications for various targets including Slack, Email, and others. The run depends on neither you nor the agent staying connected. When you come back, ask how it’s going: Coding Agent ``` bash ───────────────────────────────────────────── swe-evals ─ ❯ how is the eval going? ───────────────────────────────────────────────────────── ``` The agent reports where the run stands: per-task progress, what it resolved on its own while you were gone, and anything that is waiting on a decision from you. ### Make Decisions Runs rarely go perfectly, and the questions that survive the agent’s own judgement come back to you. For example, the agent might prompt. you with this when you check in: Coding Agent ``` bash 89 samples in cais_swebenchpro failed with the same sandbox timeout, all inside a 30-minute window last night. Automatic retry has already spent its attempts. re-run them, score them as failed, or exclude them from scoring? ───────────────────────────────────────────── swe-evals ─ ❯ re-run them, the disk issue is fixed ───────────────────────────────────────────────────────── ``` ## Learning More - [Workflow](./workflow.html.md) is the comprehensive guide to a Steward run: the workspace directory, launching and tending runs, agent and human decisions, and how a run ends. - [Concurrency](./concurrency.html.md) describes the various options for tuning concurrency, including automatic ramping behavior and caps on resource utilization. - [Error Handling](./errors.html.md) covers standing policies for error retries and resolution, including dealing with errors that are never resolved. - [Scanners](./scanners.html.md) explains how transcripts are scanned for scoring integrity problems as the run proceeds, and what a finding asks of you. - [Agent Runbook](./runbook.html.md) provides the full operating instructions that coding agents use to supervise and make decisions during runs. Integrations with execution environments are covered in [Inspect Flow](./flow.html.md) and [Inspect Hawk](./hawk.html.md). # Workflow – Inspect Steward ## Overview Steward runs evaluations from a workspace directory that includes the eval-set definition, steward-specific options, a journal of the entire run, and human readable documents on run status. Evaluations are launched as background processes and monitored using a scheduled job, with coding agents and operators proactively notified when they are needed for a decision. We’ll walk through the various phases of the workflow below, then cover [options](#steward-options) you can use to customize Steward’s behavior and other [advanced](#advanced) topics like pausing runs and modifying runs in flight. ## Workspace To create a workspace for an evaluation run, use the `steward init` command: Terminal ``` bash mkdir -p ~/runs/swe-evals cd ~/runs/swe-evals steward init ``` The workspace is initialized with the following files: Workspace ``` text swe-evals/ _steward.yaml # steward specific options AGENTS.md # agent instructions for managing a run CLAUDE.md # agent instructions for managing a run evalset.py # eval-set definition (or config.py / hawk.yaml) journal.jsonl # append-only journal of workspace actions status.md # the operator's page: where the run stands, what waits on them ``` Your eval set definition can be any script which ends with a call to [eval_set()](https://inspect.aisi.org.uk/reference/inspect_ai.html#eval_set) or a [Flow](./flow.html.md) or [Hawk](./hawk.html.md) configuration. For example: evalset.py ``` python from inspect_ai import eval_set from inspect_harbor import cais_swebenchpro, datacurve_deep_swe eval_set( tasks=[cais_swebenchpro(), datacurve_deep_swe()], model=["openai/gpt-5.6-sol", "anthropic/claude-opus-5"], ) ``` Your task before launching is to provide the eval set definition and adjust any settings you need in `_steward.yaml`. The defaults are generally suitable, but be sure to review [Concurrency](./concurrency.html.md) against the specifics of your evals and infrastructure. ## Execution Once you have defined your eval set, use a coding agent to launch the evaluation (you should typically run from a [tmux](https://github.com/tmux/tmux/wiki) detached terminal so the agent is persistent): Coding Agent ``` bash ───────────────────────────────────────────── swe-evals ─ ❯ please run this evaluation. ───────────────────────────────────────────────────────── ``` The agent reads the Steward [runbook](./runbook.html.md) and follows it. It starts with a short smoke run, skipping any task a configured log store already satisfies, to confirm that configuration, infrastructure and model access all work correctly. A failed smoke stops the launch until it is fixed or waived by the user. After the smoke the agent launches the tasks and works the decisions the run raises as the [tend loop](#tend-loop) runs. Keeping the agent attached is recommended but not required. If you detach it, configure [notifications](#notifications) so you know when to reconnect to it. ### Tend Loop As the run proceeds, the `steward tend` command runs on a timer set up by `steward launch`. By default this timer runs every 10 minutes. The tend command performs the following actions automatically: - Spawns or restarts tasks that should be running and are not. - Automatically tunes concurrency based on available sandbox capacity and observed model throughput. - Notes anomalies and other conditions (model or infra errors, stuck samples, scoring integrity issues, etc.) and either handles them automatically or escalates them for agent or human consideration. - Rewrites `status.md` and appends to `journal.jsonl`. Note that you or an agent can call `steward tend` at any time to get the current status of the run. ### Agent Decisions After tend runs, agents call `steward collect`, which reports the open decisions along with everything that has happened since it last looked. The agent handles the following on its own: - Diagnoses errors and groups them into classes, and proposes what should be done about them (re-run, exclude, zero, score, accept, or dismiss) for you to rule on. - Oversees the concurrency ramp, holding the climb when something looks wrong and tuning a worker down while containing an incident. - Raises anything that needs you, and notifies you through the configured channel when it cannot proceed without an answer. - Writes up the overall run investigation in `analysis.md` once the run is complete. ### Human Decisions There are some things within a run that require your judgement or the establishment of a policy that can be applied to all similar judgements. Both `steward tend` and the agent can raise things for human input, asking you to: - Rule on the error classes the agent proposes, choosing to re-run, exclude, zero, or re-score the samples, or to accept or dismiss the class outright. - Answer tool call approvals that have escalated to human review. - Decide what to do with a task that has stalled, or a sample stuck past the point the agent may act on it. - Sign off on the final results after reviewing anomalies and transcript analysis. ### Notifications Steward uses [Apprise](https://github.com/caronc/apprise) for sending notifications to human operators. You can configure Apprise to send Slack messages, emails, AWS SES or SNS messages, or many other types of message. Configure notifications by setting the `STEWARD_NOTIFICATION` environment variable or setting the `notification` option in `_steward.yaml`. For example: .env ``` ini STEWARD_NOTIFICATION=slack://{OAuthToken}/{ChannelID} ``` It is strongly recommended that you configure notifications. If you don’t, you should just reconnect to your agent periodically and ask how things are going: Coding Agent ``` bash ───────────────────────────────────────────── swe-evals ─ ❯ how is the eval going? ───────────────────────────────────────────────────────── ``` Steward notifies you when something needs a decision, when a run finishes, and when it cannot tend at all. In between, it also posts an hourly heartbeat so you know the latest status at a glance. ## Signoff Once all tasks are completed (with errors/anomalies decided on) and their transcripts scanned for scoring integrity issues, the run is eligible for signoff. If you have a coding agent managing the run then it will prompt you for signoff at the appropriate time. If not, you can manually run signoff with: Terminal ``` bash steward signoff --by "norah" ``` Signoff verifies that the run is eligible for signoff, ensures a clean final log directory, finalizes the journal and status, and disarms the tend loop timer. If you have a [Log Store](#log-store) configured, the agent will also ask whether to publish your logs to it — add `--publish` if you want that. ## Eval Logs ### Log Directory Logs are written to `logs/` inside the workspace. Two things can change this: - If your eval set passes a `log_dir` to [eval_set()](https://inspect.aisi.org.uk/reference/inspect_ai.html#eval_set), Steward uses that. - The `log_root` option or `STEWARD_LOG_ROOT` environment variable, for a machine that keeps logs somewhere else (a bigger disk, or an S3 bucket). Steward makes one directory per workspace underneath it. If you want your logs to be durable then we recommend setting `STEWARD_LOG_ROOT` to an S3 bucket or other permanent storage and letting Steward create subdirectories within it for each workspace. ### Log Store A log store lets several workspaces share results, so a task somebody has already run doesn’t run again. Point at one with the `log_store` option or the `STEWARD_LOG_STORE` environment variable: .env ``` ini STEWARD_LOG_STORE=s3://our-bucket/eval-logs ``` The store can be a directory of `.eval` files, or a [Flow](./flow.html.md) store (which requires the `flow` extra). A result is only reused when everything about the task matches: the task and its arguments, the model, the solver, the plan, the generate config, and the limits. Reading from a store happens automatically once you configure one, at launch and in `launch --smoke`, which rehearses only the tasks the store does not satisfy. Publishing your own results into it does not, that only happens if you ask for it at signoff: Terminal ``` bash steward signoff --by "norah" --publish ``` ## Options Steward’s options go in `_steward.yaml` at the root of the workspace, or in the environment as `STEWARD_