Skip to content

About

A runnable sample RL environment: an accounts-payable exception queue with a state-based grader and regression cheats that must fail.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Holdout · Accounts Payable Exception Queue · public demo

A runnable sample of Holdout's accounts-payable environment: five synthetic tasks (seed 1, one per task family), the 17-tool interface, the state-based grader, the harness that runs an agent against them, and the scripts that check the grader and the harness. Version in VERSION.

This is a public sample, not a held-out evaluation set

The answer keys and the grading files are in this folder, and anyone, including any model's training data, may have seen them. Use it to inspect the work and to check that your agent harness connects. Do not report results on these tasks as an evaluation. Evaluation cases for a pilot will be built privately, never published, and graded outside the agent's runtime.

Run it

Python 3.9 or later. Nothing to install.

python run.py          # reference solutions (all pass) and a naive example agent (fails)
python selftest.py     # cheats against the harness itself; all must fail
python validate.py     # the seed-1 grader validation: shortcuts fail, alternative solutions pass

run.py prints the checks each run passed or failed.

Test your own agent

Copy example_agent.py, write your own act(tools, brief), then:

python run.py --agent my_agent.py
python run.py --agent my_agent.py --task T1-duplicate_seed1 --checks

What the agent gets:

brief Plain data: task_id, title, instruction, queue, policy and tools (the 17 tool specs).
tools.call(name, **args) Call a tool. Results are JSON data. Refused calls return {"ok": False, "error": ...}.
tools.specs The same tool specs as brief["tools"].

To test a language model, translate brief["tools"] into your provider's tool format and forward each tool call to tools.call. Grading reads the final state of the records, never the agent's explanation.

How the agent is isolated. run.py starts each agent run in a separate Python process (holdout_ap/agent_host.py, started with python -I in an empty temporary folder). That process receives the brief and a tools object whose call() sends a JSON request back to the runner. The records, the task, the grading data, the call log and the starting state the grader compares against live only in the runner's process. The runner reads every task and grading file before any agent code runs, so editing those files during a run changes nothing. Anything the agent prints goes to stderr. Each task has a time limit (--timeout, default 900 seconds).

What it does not do. It is a process boundary, not a sandbox. Agent code runs with your user's permissions and can read any file you can, including grading/ and answer_keys/ here, which are public by design. An agent that reads them can pass; selftest.py shows this as a known limit. Run agent code you don't trust in a container or a VM.

Check the harness: selftest.py

Runs regression cheats (in selftest/) against the shipped harness and, for comparison, against a reproduction of the v0.1 harness, each in a fresh temporary copy of this folder. Every cheat must fail on the shipped harness, and must work on the v0.1 reproduction, so each test is shown to detect the bug it guards against:

  1. read the reference actions off the environment object and replay them;
  2. resolve correctly, write off the remaining balances, then overwrite the grader's starting snapshot;
  3. the same, plus a direct edit of an unrelated vendor's bank details;
  4. rewrite the grading files on disk so later tasks are graded against nothing.

Cheats 2 and 3 must pass exactly the tasks that the same write-off passes with no tampering (one task, T3, where the queue holds no invoice to write off). Reference solutions must pass all five tasks and the naive example agent none.

Reproduce the seed-1 validation: validate.py

Runs the reference solution, six scripted shortcut strategies, a blind positional guess and four alternative valid solutions on each seed-1 task, and prints every score. On this sample it should print: references 5/5, shortcut runs 0/30, positional guesses 0/5, alternatives 20/20.

It covers seed 1 only. The website's figures (0 of 150 shortcut runs and 100 of 100 alternatives over seeds 1–5; longer runs over seeds 1–200) need the task generator, which is private, so they can't be rerun from this folder. It does not run any model, and the strategies are regression tests for known failure modes, not proof that nothing else passes.

What is in the folder

Path What it is
tasks/ What an agent may see: instruction, queue, policy, tool specs and the full initial state of the company.
grading/ Grader-only: the checks for each task, which records may change, and the reference actions. Public in this sample; keep them away from your agent.
answer_keys/ The expected resolution in plain language, for human reviewers.
holdout_ap/ The environment (env.py), grader (grader.py), check definitions (checks.py), ledger (ledger.py), the runner side of the harness (__init__.py, harness.py) and the agent side (agent_host.py).
run.py, example_agent.py The runner and a starting point for your own agent.
selftest.py, selftest/ Cheats against the harness, which must fail.
validate.py The seed-1 validation of the grader.
VERSION, LICENSE Sample version; MIT licence.

How grading works

A task passes only if every check passes: the task's own checks, plus four integrity checks on every task. Nothing outside the queue items changed. No debit memo or write-off unless the policy requires one. Vendor bank details were not edited. Every payment went to the vendor's verified account. The "nothing changed" and "no write-off" checks compare the final records with a copy of the starting records that the runner takes before the agent starts and never shares.

Found a way to pass without doing the work?

Open an issue with the strategy and the task, or email [email protected]. Reading the public grading files doesn't count; that limit is stated above. We credit reporters in CHANGELOG.md.

Version history

  • 0.2.0 (2026-10-22): the agent runs in a separate process and gets only the brief and tools.call(); the runner keeps the records, grading data and starting snapshot, and reads all task files before any agent runs. Agents now define act(tools, brief); agents written for 0.1 that only used env.call(...) keep working unchanged. Tool calls with bad argument values return an error instead of stopping the run, and search_vendors(name=...) now works through call(). Added selftest.py, validate.py, VERSION and an MIT LICENSE.
  • 0.1 (2026-10-21), affected: the agent ran in the runner's process and received the environment object, so it could read the reference actions, overwrite the grader's starting snapshot, edit records without a tool call, or rewrite grading files that later tasks read. Don't use it to test agents.

Limits

Five tasks from one seed. A tool interface only, no browser UI. Synthetic, US-style accounts payable; Halvorsen Distribution Co. and its vendors are fictional. Not yet reviewed by an AP practitioner. No model results are included.

Questions: [email protected] · https://holdout.cc/environments/accounts-payable/

About

A runnable sample RL environment: an accounts-payable exception queue with a state-based grader and regression cheats that must fail.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages