Inspiration

Small business owners make difficult decisions all the time, usually without the data, tools or spare time that larger businesses have. A café owner might notice long queues on a Saturday and think about adding another barista. But that simple change affects wages, customer numbers, service speed and weekly profit.

These decisions are often made through experience or instinct. Experience is valuable, but it can be difficult to compare several options or understand every trade-off before making a change.

I built Tradeoff Café to explore what this could look like with an agent involved. The owner still decides what matters and sets the boundaries. The agent does the repetitive testing, while the simulator handles the actual calculations.

What it does

Tradeoff Café is a browser-based decision simulator for a fictional café called Wicks Lane Coffee in Marrickville, Sydney.

Owners can adjust:

  • Staff numbers across different days and shifts
  • Menu prices
  • Opening hours
  • Food and drink preparation levels

The application simulates the café minute by minute and shows how those choices affect profit, revenue, queues, customers served, customers lost and waste. Users can save different scenarios, compare them side by side and inspect the calculations behind each result.

The project is not described as AI-powered because the agent does not calculate the answers. The simulation engine owns the numbers. WebMCP simply gives an agent a safe and structured way to operate the same controls available to the user.

Human and agent collaboration

The most important part of the project is the relationship between the café owner, the agent and the application.

The owner provides the real-world judgement. They decide what matters, set non-negotiable limits and lock any settings that should not be changed. For example, the owner might ask to reduce Saturday lunch waits without lowering weekly profit or changing Saturday's opening hours.

The agent handles the repetitive work. It can read the current café setup, test staffing and pricing changes, run simulations, compare the results and save the strongest option.

The application remains the source of truth. It performs every calculation, checks every constraint and records every action. The agent cannot silently replace the café's baseline plan. It can only suggest the change, and the owner must approve it.

This creates a practical form of collaboration: the human provides context and makes the decision, while the agent explores the options and explains the trade-offs.

How I built it

I built Tradeoff Café with Next.js, React, TypeScript and Zustand.

The simulation engine models a representative trading week using seeded, minute-by-minute calculations. It includes customer demand, queue behaviour, staffing capacity, preparation levels, waste, Australian wage assumptions, operating costs and GST. Seeded simulation means the same inputs and seed produce the same results, making comparisons repeatable and easier to trust.

The interface includes editable controls, a visual week board, headline results, comparison charts, a scenario library, an activity log and a Show the working ledger. The ledger explains how revenue, labour, cost of sales, overheads and profit were calculated.

I implemented WebMCP by exposing six tools directly from the webpage:

  • get_cafe_context
  • set_parameters
  • run_simulation
  • read_metrics
  • save_scenario
  • compare_scenarios

These tools use the same store actions as the visible buttons. When an agent changes the roster, the controls, simulation results, charts and activity log all update on the page. There is no separate agent-only calculation or hidden copy of the application state.

Challenges

One challenge was making the café model realistic enough to create meaningful trade-offs. If staffing had no clear cost, the best answer would always be to add more people. If higher prices did not affect demand, the best answer would always be to charge more. I had to balance these relationships so that each decision had both benefits and consequences.

Another challenge was keeping the agent and the user completely synchronized. I solved this by routing both tool calls and interface actions through the same state operations. This means the owner can always see what the agent changed.

Safety and control were also important. The agent must respect locked settings and owner-defined limits. Invalid actions return clear explanations, and changing the baseline requires explicit human approval.

Finally, the results needed to be understandable. A number alone is not enough for a small business owner. The interface therefore shows comparisons, plain-language summaries, likely ranges and a detailed financial ledger.

What I learned

I learned that WebMCP is most useful when it supports human judgement rather than trying to replace it. Agents are good at testing many combinations and handling repetitive work, but the owner understands the business, its customers and its real-world constraints.

I also learned that trust depends on visibility. Users should be able to see what changed, why it changed and where every result came from. Giving an agent tools is only part of the experience; the actions and outcomes must also remain clear to the person making the final decision.

Tradeoff Café shows how a normal interactive website can become a shared workspace for a person and an agent. The owner makes the decisions, the agent does the legwork, and the simulator keeps them both honest.

Built With

Share this project:

Updates

Submission history