--- tags: - rl-environment - agentenv license: apache-2.0 configs: - config_name: bookstack_tasks data_files: - split: train path: tasks/bookstack.parquet default: true - config_name: bookstack_episodes data_files: - split: train path: episodes/bookstack.parquet --- # bookstack bookstack An [AgentEnv](https://www.agentenvframework.com) bundle with its recorded runs, published with [agentenv-hf](https://github.com/earakely-scale/agentenv-hf-plugin). ## Tables - `bookstack_tasks`: one row per task of the bundle, with its prompt, envs, verifiers and steps. - `bookstack_episodes`: one row per recorded run, with its status, model, reward and scores, the prompt and response, and the agent's transcript as chat `messages` when its trajectory format is one agentenv-hf reads. `raw/bookstack.jsonl` holds each run's record and native trajectory, and `bundles/bookstack/` the bundle itself. ## Run it ```bash pip install agentenv-framework huggingface_hub hf download earakely-scale/BookStackEnv-REA --repo-type dataset --local-dir agentenv-dataset agent-env run agentenv-dataset/bundles/bookstack ``` # BookStack on AgentEnv, from a REA capture **What this is.** A replay environment of **BookStack 26.09.1** (MIT), built from one recorded browser session against a self-hosted instance seeded with synthetic data. [REA](https://github.com/morluto/rea) projected the capture into an **environment manifest** (31 tools), and `rea environment-export` wrote the bundle you can run from this dataset. Every tool call replays a retained record from the capture, cites the record and the Evidence it came from, and nothing executes BookStack. Tasks are graded deterministically, with no judge. ## What's in it - **31 tools** (27 GET, 2 POST, 1 DELETE, 1 PUT) over 65 recorded exchanges on `http://127.0.0.1:3219`; no recorded group excluded. - **Path parameters**: 14 `numeric`. REA's four format rules (numeric, uuid, hex, iso-date) applied unconditionally; the three opt-in rules (`after-uid-literal`, `opaque-token`, `sibling-variance`) were requested and are labelled per parameter. With the four format rules alone the manifest has 31 tools. - **Unknowns** the manifest states explicitly: authorization model, response semantics beyond recorded exchanges, state transitions between tools. - **12 retrieval tasks** (`evals/bookstack-retrieval.toml`): each asks one factual question about a seeded object, with a distinct answer that the app does not ship by default, answerable through a recorded exchange; reward 1 if the response contains the recorded value, else 0. Plus `smoke`, which deploys the environment and checks replay through the MCP endpoint. - **24 recorded episodes** by `openai/gpt-oss-120b:groq`, `zai-org/GLM-5.3-Flash:zai-org` through the Hugging Face router, with their chat transcripts. - **Provenance**: capture `ev_07a98c12a171833f8ca00f5f4769a165b358a5e2cca784718af469fc35ee5b77` (scoped HAR sha256 `1f807d4d2d2ef490cdc5cac50ffcbf573abfc967351038256b92e18f4ebe5366`, 127,666 bytes), manifest view `ev_47deffa8044f6f1c6835193c59746931187576db6b1c0cc367b7c4380714c322`, confidence `inferred`, authority `historical-reference`. The REA build is a prerelease of the environment commands proposed upstream in morluto/rea#4954, #4955, #4975 and #4999; the bundle installs it from the tarball it ships, so the environment runs without waiting for an npm release. ## What replay means, and does not A tool call returns the recorded response whose path and query values best match the arguments, with `replay.exact_match` telling you whether it matched exactly or fell back to the closest record. Reads of seeded objects behave like the application. Writes return the recorded answer of the one write the session made, and the environment has no state: a created object does not appear in a later list. This is what makes retrieval tasks hard-gradable and write tasks weak; the manifest's `unknowns` say so. ## Tasks and grading | task | tool | arguments | field | answer | |---|---|---|---|---| | `qa-01-get_pages_by_id` | `get_pages_by_id` | id=17 | `name` | `January Tide Readings` | | `qa-02-get_content_permissions_page_by_id` | `get_content_permissions_page_by_id` | id=21 | `owner.slug` | `mina-okafor` | | `qa-03-get_content_permissions_book_by_id` | `get_content_permissions_book_by_id` | id=3 | `owner.name` | `Rui Castellanos` | | `qa-04-get_books_by_id` | `get_books_by_id` | id=2 | `shelves[0].slug` | `lighthouse-rota-handbooks` | | `qa-05-get_search_chapter_by_id` | `get_search_chapter_by_id` | id=12, query=terrace | `data[0].name` | `Terrace Seven Tally` | | `qa-06-get_chapters_by_id` | `get_chapters_by_id` | id=11 | `owned_by.slug` | `ada-finch` | | `qa-07-get_shelves_by_id` | `get_shelves_by_id` | id=7 | `books[0].slug` | `quarry-audit-manual` | | `qa-08-get_attachments_by_id` | `get_attachments_by_id` | id=2 | `name` | `Terrace Seven Survey Sheet` | | `qa-09-get_users_by_id` | `get_users_by_id` | id=3 | `email` | `ada.finch@example.test` | | `qa-10-get_search_book_by_id` | `get_search_book_by_id` | id=1, query=wick | `data[0].name` | `Wick and Lens Care` | | `qa-11-get_roles_by_id` | `get_roles_by_id` | id=5 | `display_name` | `Tide Clerks` | | `qa-12-get_shelves` | `get_shelves` | no arguments | `data[0].name` | `Lighthouse Rota Handbooks` | ## Episodes | model | tasks | passed | pass rate | mean tool calls | mean input tokens | |---|---|---|---|---|---| | `openai/gpt-oss-120b:groq` | 12 | 12 | 100% | 1.0 | 6,712 | | `zai-org/GLM-5.3-Flash:zai-org` | 12 | 12 | 100% | 1.0 | 8,567 | Every episode is in the `episodes` config with its transcript; rewards are the deterministic verifier scores. Every recorded episode passed. ## Run it yourself ```bash uv tool install agentenv-framework --with 'agentenv-hf @ git+https://github.com/earakely-scale/agentenv-hf-plugin@v0.3.0' agent-env hf run earakely-scale/BookStackEnv-REA --bundle bookstack --task smoke # Docker, no model agent-env hf run earakely-scale/BookStackEnv-REA --bundle bookstack --eval bookstack-retrieval --model openai/gpt-oss-120b:groq ``` The retrieval eval needs a model endpoint: set `[model] base_url` and `api_key` in `.agentenv/config.toml` (the Hugging Face router works with any `hf_` token). The bundle's `agents/replay-qa` is a small OpenAI-compatible tool-calling agent; any A2A agent can replace it. ## How it was made 1. BookStack ran in Docker on a throwaway VM, bound to loopback, seeded through its own API with synthetic records (2 roles (Tide Clerks, Quarry Auditors), 3 users besides the renamed admin (Ada Finch, Rui Castellanos, Mina Okafor), 3 shelves, 5 books, 5 chapters and 8 pages with tags, 2 link attachments, 2 page comments, and 9 items handed to other owners); people and projects are invented. 2. Playwright drove a login, the main pages and a scripted read, write, read sequence through the app's JSON API; the HAR was scoped to the API, the login exchange dropped, secret-looking body fields scrubbed, headers and cookies removed. 3. `rea inspect-web-network-capture` retained the exchanges as Evidence; `rea inspect-analysis-view` projected the `environment-manifest` view; `rea environment-export` wrote this bundle; `gen_tasks.py` derived the retrieval tasks from the manifest and the recorded bodies; `agent-env run` recorded the episodes; `agent-env hf publish` wrote this dataset. Scripts: https://github.com/earakely-scale/rea-environments. ## Compared with PortSimEnv on AgentEnv | | PortSimEnv-AgentEnv | BookStack (this dataset) | |---|---|---| | Environment | A simulation: a container quay, ships, cranes, weather, with A2A ship agents | A replay of a real application's API, captured from one session | | Observation | Tool results computed by the simulator as the week unfolds | Recorded responses, cited to Evidence | | Action space | Planning tools (`check_plan`, `confirm_berths`, `advance`, `message_agent`) | 31 tools mirroring the application's endpoints | | State | Full: a virtual clock, triggers, frozen windows, agents that answer | None: every call is independent; writes replay one recorded answer | | Reward | Deterministic, against a CP-SAT optimum or a re-planner anchor; continuous 0 to 1 | Deterministic, recorded-value match; 0 or 1 per task | | What it measures | Planning under uncertainty and negotiation | Tool discovery, parameter inference and faithful retrieval in a real API | | Data provenance | Real 2024 port calls and weather; simulated workloads | Synthetic seed data on a self-hosted BookStack; nothing real | | How it was built | Hand-written plugin, months of work | Generated from a capture in one scripted pass | | Where it is strong | Long-horizon decisions with hard rewards | Breadth: any app you can capture becomes an environment | The two are complementary: PortSimEnv shows what a hand-built simulation can grade; this dataset shows how far a capture alone gets you, and the manifest's `unknowns` list exactly what a stateful version would still have to specify. ## Licence and credits Bundle code and tasks: Apache-2.0. Recorded content: responses generated by a self-hosted BookStack instance over synthetic data; BookStack is MIT software by Dan Brown and the BookStack project contributors and is not redistributed here beyond the recorded JSON responses. REA is MIT software by morluto; AgentEnv Framework is Apache-2.0 by Scale AI.