Methodology

How the benchmark works.

See how StackBench prompts, tests, and scores each agent.

01Prompt

Prompting the agent

StackBench tasks the agent with building a production-quality store. The prompt contains the features to build, the starting catalog, the stack setup, and the IDs for the store’s buttons and fields (so the automated tests can find them). Each feature is a short description like this one.

Prompt
## Cart

A signed-in customer has one cart. They can add an item,
change its quantity, remove it, and see the total. Adding
the same item again increases the existing line quantity.

Every stack gets the same feature list and its own stack setup, which holds the stack’s connection details, start command, and documentation. Stacks that are newer and less represented in model training also get SDK skills in their setup.

Feature listSpacetimeagent + storePostgreSQLagent + storeMongoDBagent + storeFeature listSpacetimeagent + storePostgreSQLagent + storeMongoDBagent + store
02Build

Building the store

Each agent works in its own sandbox and chooses its own libraries and architecture. StackBench organizes the store’s features as a dependency graph, where passing a feature unlocks the features that depend on it. If a feature fails, the features that depend on it stay locked. For example, passing Cart unlocks Checkout, and failing Profile leaves Saved address locked. In this version of StackBench, an agent has one attempt at each feature.

AccountsCatalogProfileCartSaved addressCheckoutblocked, scores zeroAccountsCatalogProfileCartSaved addressCheckoutblocked, scores zero
03Grade

Testing the store

StackBench tests each feature automatically. It signs in with customer and staff accounts, interacts with the store’s pages through an automated browser, sends requests straight to the server, restarts the server, and reads from and writes to the database. Some checks test what the feature list asks for, while others test how the store holds up in production, like the five below.

Live updates

A customer buys an item while a staff member has the same item’s page open. The staff member’s page must show the lower stock without a reload.

Browser 1: customerDesk Lampin stock54BuyBrowser 2: staffDesk Lampin stock54updated live54databaseCheck passedBrowser 1: customerDesk Lampin stock54Buy54databaseBrowser 2: staffDesk Lampin stock54updated liveCheck passed

Concurrent purchases

Six customers try to buy the last three units of an item at the same moment. Exactly three purchases must go through, and the other three customers must be told the item is sold out.

Buyer 1Order placedBuyer 2Sold outBuyer 3Sold outBuyer 4Order placedBuyer 5Order placedBuyer 6Sold outDesk Lampin stock303 orders, stock 0Buyer 1Order placedBuyer 2Sold outBuyer 3Sold outBuyer 4Order placedBuyer 5Order placedBuyer 6Sold outDesk Lampin stock303 orders, stock 0

Restarts

A staff member schedules a restock for later, and StackBench restarts the server before the restock is due. The restock must still arrive on time and only once.

Restock+10 at 09:00BackendrunningrestartingrunningDesk Lampin stock515scheduledbackend restartsrestock dueApplied once, after restartRestock+10 at 09:00scheduledBackendrunningrestartingrunningbackend restartsDesk Lampin stock515restock dueApplied once, after restart

Permissions

StackBench signs in as a customer and tries a staff-only action, such as shipping an order. The server must refuse it and leave the order unchanged.

Customer sessionsigned in as annship orderServerrefusedDatabaseorder: pendingRefused, order unchangedCustomer sessionsigned in as annship orderServerrefusedDatabaseorder: pendingRefused, order unchanged

Reconnection

A customer has an item’s page open when the page loses its connection. While it is offline, StackBench changes the item’s stock directly in the database. When the connection returns, the page must show the new stock without a reload.

Browser: customerDesk Lampin stock10052offlineback onlineBack-office scriptwrites stock directly10052databaseSame page shows 52 after reconnectBack-office scriptwrites stock directly10052databaseBrowser: customerDesk Lampin stock10052offlineback onlineSame page shows 52 after reconnect
04Score

Scoring the runs

A feature passes only when all of its checks pass, and a locked feature counts as failed. A model’s score on a stack is the percentage of features that pass. Cost is the average spend on model usage per run.

Cartone check fails, so the feature fails23 of 27 features pass85.2%Cartone check fails, so the feature fails23 of 27 features pass85.2%