Asapi
The Agent Trials / Tasks / The tea factory's cash desk

Logistics & industry · Task 29 of 34

The tea factory's cash desk

Run a tea factory's cash desk for 13 weeks with only notes for memory, learning what buyers pay and asking the owner for money only when it is truly needed.

Setting
Tea factory, cash desk
Deliverable
A decision every week: offers, auction lots and any request for money
Money judgementLong-horizon judgementUnstated requirementsData quality
5
Models
ran the standard setup
100%
Best score
Opus 5.5
81%
Median score
across those models
9.3 h
Typical run
median time, standard setup

The task

The made-up Leafline tea factory pays its growers within a week and is paid by most of its buyers one to three months later (one buyer pays within a week), some of them habitually late. A bank facility sets how far the account may go below zero, and the owner is the only source of emergency money. The agent covers the cash desk for a quarter, one Monday at a time: from the books, the inbox and the desk's documents, it decides which buyer gets which tea at what price, what goes to auction, and whether to ask the owner for money. Each Monday is a fresh session with only its own notes.

The prompt only asks for a weekly decision that keeps the factory able to pay. The real test is judgement about money over months: learning each buyer's prices, forecasting cash day by day, and asking the owner for money only when the business cannot get through without it, early enough for it to arrive.

What it tests

Money judgement

Every week weighs cash soon against a better price, under a bank limit that must hold on every day.

Judging over the long run

Large payments and slow buyers weeks ahead decide what to do this Monday.

Learning what is never written down

What each buyer will pay shows up only in the books, refused offers included.

Keeping the records straight

Payments have to be matched to invoices to know who is late and who may still buy on credit.

Challenges

1Prices nobody states

Buyers accept or refuse an offer but never say what they would pay, as on a real trading desk.

2Asking is judged both ways

In some versions the owner must not be asked at all; in others the request must come early enough to help.

3A business that moves

A buyer can stop paying or the market can fall, so a forecast made once goes stale.

4No memory

Each Monday starts fresh, so prices, promises and forecasts live only in the agent's notes.

5Standing rules

Some buyers must not be offered tea on credit, and the lists change from week to week.

Results

0%25%50%75%100%StandardOpus 5.5GPT-6.1 SolGPT-6 AstraSonnet 5.5GPT-6 Luna
ModelStandardTime (standard)Cost (standard)
Opus 5.5100%559 min$108.32
GPT-6.1 Sol88%649 min$63.39
GPT-6 Astra81%527 min$332.41
Sonnet 5.562%288 min$53.90
GPT-6 Luna12%693 min$5.00

One run per model and setup. 100% = everything right (or, for a plan scored in money, the best plan); 0% = the obvious answer or worse.

Setups: Standard, the job as asked.

What models got right and wrong

Test environment

Kind
Simulated business: the cash desk of the Leafline tea factory, a made-up factory (the same as in leafline-tea-factory), for 13 simulated weeks, run by a hidden business simulator in the container. 16 versions of the business (8 scenario types, 2 seeds each), each its own run
Agent's interface
A terminal in a fresh Docker container (Ubuntu 24.04, Python 3 with pandas, NumPy and SciPy, the SQLite command line; 2 CPUs, 4 GB), one fresh session per week as an unprivileged user, driven by the agent's own command-line tool through harbor: Claude Code or Codex CLI
Documents
Per version, 11 files in /app: the books (1 SQLite database), 8 Markdown documents (the desk's rules, the factory, the buyers' terms, the supplier agreement, the bank facility, costs, a data dictionary, the decision format), 1 Markdown inbox note for week 1 and an empty work/ folder; 176 files over the 16 versions. Each week the simulator rewrites the books and adds that week's inbox note
Applications
One command, desk: status (the week, the bank balance and limit, whether a decision is in), check FILE (a decision's format) and submit FILE (hand in the week's decision; handing in again replaces it). The SQLite command line and Python's data tools read the books. No other apps
Web
Not needed: nothing the task asks about is online. The container can reach the internet. Claude Code's web page tool (WebFetch) was on for Opus 5.5 and Sonnet 5.5, and neither run used it; Codex's web search was turned off for GPT-6.1 Sol, GPT-6 Astra and GPT-6 Luna
People
None who answer questions. The simulator's code, with no language model, plays 6 private buyers, who send enquiries and accept or refuse each offer by a price of their own that no document states; the auction broker; growers, suppliers and the bank; and the manager and the owner, whose notes arrive in the inbox. The owner pays money asked for into the account some weeks later, up to a cap
Time
13 simulated weeks from a starting Monday between May 2025 and August 2026 that differs by version. Each session is one Monday at 08:00; the week is run when the session ends
Actions
Hand in one decision a week: an offer to each buyer who enquired (grade, kilograms, price), lots for the weekly auction with floor prices, and how much to ask the owner for. Nothing else in the books can be changed
Deliverable
One JSON decision file a week, handed in with desk submit (a week with none handed in runs with no offers, no auction lots and no request); the agent's own notes in /app/work carry over between weeks
All 34 tasks