If you’ve tried to plug an AI agent into your business, you probably already know the feeling: it works amazingly in the demo, works well for the first week, and then on some random Tuesday it stops working without warning. Or worse: it seems to work, but it’s doing strange things no one notices until a customer complains.

You’re not alone. This week on Hacker News, a developer with more than 20 years of experience launched a tool called Statewright with a phrase that sums up the current moment in applied AI: agentic problem-solving is, right now, very fragile. He loves the technology, but admits it creates almost as many problems as it solves.

It’s worth taking a step back to understand why this happens, because it directly affects any business that’s thinking about automating processes with AI.

The problem: AI agents are brilliant but unpredictable

An AI agent, in essence, is a language model (like GPT or Claude) that you give tools and autonomy to decide what to do. You tell it, “manage support emails,” and the agent decides, step by step, what to read, what to reply to, who to escalate to, and when to close the ticket.

On paper, it sounds perfect. In practice, things like this happen:

  • The agent gets stuck in a loop and sends 14 emails to the same customer.
  • It misreads an instruction and archives urgent tickets.
  • It calls an API, fails, tries another weird workaround, and ends up in a state no one had anticipated.
  • It works perfectly for a month and then one day starts hallucinating responses because someone changed a single word in the system prompt.

The underlying problem is structural: a pure agent makes probabilistic decisions at every step. That gives it flexibility, but it also means the same input can produce different paths. And when something is probabilistic, sooner or later it will go wrong.

Why this matters for your business

If you automate something critical — sales, customer support, invoicing, scheduling — you need it to work 100% of the time, not 95%. A 5% failure rate across 1,000 monthly calls means 50 customers having a bad experience. In support, that may be manageable with supervision; in invoicing, it’s a serious problem.

That’s the real tension in applied AI today:

Approach Flexibility Reliability When to use it
Fully autonomous agent High Low Exploratory tasks, prototypes
Rigid flow with no AI Low Very high 100% predictable processes
Structured flow with AI at key points Medium-high High Most real business processes

Most companies don’t need an agent that “thinks for itself.” They need a clear process where AI adds intelligence in the steps where it truly matters: understanding an email, drafting a response, qualifying a lead, extracting data from a PDF.

The idea behind Statewright (and why it matters)

Statewright proposes something software engineers have been doing for decades: state machines. It’s a simple concept:

A state machine explicitly defines the situations your process can be in, which transitions are valid between them, and what happens in each one.

Applied to an AI agent, instead of telling it, “solve this problem however you want,” you say:

  1. Start in the “receive email” state.
  2. From there, you can only move to “classify” or “discard.”
  3. If you classify it as urgent, you can only move to “escalate to a human” or “reply with template X.”
  4. Every transition is controlled and logged.

The agent still uses AI to make smart decisions within each state, but it cannot invent new paths. It’s the difference between letting a brilliant intern do whatever they want, or letting them decide within a well-defined process.

This is not new. It’s the same idea that has worked for years in critical systems: payments, telecom, industrial control. What’s interesting is that the AI community is rediscovering that reliability doesn’t come from a bigger model, but from a more disciplined architecture.

How to build AI automations that don’t break

Beyond any specific tool, there are principles that apply to any AI project in a real business. Here’s the short version:

1. Define the process before adding AI

The most common mistake is starting with “I want an AI agent.” The correct order is: what process do I want to automate? What are the exact steps? Where are the decisions that require understanding language, context, or ambiguity? Those are the points where AI belongs. Everything else should be deterministic code.

2. Limit autonomy

Give the model the minimum freedom it needs to do its job. If it only has to classify an email into 5 categories, don’t give it permission to send emails. The less decision surface area, the fewer things can go wrong.

3. Make it observable

Every decision the AI makes should be logged: what input it received, what it reasoned, what it decided. Without this, when something fails, you’re blind. With it, you can audit, improve, and sleep better.

4. Design for failure

APIs go down, models return strange output, formats change. A good system assumes it will fail and has retries, fallbacks, and human escalation when needed. A system that breaks at the first hiccup is not production-ready.

5. Start small and prove value

Don’t try to automate the entire sales department on day one. Pick one specific process, measure it before and after, and expand from there. Well-built applied AI is created in layers.

What this means for your company

The news behind Statewright is a symptom of something bigger: the industry is maturing. We’re moving from the “look what ChatGPT can do” phase to the “how do I build this so it works in my business, every day, without failures” phase.

That second phase requires something different. Knowing how to use the OpenAI API is not enough. You need engineering judgment: knowing when to use an agent and when not to, how to structure the flow, how to integrate with your systems, how to monitor, how to recover from errors.

At Studio SmartWork, we’ve been building exactly this kind of solution since 2021, before generative AI became a talking point. Our way of working reflects everything we’ve discussed in this article: we use n8n as the foundation for structured and robust workflows, we place AI only at the points where it adds real value, and we design every solution so it can recover on its own when something fails. Over 6 months of operation for some clients, we’ve had 0 unrecovered failures — not because errors don’t happen, but because the system is designed to handle them.

Conclusion

Pure AI agents are fascinating and full of promise, but today they still aren’t the right tool for critical business processes. The good news is that you don’t need them to capture 90% of the value. With well-designed workflows, AI applied in the right places, and an architecture built to fail and recover, you can automate most of the repetitive work in your company reliably.

The question is not “should I use AI or not?” It’s “how do I use it so it works tomorrow, in a month, and in a year?” And the answer is not in the newest model, but in how you integrate it into a system that respects the principles of good engineering.

AI is ready to do machine work. You just need to build the system around it with the same seriousness you’d apply to any other critical process in your business.

Related articles