Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Grab Engineering 9 min read Case study mediumAdept

Powering AI-led research through simulation

Grab built sim-rs, a self-contained tick-based marketplace simulator that replays a city-day of bookings and drivers through a closed dispatch loop (demand, supply movement, cancellation models, batching, solver-based allocation, recycling) in tens of minutes, with pluggable stages, portable reproducible run packages, and built-in switchback/spatial A/B/n experiments. An autoresearch loop lets agents propose code changes, run them, and keep only those that improve a computed metric and pass checks. To counter specification gaming, the environment enforces immutable core data, metrics the agent cannot redefine, branch-scoped diffs and layered compile and evaluation gates. Across about 150 overnight experiments, agents made driver-eligibility checks roughly 10x and cost adjustment roughly 24x faster, derived a deadline-bounded trip-recycling rule, and help keep the simulator faithful by porting production logic and fitting held-out-validated cancellation models.

Related posts

  • Harness design for long-running apps

    Anthropic Engineering mediumAdept

    A GAN-inspired multi-agent harness separates generation from evaluation so Claude can produce distinctive frontend designs and build full-stack apps autonomously over multi-hour sessions. For frontend work, a generator and a Playwright-equipped evaluator iterate 5-15 times. The evaluator grades against four weighted criteria (design quality, originality, craft, functionality) and is calibrated with few-shot score breakdowns, which pushes output away from generic 'AI slop'. For full-stack apps, the harness has three agents: a planner expands a short prompt into a spec, a generator builds in sprints against negotiated sprint contracts, and an evaluator QA-tests the running app with hard per-criterion thresholds. A retro game maker built this way cost about $200 over 6 hours, against $9 and 20 minutes for a solo agent, and produced dramatically better results; tuning a standalone skeptical evaluator proved more tractable than making a generator critique itself.

  • Agents are users, so your software needs evals

    Vercel mediumAdept

    Agents act as users of APIs, CLIs, MCP servers and SDKs, so measuring whether they complete tasks correctly requires evals: tests run many times and scored. An agentic testing pyramid groups checks by LLM call count (deterministic tests, one-turn evals, E2E evals), and a worked example builds an end-to-end eval for a hypothetical coffee-ordering CLI using Harbor, covering goal setting, task design with seeded environments, frozen clocks and per-constraint verifiers, and guarding against reward hacking. Metric choice should follow failure cost: a 60% success rate yields 99% pass@5 but only 8% pass^5, so products where users get no retry should optimize for pass^k, while coding agents with test feedback can lead with pass@k.

  • How Legora runs 2,000 parallel agent evals on Modal Sandboxes

    Modal mediumAdept

    Legora tests its long-running legal agent by booting the full application, pinned to a specific commit, inside a separate Modal Sandbox for each eval run. A typical experiment is about 2,000 runs (100 cases × 4 harness variants × 5 trials), all executed in parallel. Modal Volumes snapshot world state such as documents, database state, permissions and blobs, and also cache Docker images. An hourly pipeline pre-builds the image and pre-warms Sandboxes, and moving from gVisor to VM-backed Sandboxes let the team delete their Docker networking and FUSE workarounds. Agents now drive the eval CLI to hill-climb the harness, which helped cut agent cost by 30% through smarter compaction and custom tool search.

  • How Ramp built a full context background coding agent on Modal

    Modal easyNovice

    Ramp Inspect, an internal background coding agent, runs each session in a Modal Sandbox containing a full dev environment (Postgres, Redis, Temporal, RabbitMQ, OpenCode, VS Code server, VNC with Chromium) and now starts roughly half of merged pull requests at Ramp. Fast startup comes from a cron job that clones repos, installs dependencies and builds every 30 minutes, saving diff-based filesystem snapshots so sessions begin from a near-current state in seconds. Modal Dicts handle session locks and image metadata, and Queues route prompts from Slack, web and Chrome extension clients into shared multiplayer sessions, letting the system scale to hundreds of concurrent isolated sessions.

  • Deterministic AI Testing with Session Recording in cagent

    Docker mediumAdept

    cagent's session recording applies the VCR pattern to AI agents. It proxies requests to the model provider, saves each request/response cycle to a YAML cassette, and replays matching requests from that file, so test runs are deterministic, cost nothing in API calls and finish in milliseconds. The --record and --fake flags support CI testing without API keys, cheap prompt iteration against one recording, sharing reproducible bug reports, and capturing multi-agent delegation. Tool call IDs are normalized so replay matching works, and auth headers are stripped so cassettes can be committed to version control.

The quest for software engineering knowledge.

Look:
Layout: