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
- Opendoor partners on AI agents to help users buy homes, its first public company deal — morganb · 2026-09-23
- Antigravity CLI 1.2.9 lets you DM subagents directly from the main prompt with @ — rseroter · 2026-09-23
- Hugging Face ships @huggingface/lerobot JS package to read robot datasets in-browser — mishig25 · 2026-09-23
- Same prompt face-off: Claude vs Grok build a Spy Hunter game, neither playable — lemire · 2026-09-23
- Claude Code users approve 93% of permission prompts, raising agent security concerns — annetgriffin · 2026-09-23
- Codebase-Memory MCP server hits 44k stars: 158 languages, 99% fewer tokens — DeusData · 2026-09-23