Problems / AI systems, hard

Agent: a slow tool and a tight quota

An agent takes 6 steps per task at 15 tasks a second. Every step calls a tool server with 8 slots that takes 300 ms, and the model allows 4,000 requests a minute.

Free to open. Runs in your browser, no sign-up.

Your goals

Success ≥ 97%, p99 ≤ 30 s.

The traffic

15 requests a second for 60 seconds: 100% task (reads).

The system

What each component does in this design, and what calls it. The simulator mimics each one from these settings.

ComponentIts job hereSettings
API gatewayAPI gatewayTraffic enters here.Calls Agent orchestrator.Gateways centralise auth, rate limits and routing so each service does not reimplement them.100000 slots · 600,000 calls/min
Agent orchestratorAgent orchestratorAPI gateway forwards to it.Calls LLM endpoint, Tool server.An agent loops: think, call a tool, read the result, repeat until done.300 slots · 6 steps
Tool serverTool / MCP serverAgent orchestrator calls it.Tools give the model actions such as search or database queries; each call is another round trip.8 slots
LLM endpointLLM endpointAgent orchestrator calls it.Latency has two parts: time to the first token, then a steady stream of tokens per second.120 streams · 4,000 calls/min

Hints

Try it first. Open one hint at a time if you get stuck.

Hint 1

Calls a second on every tool and model = tasks × steps: 90 a second here.

Hint 2

90 × 60 = 5,400 model calls a minute against a 4,000 quota; 90 × 0.3 s = 27 tool slots against 8.

Hint 3

Raise the model quota (or cut steps), and give the tool server more capacity.

One way to solve it

Raise the model request quota (or cap the steps) and give the tool server more capacity.

More ai systems problems