File size: 13,812 Bytes
9dbe7a5 b8e3338 9dbe7a5 c29c900 b8e3338 4f5b298 b8e3338 4f5b298 b8e3338 4f5b298 b8e3338 4f5b298 b8e3338 4f5b298 b8e3338 9dbe7a5 b8e3338 9dbe7a5 b8e3338 9dbe7a5 b8e3338 9dbe7a5 b8e3338 9dbe7a5 b8e3338 9dbe7a5 b8e3338 9dbe7a5 b8e3338 9dbe7a5 b8e3338 9dbe7a5 b8e3338 9dbe7a5 b8e3338 9dbe7a5 ba0148f 9dbe7a5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | ---
pretty_name: AgentEscapeBench for Harbor
tags:
- harbor
- openenv
- agent-environment
- tool-use
- evaluation
language:
- en
size_categories:
- n<1K
---
# AgentEscapeBench for Harbor and OpenEnv
A private working port of [AgentEscapeBench](https://github.com/AGI-Eval-Official/Repo-of-AgentEscapeBench), pinned to upstream commit `03742c79f48646e0130886e18e3e79798cf8edd7`.
Contains the shared sources for **270 Harbor tasks**, with the original **60 / 60 / 60 / 60 / 30** scenarios at difficulties **5 / 10 / 15 / 20 / 25**. OpenEnv uses the same tasks through its existing Harbor integration. There is no separate native OpenEnv `step()` environment.

*Original framework figure from the [AgentEscapeBench authors](https://github.com/AGI-Eval-Official/Repo-of-AgentEscapeBench/blob/03742c79f48646e0130886e18e3e79798cf8edd7/mian_picture.png), reproduced unchanged.*
## What the environment tests
The agent is placed in a text-based escape room containing unfamiliar tools and items. It must inspect their interfaces, interpret narrative clues, and carry intermediate results through a dependency graph to obtain and submit the victory string. Correct interactions can reveal previously hidden entities, so the agent must track both the information it has collected and the parts of the room it has unlocked.
| Property | Behavior |
| --- | --- |
| Observation | Opening text, initially visible entities, available input values, and the victory node ID; investigations provide interfaces, contents, and clues. |
| Actions | `investigate`, `tool_call`, `use_item`, and `submit_answer`, exposed through the `escape` CLI with JSON responses. |
| Tools | 33 templates present in the corpus, including arithmetic, hashing, encoding, ZIP/JSON/CSV operations, graph algorithms, terminals, and isolated Python execution. |
| Hidden state | Tool/item availability changes as the agent satisfies dependencies and triggers active or investigation-based drops. The full graph and reference values remain in the puzzle service. |
| Success | An exact correct answer submitted through `submit_answer`; obtaining the value without submitting does not finish the episode. |
| Reward | Binary: 1 for successful submission, otherwise 0 for a valid unsuccessful episode. Infrastructure failures are reported separately. |
| Budget | 500 puzzle actions and a 1,200-second agent time limit. Invalid actions count; observation and state reads do not. |
| Runtime | One isolated Docker Compose trial per scenario, with separate agent, puzzle-service, and Python-worker containers, followed by a fresh verifier. |
Difficulty is the number of nodes in the underlying graph:
| Difficulty (nodes) | Scenarios |
| --- | --- |
| 5 | 60 |
| 10 | 60 |
| 15 | 60 |
| 20 | 60 |
| 25 | 30 |
| **Total** | **270** |
Each scenario becomes an independent Harbor task with a stable ID and a self-contained build context. The runtime and action semantics are shared; the puzzle graph, clues, initial information, hidden entities, and victory value vary by task. The figure illustrates the puzzle mechanics; interaction in this port uses text and tool calls.
## Compact source layout
The Hub stores scenario JSON once under `data/questions/`, runtime code once under
`src/agentescape_port/runtime/`, and the shared task generator in `adapter.py`.
`catalog.json` lists the 270 stable task IDs, difficulties, source paths, and scenario
hashes. Generated task copies are local build artifacts, excluded from publication.
No container image registry or published base image is required.
**Compatibility change:** generate task directories before passing them to Harbor
or OpenEnv. Direct `harbor run --repo ...` discovery and downloads restricted to
`tasks/**` no longer work on this layout. Harbor 0.25.0 copies only a selected task
and rejects symlinks outside it; sibling shared-runtime paths would break that
contract. Local materialization produces the same self-contained tasks instead.
Existing consumers can remain on an older immutable revision until migrated.
Shepherd's current Hub-repository configuration also needs a materialization step;
this dataset PR does not change Shepherd's downloader.
## Run a task
Requirements: Linux Docker Engine/Compose, Python 3.13, and `uv`; Harbor is pinned
to **0.25.0**. Rootless Podman also requires a working Compose provider and healthcheck
scheduling. E2B and HF Sandbox do not support this multi-container task layout.
Download a full pinned source revision with an HF account that can read the private
dataset. Set `TASK_REVISION` to the full commit SHA being evaluated:
```bash
export TASK_REVISION="<full-commit-sha>"
uvx --from huggingface-hub hf download \
HuggingFaceSwarms/AgentEscapeBench-harbor \
--repo-type dataset --revision "$TASK_REVISION" \
--local-dir agentescape-snapshot
cd agentescape-snapshot
uv sync --locked --extra harbor
```
Materialize only the task you need, then launch Harbor:
```bash
uv run agentescape-port --task-ids agentescape-25-skeleton-0998524b
uv run harbor run -p generated/tasks -a oracle --env docker -n 1
```
Use `--pilot` for two representative tasks, or omit selection flags to generate all
270. The default output is `generated/tasks`; `--output-dir` selects another local
destination. Generation refuses to replace an existing task unless `--overwrite`
is supplied. Use a fresh output directory when changing selections so an earlier
selection is not accidentally included in a run.
The generator uses only the downloaded source snapshot and Python's standard
library. It does not fetch images or contact a registry. Harbor builds the images
locally when the experiment starts. Each generated task contains all its own build,
solution, and verifier files, so it can also be copied to another machine independently.
The runtime creates `/evidence` during image build, preserving the task's runtime
capability restrictions on rootless Podman.
For a coding agent, replace `oracle` with a supported agent and supply its model
credentials through Harbor. No paid model baseline is claimed.
## OpenEnv
Install its optional dependencies with `uv sync --locked --extra harbor --extra openenv`
and generate tasks first. This checkout pins OpenEnv main to `1e5317e9ebbe016fb9f94e545cf4a996d464e22b` through `uv.lock` and the `openenv` optional dependency. Use a compatible OpenAI-style endpoint and the downloaded task directory:
```bash
uv run openenv harbor info \
--llm-url "$LLM_URL" --dataset ./generated/tasks
uv run openenv harbor rollout \
--llm-url "$LLM_URL" --dataset ./generated/tasks \
--task-index 0 --harness opencode --sandbox docker \
--out rollout.json
```
See [OpenEnv's Harbor reference](https://huggingface.co/docs/openenv/main/environments/harbor) for endpoint authentication and proxy reachability. Plain HF IDs load a floating repository revision in the inspected OpenEnv loader; use the pinned local snapshot for reproducibility.
`tests/openenv_smoke.py` uses the actual OpenEnv rollout implementation, capture proxy, and an explicitly registered validation-only Harbor oracle seam. A scripted localhost model endpoint supplies one acknowledgement per trial, then the oracle solves the puzzle through public actions. Both pilots return `ok=true`, one captured model turn, and reward 1. The expected one-turn warning reflects this scripted test. It does not measure model capability, validate an installed coding harness, or test training-quality token IDs/log probabilities.
## Episode behavior
The agent runs `escape observe`, then uses:
```bash
escape investigate NODE_ID
escape tool-call NODE_ID --arguments-json '{"parameter": "value"}'
escape use-item NODE_ID --arguments-json '{"parameter": "value"}'
escape submit-answer 'exact victory string'
escape state
```
Only exact successful submission earns **1**. An incorrect answer allows retry; revealing or computing the victory value without submitting earns **0**. There is no requirement to visit every node. Infrastructure failure does not become an ordinary zero reward.
Each task permits **500 puzzle actions**, counting invalid actions. Observation/state reads are free. This is an explicit CLI scaffold variant: upstream limits model turns, and one model turn can contain several tool actions. The wall-clock agent limit is 1,200 seconds. Each Python tool execution has a 5-second wall-clock limit, 3-second CPU limit, 256 MiB address-space limit, and 64 KiB code/serialized-output limits.
Original graph, tool, parameter-feedback, revelation, and exact-answer semantics are retained. The wrapper removes internal `_template_id` feedback. It adds terminal episode state and budget enforcement and removes the agent's ability to reset/load arbitrary files or access upstream administrative routes.
Known upstream behavior is preserved:
- Opening narratives live in metadata, but upstream's loader uses a top-level field, so the generic opening is shown. Node-specific narrative clues remain available.
- Terminals expose different output ports for partial versus complete input combinations. The victory value is the first stored reference output port, which need not be the first output returned by a particular call.
- Some stored golden inputs include trigger ports of type `Item`/`Hidden_Item` even though investigation omits those ports. The reference solver supplies those stored inputs. This port does not silently fix that interface inconsistency.
The reference solver uses trusted scenario inputs to choose calls, traverses public puzzle actions, and submits the value returned by the victory port. It never directly sets success or submits a reference answer without obtaining that value through the service. It is a correctness oracle, not an agent baseline.
## Isolation and grading
Each trial has an agent container, a puzzle-service container containing only its scenario, and a Python execution worker. The agent image contains the CLI, not the source graph, references, oracle, or grader. Oracle files are uploaded by Harbor only for oracle trials.
Python executes as an unprivileged child in the read-only worker container, with no scenario files or server module. A seccomp filter blocks sockets, process-memory inspection, and namespace/mount operations. The worker and puzzle service use an internal network unavailable to the agent. The worker receives only the code string, never reference values or credentials.
The service stores outcomes and traces on its own filesystem. Harbor stops the agent, invokes an export inside the service, collects service-scoped artifacts, and grades them in a fresh verifier container. Agent-created files at the same apparent container paths are not accepted as service evidence. Missing evidence or an unavailable service fails verification instead of fabricating a score.
Agent egress remains available for coding-harness/model compatibility. The original answers are publicly available upstream; this packaging prevents local answer-file exposure, but does not prevent an agent downloading public answers or using memorized data. Controlled evaluations should configure Harbor's agent-phase network allowlist for their model/proxy endpoint. No claim of contamination resistance is made.
## Validation
```bash
uv run pytest -q
uv run agentescape-port
uv run agentescape-port --pilot --output-dir pilot-tasks
uv run python tests/corpus_docker.py
uv run python tests/openenv_smoke.py
uv run harbor run -p pilot-tasks -a agentescape_port.testing:ForgeAgent --env docker -n 2
```
The reports below describe earlier expanded releases, not a fresh run of the
compact layout. Validation of this layout is recorded in the pull request description.
See `reports/validation-summary.json` for historical results and scope. A cold download of revision `10499427e61ddd71f02c3c59995a12923f87d6e0` matched all 6,481 task-file hashes, exposed all 270 tasks, and passed both OpenEnv/Harbor pilots with scripted text capture. Those cold pilots also checked the agent CLI, invalid-node feedback, and incorrect-answer retries. Corpus validation covers all 270 scenarios and all 33 tool templates through the upstream-backed facade, with Python actions in Docker. It is not 270 independent Harbor container trials. Full Harbor and OpenEnv pilot trials separately test their lifecycle and verifier paths. The forgery agent must receive reward 0.
Do not treat the original scenarios as independent training and test splits. This release retains the original evaluation corpus and difficulty groups.
## Provenance and license status
Original benchmark: Zhengkang Guo, Yiyang Li, Lin Qiu, Xiaohua Wang, Jingwen Xv, Dongyu Ru, Xiaoyu Li, Xiaoqing Zheng, Xuezhi Cao, and Xunliang Cai, *AgentEscapeBench: Evaluating Out-of-Domain Tool-Grounded Reasoning in LLM Agents* (2026). [Paper](https://arxiv.org/abs/2605.07926), [source](https://github.com/AGI-Eval-Official/Repo-of-AgentEscapeBench).
`server.py`, `models.py`, and `simulator.py` are vendored unchanged at the pinned revision; hashes are recorded in `source-lock.json`. Scenarios are copied unchanged. The original README is preserved at `data/UPSTREAM_README.md`.
The upstream README declares MIT but its referenced LICENSE file is absent from the pinned source archive. This private working release preserves that declaration and records the missing notice; it does not invent an upstream copyright/license notice. Clarify the missing notice and data redistribution terms before making the dataset public. New adapter files are offered under `LICENSE.port`; that file does not replace upstream licensing.
This is an independent port, not an official upstream release or an original-model-score reproduction.
|