Download README.md from HuggingFaceSwarms/AgentEscapeBench: direct link, hf CLI and curl.
- Browser
- Download file 13.5 kB
-
https://huggingface.co/datasets/HuggingFaceSwarms/AgentEscapeBench/resolve/refs%2Fpr%2F2/README.md
- Command line
-
hf download hf://datasets/HuggingFaceSwarms/AgentEscapeBench@refs/pr/2/README.md
-
curl -L -o README.md https://huggingface.co/datasets/HuggingFaceSwarms/AgentEscapeBench/resolve/refs%2Fpr%2F2/README.md
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, pinned to upstream commit 03742c79f48646e0130886e18e3e79798cf8edd7.
Contains 270 runnable 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, 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.
Run a task
Requirements: Linux Docker Engine, Docker Compose, Python 3.13, and uv. The tested Harbor version is 0.25.0. Docker is the supported sandbox; E2B and HF Sandbox do not support this task's multi-container layout.
Launch directly from Hugging Face
No repository checkout is required. Authenticate Git access with an HF account that can read the private dataset:
uv tool install --python 3.13 'harbor==0.25.0'
uvx --from huggingface-hub hf auth login --add-to-git-credential
harbor run \
--repo https://huggingface.co/datasets/HuggingFaceSwarms/AgentEscapeBench-harbor \
--include-task-name '*agentescape-5-skeleton-032856e7' \
--agent oracle \
--env docker \
--jobs-dir results/agentescape
harbor view results/agentescape
Remove --include-task-name to run all 270 tasks. No --dataset flag is needed: Harbor discovers the repository's tasks/ directory directly. To pin the task artifacts, append @10499427e61ddd71f02c3c59995a12923f87d6e0 to the --repo URL.
Launch from a local checkout
From this repository checkout:
uv sync --extra harbor --extra hub --extra openenv
uv run agentescape-port --pilot --output-dir pilot-tasks
uv run harbor run -p pilot-tasks -a oracle --env docker -n 1
The source distribution includes all 270 generated tasks under tasks/; running the generator is optional. --pilot produces an item-chain task and a 25-node Python-execution task. Generate the entire suite with uv run agentescape-port --output-dir tasks; pass --overwrite only when replacing previously generated output intentionally. The generator requires this source checkout, including data/ and runtime-requirements.txt.
For an actual coding agent, replace oracle with a supported Harbor agent and specify its model, for example:
uv run harbor run -p tasks -a claude-code -m anthropic/claude-sonnet-4-6 --env docker -n 1
The model command is illustrative; no paid model baseline or original-paper score reproduction is claimed. Agent model/API credentials are configured through Harbor, outside the puzzle and code-worker services.
Download a pinned HF release
The dataset is private at HuggingFaceSwarms/AgentEscapeBench-harbor; authenticate with an account having access. Choose a full HF commit SHA from the repository history:
from huggingface_hub import snapshot_download
snapshot_download(
repo_id="HuggingFaceSwarms/AgentEscapeBench-harbor",
repo_type="dataset",
revision="10499427e61ddd71f02c3c59995a12923f87d6e0",
local_dir="./agentescape-snapshot",
allow_patterns=["tasks/**"],
)
Using local_dir gives real files suitable for Harbor uploads. Run the downloaded suite with:
uv run harbor run -p ./agentescape-snapshot/tasks -a oracle --env docker -n 1
All runtime files required by each task are inside that task. No development package, sibling task, source-repository checkout, or top-level shared runtime is needed inside the sandbox.
OpenEnv
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:
uv run openenv harbor info \
--llm-url "$LLM_URL" --dataset ./agentescape-snapshot/tasks
uv run openenv harbor rollout \
--llm-url "$LLM_URL" --dataset ./agentescape-snapshot/tasks \
--task-index 0 --harness opencode --sandbox docker \
--out rollout.json
See OpenEnv's Harbor reference 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:
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_Itemeven 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
uv run pytest -q
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
See reports/validation-summary.json for measured 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, source.
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.
