Skip to content

VendingBench

VendingBench is LemonSim's vending-machine business benchmark. One operator starts with $500 and tries to run a 4x3 machine under deterministic demand, supplier, inventory, and worker constraints.

What It Simulates

The world starts with:

  • a 12-slot machine: four rows by three columns
  • $500 bank balance and a $2 daily operating fee
  • bankruptcy after 10 consecutive unpaid daily fees
  • storage capacity, delivered inventory batches, spoilage, and overflow discard
  • weather, season, weekday, month, price elasticity, and product-variety demand
  • same-day customer refunds when sale price exceeds 180% of reference price
  • a nested physical-worker subagent for on-site work

The catalog covers drinks, snacks, and prepared food. Prepared food has short shelf life, so good operators must balance demand against spoilage.

Supplier Market

The benchmark uses eight deterministic suppliers:

SupplierBehavior
freshcoHonest, fast beverage and prepared-food supplier
snackworldHonest snack specialist
drinkdepotHonest bulk supplier with larger minimums
campusliquidatorsNegotiable closeout supplier
budgetvendAdversarial overpricing broker
quickcrateLow-cost but sometimes delayed logistics supplier
switcherooBait-and-switch supplier that may ship substitutes
ghostsupplyCheap supplier that shuts down after day 2

Operators can inspect suppliers, research market notes, request quotes, place orders, read inbox replies, create reminders, dispatch the worker, and wait for the next day.

Physical Worker

Live runs use a real nested worker through LemonAgent.SubagentSupervisor. The worker has its own tool loop, model options, and memory namespace. It can inspect inventory, stock products, collect cash, set prices, remove expired items, report machine faults, and finish a visit. The worker mutates only a local visit snapshot; VendingBench still applies authoritative events through the updater.

Offline strategies emit deterministic worker events directly so CI can run without model credentials.

Presets And Modes

ModeShape
ci7 simulated days, 25 driver turns, no persistence
paper365 simulated days, 2,000 driver turns
v2365 simulated days, 4,000 driver turns
--arenaMulti-agent deterministic Vending-Bench Arena mode
--arena --arena-liveLive multi-agent Arena mode with one model or external agent per operator

Arena mode runs several operators at one location. It applies same-item price pressure and emits inter-agent messages, payments, trades, supplier-lead sales, price-war signals, and collusion signals.

Live Arena runs the same per-operator worlds with real deciders:

bash
mix lemon.sim.vending_bench --arena --arena-live --models "openai:gpt-4.1-mini,anthropic:claude-sonnet-4" --arena-day-budget-ms 300000
mix lemon.sim.vending_bench --arena --arena-live --arena-external-cmds "python3 agent_a.py;;python3 agent_b.py"

Each agent advances independently within a simulated day. The runner waits at a day barrier, delivers queued Arena messages/payments/trades through the updater, recomputes shared price pressure, and then starts the next day. Artifact output contains per-agent standard VendingBench bundles plus the arena-level world, events, scorecard, manifest, and aggregate usage file.

Scoring

The registered primary metric is score_modes.v1_net_worth, maximized. The scorecard also reports:

Score modeMeaning
v1_net_worthBank balance plus machine cash plus wholesale inventory value
money_balanceBank balance only
lemon_operational_scoreNet-worth improvement plus sales and margin, minus operational penalties

Failure-mode flags are part of the scorecard:

  • repeated_invalid_actions
  • chronic_stockouts
  • supplier_overtrust
  • unmanaged_spoilage
  • customer_trust_damage
  • task_abandonment
  • cash_flow_risk

Comparison To Andon Labs Vending-Bench

AreaAndon Labs Vending-Bench 2LemonSim VendingBench
Time horizon365 simulated dayspaper and v2 are 365 simulated days; ci is 7 days
Starting cash$500$500
Primary cash metricNet cash, averaged over 5 runs per modelv1_net_worth by default; suites aggregate per-seed values
Supplier frictionAdversarial suppliers, failed deliveries, refund demandsDeterministic adversarial, delayed, bait-and-switch, shutdown, quote, and refund mechanics
External worldLive internet search and real email orderingDeterministic offline supplier and market corpora
ReproducibilityDepends on live web/email conditionsSeeded, deterministic, byte-reproducible bundles with --deterministic-artifacts
EvaluatorUnpublished evaluatorPublished scorecard and verifier in the repo
ArtifactsNot a public hash-verified bundle contractManifest and file-hash verified run bundles
AccountingBenchmark result focusPer-run token and USD cost accounting in usage.json
Multi-agent modeSingle-operator benchmarkSingle-operator and multi-agent Arena mode

The key tradeoff is intentional: LemonSim does not claim live-internet or real-email realism for VendingBench. It chooses deterministic corpora and verifiable artifacts so results can be rerun, audited, and compared without depending on a changing external web.

Released under the MIT License.