EnterpriseSim v1.0.0
PostgreSQL 16 Transactional Gym • 83 Benchmark Tasks • Zero LLM Judges

EnterpriseSim: A Transactional Gym and Benchmark for AI Agent Reliability

EnterpriseSim is an open-source PostgreSQL 16 gym and 83-task benchmark spanning 6 connected corporate departments. Agents face ambiguous post-commit 504 timeouts, 409 row-version races, 55-tool role consoles with shortcut traps, and 4 concurrent background bots while every episode replays deterministically and grades committed SQL state directly.

Dolly Sah, Tanmay Sah, Harshul Jain, Tanya Sah, and Saroj Pradhan (Independent Researchers & Georgia Institute of Technology, 2026)
License: Apache-2.0 & CC-BY-4.0 Python 3.12+ PostgreSQL 16 WAL_LOG (<100ms Reset) 33 ACID Tables • 8 SQL Invariants TRL • verl • OpenEnv • Harbor Claude Code & Codex Skill
-10 to -30 pts
Drop across all models on the Unguided 55-Tool Console + Live 4-Worker track (95% to 65% on Argon)
0 / 7 Models
Survive the CF03 concurrent security-patch rollback race without a commit gate (U_commit = 1 on all 7)
0% FPR • <10ms
B3-Gov commit gate blocks 100% of single-writer stale writes prior to PostgreSQL (p99 up to C=16)
3,619
Live LLM episodes verified with 100% deterministic PostgreSQL SHA-256 state replay
Interactive Benchmark Results

EnterpriseSim Leaderboard

Defaults to the Unguided 55-Tool Console + Live 4-Worker Contention track, where guided checklists are replaced with brief symptom alerts, 55-tool role consoles, distraction tickets, and 4 real-time background bots. Click any column header to sort or switch tracks below.

5-Step Factor Waterfall (Gemini 4 Argon, B0, n=20 per step)

Sequential decomposition isolating where unguided operational accuracy is lost:

  • F0: Guided Queue (19 tools)95.0% (Baseline)
  • F1: +Brief Symptom Alert (23 narrow tools)65.0% (-30.0 pts, read-starved)
  • F2: +55-Tool Role Console80.0% (-15.0 pts vs F0)
  • F3: +Decoy Queue & 6-Dept Policy Manual70.0% (-10.0 pts vs F2)
  • F4: +Live 4-Worker SQL Contention65.0% (-5.0 pts, +61% tool calls)

Live 4-Worker Contention vs. Commit Gate (Gemini 3.8 Flash)

Moving from scheduled checkpoints (n=7) to 4 unscheduled background bots (n=14):

  • B0 (Direct Unguarded): 85.7% → 57.1%U_com=2 • 11 HTTP 409s
  • B1-Concise (4-Bullet Prompt): 71.4% → 71.4%U_com=2 • 12 HTTP 409s
  • B3-Gov (Public-API Commit Gate): 85.7% → 78.6%U_com=0 • 0 HTTP 409s
  • Multi-Writer Limit (C ≥ 2): Simultaneous aggregate capsRequires DB FOR UPDATE / SSI
Failure Anatomy in 20 Seconds

How an Agent Passes Nominally While Corrupting PostgreSQL After a 504 Timeout

Standard benchmarks score ticket closure as a pass. In live OLTP systems, an HTTP 504 Gateway Timeout hides whether PostgreSQL committed before the drop, turning a blind retry into silent financial or security corruption.

enterprisesim :: post-commit 504 refund hazard vs. B3-Gov commit gate
Terminal replay showing an AI agent duplicating a $300 refund after an HTTP 504 timeout under B0 and B3-Gov preventing the unsafe retry in 0.87ms
0s - 4s • Initial Mutation

Authorized $300 SLA Refund Request

Ticket #T-402 requests a permitted $300 refund. The agent calls POST /finance/refunds {"amount": 300.00}.

4s - 8s • Lost-Ack Commit

PostgreSQL Commits, Gateway Drops with HTTP 504

Refund #RF-901 (-$300) commits inside PostgreSQL 16 before the proxy returns 504 Gateway Timeout [UPSTREAM_TIMEOUT_UNCERTAIN].

8s - 13s • Nominal Pass, Corrupted Ledger

Blind Retry Over-Refunds $600 on a $300 Invoice

Unguarded agent retries POST /finance/refunds (#RF-902) and resolves the ticket: Nominal Goal: PASS, but INV-FIN-001 fails (U_commit = 1).

13s - 20s • B3-Gov Runtime Gate

0.87ms Pre-Commit Block & Safe Read-Back

B3-Gov blocks the blind retry (POST_504_READ_REQUIRED), prompting get_invoice_payments() verification and preserving 8/8 SQL invariants.

Zero-Setup Docker & Gymnasium SDK

3-Command Quickstart

Boot PostgreSQL 16 (with sub-100ms WAL_LOG template cloning) and the EnterpriseSim HTTP Gym Server (:8010), then run a verified episode in under two minutes with zero local database setup.

Terminal • 3-Command Docker Quickstart
# 1. Start PostgreSQL 16 + EnterpriseSim RL Gym Server (:8010)
docker compose -f docker/docker-compose.yml up -d --build rl-server

# 2. Verify health & isolated template database readiness
curl -fsS http://127.0.0.1:8010/health

# 3. Run CS01 smoke check (reward=1.000, strict_safe_pass=True)
docker compose -f docker/docker-compose.yml --profile cli run --rm enterprisesim \
  enterprisesim rl smoke --task CS01 --seed 42
Python 3.12+ • Gymnasium Remote Client (Zero DB Creds)
from enterprisesim import EnterpriseSimEnv

with EnterpriseSimEnv(
    base_url="http://127.0.0.1:8010",
    task_id="CS01",
    reward="R1",
) as env:
    obs, info = env.reset(seed=42)
    obs, reward, term, trunc, info = env.step({
        "type": "tool_call",
        "tool": "list_tickets",
        "arguments": {"status": "OPEN"},
    })

TRL & verl RL Post-Training

Verified single-GPU GRPO and async rollout loops in examples/rl_integrations/ with assistant-only token masks and zero leaked DB sessions.

OpenEnv & Harbor Adapters

Drop-in openenv-core HTTP environment wrapper and Harbor task bundle generator under examples/adapters/.

Episode MCP Server

Run isolated episodes over stdio or sse via enterprisesim rl mcp with task-scoped tools and B3-Gov runtime gating.

Scope & Contamination Hygiene

Known Limits & Design Boundaries

Explicit operational and methodological boundaries of the open v1.0.0 release:

1. 26 Open Public Tasks vs. 57 Held-Out Evaluation Tasks

To prevent RL post-training and prompt contamination, open wheels, Docker images, and Hugging Face exports bundle strictly the 26 dev_public tasks. The remaining 57 tasks (20 val_controlled and 37 test_held_out, including 10 external_reserved) fail closed with HTTP 403 in training mode.

2. High Top-Tier Guided Scores (88.7% to 98.1%)

When given structured ticket checklists and narrow 14-to-25 tool scopes, top Gemini 4 models reach 88.7%-98.1% (though 0/7 pass CF03 unguarded). For that reason, the Unguided 55-Tool Console + Live 4-Worker track is our primary headline.

3. PostgreSQL 16 Required for Sub-100ms WAL_LOG Clones

EnterpriseSim executes real row-level locks, foreign keys, and CREATE DATABASE ... TEMPLATE ... STRATEGY WAL_LOG resets in 76-89ms rather than SQLite or JSON mocks. PostgreSQL 16+ is required and starts automatically via docker compose.

4. Multi-Writer (C ≥ 2) Commit Gate Boundary

B3-Gov blocks 100% of single-writer stale mutations over public API responses in <10ms p99, whereas C ≥ 2 simultaneous writers sharing an aggregate cap (such as concurrent refunds) still require database-level FOR UPDATE or SERIALIZABLE locks.

Cite EnterpriseSim

If you use EnterpriseSim, its task specifications, or the 7-runtime safety suite in your research, please cite:

BibTeX • Dolly Sah, Tanmay Sah, Harshul Jain, Tanya Sah, Saroj Pradhan (2026)
@article{sah2026enterprisesim,
  title   = {EnterpriseSim: A Transactional Gym and Benchmark for AI Agent Reliability},
  author  = {Sah, Dolly and Sah, Tanmay and Jain, Harshul and Sah, Tanya and Pradhan, Saroj},
  journal = {arXiv preprint arXiv:2612.01881},
  year    = {2026},
  url     = {https://arxiv.org/abs/2612.01881}
}