The Five Agentic Flows: A Framework for Building AI That Actually Works

February 2, 2026 · 3 min read

There's a lot of noise in the AI agent space right now. Everyone's building "autonomous" this and "agentic" that. But most of it is demos, not products.

After building several AI-powered tools, from automated appointment booking systems to design system automation, I've landed on a mental model that cuts through the hype:

Observe → Detect → Suggest → Fix → Learn

This isn't new. It's borrowed from DevOps, security operations, and systems engineering. But it's the clearest framework I've found for thinking about where AI agents actually create value and where they fall apart.

Let me break it down.

Stage 1: Observe

Every useful agent starts by watching.

This means monitoring systems, collecting data, and building context without taking action. It's the foundation that most people skip because it's boring. They want to jump straight to "make AI do cool stuff."

But observation is where you learn:

  • What signals matter
  • What patterns emerge
  • What context you'll need later

For a design system, this might mean tracking component usage across products. For a customer support agent, it's analyzing ticket patterns. For a developer tool, it's watching error logs and build failures.

The quality of your observation determines everything that follows.

Stage 2: Detect

Raw data is noise. Detection is signal. This stage answers the question: "What warrants attention?" Detection can be rule-based (if X > threshold, alert), pattern-based (this sequence usually precedes failures), or ML-driven (anomaly detection, classification).

The key insight: detection is a design decision, not just a technical one. What you choose to detect, and what you ignore, shapes the entire system's behavior.Bad detection creates alert fatigue. Good detection surfaces the right things at the right time.

Stage 3: Suggest

Here's where most teams should pause.

The instinct is to automate actions. Resist it. Instead, automate recommendations.

Suggestions keep humans in the loop. They build trust through accuracy. And critically, they create a feedback mechanism: which suggestions do humans accept? Which do they reject? Why?

This stage is your safety valve. It's where you prove the system works before giving it more autonomy.

For my design system work, this looks like: "Hey, these 12 components have inconsistent spacing tokens. Here's what I'd change." The human reviews, approves, or adjusts. The system learns.

Stage 4: Fix

Once you've earned trust through accurate suggestions, you can automate the action.

But even here, constraints matter:

  • Start with low-risk, high-frequency fixes
  • Always have rollback mechanisms
  • Set clear boundaries on what the agent can and can't touch

The goal isn't full autonomy. It's appropriate autonomy. Some fixes should always require human approval. Others can run automatically because the cost of being wrong is low.

Stage 5: Learn

This is the loop that separates agents from scripts.

After every action (or non-action), the system should ask:

  • Did the fix work?
  • Did the human accept the suggestion?
  • Should detection thresholds change?
  • What new patterns emerged?

Without learning, you're just running automation. With learning, you're building something that improves over time.

The Real Framework: It's a Spectrum

Here's what I've realized: you don't have to automate all five stages. In fact, you probably shouldn't.

Most production systems today look like this:

Observe + Detect: Fully automated

Suggest: Automated, human-reviewed

Fix: Human-approved (or auto for low-risk)

Learn: Partially automated, human-guided

The path to full autonomy is gradual. You earn it by being right, consistently, over time.

Where I'm Applying This

I'm using this framework across a few projects:

Design system automation: Observing component usage, detecting inconsistencies, suggesting token updates, and learning from designer decisions.

AI companions: Observing user emotional states, detecting patterns, suggesting supportive responses, and learning what actually helps.

Developer tooling: Observing build/deploy cycles, detecting failure patterns, suggesting fixes, and learning from resolution data.

The framework scales because it's honest about what AI is good at (pattern detection, tireless observation) and what it's not (judgment calls, novel situations).

The Bottom Line

The agents that will win aren't the most autonomous. They're the most trustworthy.

Trust comes from:

  1. Accurate observation
  2. Meaningful detection
  3. Useful suggestions
  4. Reliable fixes
  5. Continuous learning

Start narrow. Prove value. Expand with trust.

That's the game.

What systems are you building?

Where does this framework apply or break down? I'd love to hear your take.


Originally published on Substack.

© 2026 Scott Shapiro