
We tried to let LLMs plan and execute multi-step tasks. "Goal: Research this company and draft an email."
The agent would browse the web. Read the site. Summarize it. Draft the email.
It was magical... regarding 60% of the time.
The other 40%? It got stuck in loops. It hallucinated steps. It decided to browse a competitor's site instead. It drafted an email in Spanish for no reason.
We realized a fundamental math problem: If a single LLM step is 95% reliable (generous), a 5-step agent is $0.95^5 = 77%$ reliable. A 10-step agent is 60% reliable.
We killed the agents. We went back to deterministic code with "AI method calls." Reliability went back to 99%.
Here's why autonomous agents are a trap for production systems.
Section 1: The Agent Dream vs. Reality
The dream of agents (AutoGPT, BabyAGI, LangChain Agents) is intoxicating.
The Dream:
You give the AI a high-level goal: "Increase our SEO traffic."
The AI figures out the steps: Keyword research -> Competitor analysis -> Content drafting -> Publishing.
It executes them autonomously. You just watch the results roll in.
The Reality:
Agents are incredibly fragile state machines where the state transitions are probabilistic.
In traditional software, if Step A succeeds, Step B happens. Deterministically. Always.
In agents, if Step A succeeds, the LLM decides what to do next. Maybe Step B. Maybe Step C. Maybe it loops back to Step A.
The Loop of Death:
We watched our agent try to "research a company."
- It searched Google.
- It clicked a LinkedIn link.
- LinkedIn asked for login.
- The agent saw "Sign In" and decided "I need to sign in."
- It tried to sign in (failed).
- It saw "Sign In" again.
- It tried to sign in (failed).
It burned $15 in API credits in 10 minutes trying to sign into a page it shouldn't have been on.
Section 2: The Multiplication of Failure
The math of reliability is brutal for agents.
Let's say an LLM is 90% accurate at a given task (reasoning, tool selection, output formatting).
Single Call: 90% success rate. Acceptable for many use cases.
Agent with 5 Steps: $0.90 imes 0.90 imes 0.90 imes 0.90 imes 0.90 = 59%$ success rate.
Agent with 10 Steps: 34% success rate.
Most "autonomous" tasks require dozens of steps. The probability of the agent completing the entire chain without a fatal error approaches zero.
And debugging is a nightmare. "Why did it choose tool B instead of tool A in step 7?" Because the model's weights aligned that way given the probabilistic context window. Good luck fixing that.
Section 3: The Deterministic Alternative
We realized we didn't want autonomous agents. We wanted reliable workflows.
We replaced the agent with **deterministic orchestration.**
Old Way (Agent):
agent.run("Research XQA.io and draft email")
New Way (Workflow):
def research_and_email(domain):
# Step 1: Explicitly scrape (Deterministic code)
content = scraper.get_text(domain)
# Step 2: AI Summarize (Bounded AI call)
summary = ai.summarize(content)
# Step 3: AI Draft (Bounded AI call)
email = ai.draft_email(summary)
return email
In the new way, the flow is hard-coded (Python). The content generation is AI.
We control the loops. We control the error handling. We control the retries.
Reliability jumped from ~60% to ~99%.
Section 4: When to Use Agents (If Ever)
Are agents ever the right choice?
Exploratory Tasks:
If the task is open-ended exploration where strict correctness doesn't matter, agents can be fun. "Write a story about a detective." "Explore this codebase and tell me what it does."
Human-in-the-Loop Co-pilots:
If a human watches every step and can correct the agent, reliability matters less.
But strictly autonomous, unattended agents for business-critical workflows? Not with current models.
The "Router" Pattern:
Using an LLM as a router ("User asked for X, call function Y") is effective. But that's a single decision step, not a multi-step autonomous chain.
Conclusion
The "Agentic Future" is hyped because it sounds like sci-fi. Software that writes itself! Businesses that run themselves!
But in engineering, reliability is the only currency that matters.
Don't delegate control flow to a probabilistic model. Keep the logic in code. Keep the creativity in the AI. And never confuse the two.
We don't need agents. We need better functions.
Written by XQA Team
Our team of experts delivers insights on technology, business, and design. We are dedicated to helping you build better products and scale your business.