We are burning millions of API tokens on problems that if statements solved 20 years ago.
I speak with developers building Multi-Agent Systems (MAS) every day, and I keep seeing the same massive architectural anti-pattern: Routing everything through the AI model.
Need to check an agent's permissions? "Ask the LLM."
Need to route a message? "Ask the LLM."
Need to validate a data schema? "Ask the LLM."
Language models are extraordinary reasoning engines. But they are also expensive, probabilistic, and relatively slow. If a problem has a deterministic, correct answer (like checking an access policy), it should be evaluated by runtime code, not guessed by a neural network.
The Anti-Pattern
Instead of doing this (Probabilistic):
// BAD: Asking the LLM to check permissions const prompt = `You are an agent. The user wants to delete a file. Here are their permissions: ${ user . permissions } . Should you allow it?` ;
const decision = await llm .…