Deleting Three Agents for 40 Lines of Python Cut Latency 9s to 800ms and Cost 75%
Prestigious_Style267 · reddit · 2026-09-23
A developer refactored a multi-agent customer support triage system that a client paid an agency $40K to build. The original architecture—a master router agent, sentiment classifier, context extractor, and tool selector orchestrated in a large graph—burned 12,000 tokens and 9 seconds of latency per query, and the router hallucinated twice a day, sending simple refund tickets to tier-3 engineering when customers used the word "broken."
The fix: delete three middle agents and replace routing with a fast regex pass, an embedding cosine-similarity check, and forty lines of plain Python conditionals. Results:
- Latency dropped from 9 seconds to 800ms
- Token cost fell 75%
- Routing accuracy rose to near 99%
The author argues the agent space has "caught a disease" of solving deterministic problems with nondeterministic LLM loops: if a router can be a switch statement or pydantic validator, agentifying it just burns compute to look sophisticated. He asks where the line should be drawn between genuine agentic behavior and procedural code that never needed an LLM.
More from coding & agent
- Rivet launches SQLite Forking: 20ms agent-thread forks with zero data copying — samgoodwin89 · 2026-11-11
- YouArt Desktop launches: AI agent edits video in CapCut, DaVinci and Premiere from client feedback — mhdfaran · 2026-11-11
- Boubou: one-command local voice AI that serves your phone and robots over Wi-Fi — LuozhuZhang · 2026-11-11
- Python 3.15 makes AttributeError actionable: suggests .append for .push mix-ups — KhuyenTran16 · 2026-11-11
- sentence-transformers maintainer releases new embedding pooling training method, code & checkpoints — tomaarsen · 2026-11-11
- droid-mcp turns your Android phone into an MCP server with 160+ tools for Claude Code — zvone1122 · 2026-11-11