Back to Blog
Tutorials & Use Cases

Advanced Patterns for Dynamic Agents (Part 2)

March 19, 2026
5 min read
Kemu Team
Advanced Patterns for Dynamic Agents (Part 2)

Last time, we covered the foundational agent patterns, Single Agent, Sequential, and Parallel, and how they map to different problem types. Those patterns give you a solid baseline for building workflows in Kemu.

Now we’re stepping into more advanced territory.

These are the patterns you reach for when workflows need to adapt, self-correct, or decide what to do next on the fly. They’re especially powerful in Kemu because you can visually orchestrate complex behavior using Recipes (your workflow), Widgets (your building blocks), and structured agent interactions.

This post adapts ideas from a Google developer video on advanced AI agent design patterns, and shows how they map to Kemu recipes.


The Loop Pattern: Building Self-Correcting Workflows

The Loop (or Review & Critique) pattern focuses on refinement. Instead of trusting a single output, you create a feedback cycle that improves results until they hit a defined standard.

You have two roles here:

  • A Generator Agent that produces output
  • A Critique Agent that evaluates it

If the output fails validation, it gets sent back with feedback, and the cycle repeats.

In Kemu, this translates to a looping workflow where output from one branch feeds back into an earlier step. You typically combine an AI Agent widget for generation, another AI Agent (or logic widget) for critique, and a control mechanism (like conditional routing or a counter) to stop infinite loops.


Example: Travel Plan Validator

Imagine generating a day trip itinerary. The Generator proposes a plan, and the Critique Agent checks constraints like travel time between stops, budget limits, and opening hours.

If something fails, the Generator gets structured feedback and tries again.

Open this recipe on Kemu

Trade-offs

This pattern gets you much higher quality and reliability, but it comes at a cost. Each loop is another model call, so latency and usage climb fast. You need explicit exit conditions (like “max 3 iterations”) to avoid runaway loops.


The Coordinator Pattern: Dynamic Task Routing

If the Loop pattern improves answers, the Coordinator pattern breaks problems apart.

A central Coordinator Agent acts like a project manager. It analyzes a request, splits it into sub-tasks, and assigns each one to a specialized agent.

In Kemu, this looks like a Recipe where one agent determines routing, then triggers different branches or even sub-recipes.


Example: Trip Planning Assistant

User request: “Plan a day with sushi and a museum.”

The Coordinator sends “find sushi + logistics” to a Food Agent and “find nearby museums” to a Places Agent. Each sub-agent fully handles its task, possibly using its own internal logic (even Sequential or Parallel patterns), then returns results to be combined.

Open this recipe on Kemu

Why It Matters

This is where workflows start to feel truly intelligent. Instead of hardcoding paths, the system decides what to do at runtime.

Trade-offs

You gain flexibility, but complexity jumps quickly. More agents means more cost. Debugging gets harder. And your routing logic needs to be bulletproof.


Agent as Tool: Keeping Control Centralized

At first glance, this looks similar to the Coordinator, but the control model is completely different.

The main agent stays in charge and uses other agents like tools instead of delegating full responsibility.

Think of it this way:

  • Coordinator = “You handle this task.”
  • Agent as Tool = “Give me a quick answer, I’ll decide what to do next.”

In Kemu, this usually means a single primary agent orchestrating calls to smaller, focused agent widgets or services, without handing off the workflow.


Example: Controlled Research Flow

A Primary Agent might ask a Search Agent for data, ask a Summary Agent to condense it, decide whether more data is needed, then produce the final answer. All decisions stay centralized.

Open this recipe on Kemu

Why This Pattern Is Powerful

You get:

  • Better control over state
  • More predictable behavior
  • Easier debugging compared to full delegation

It’s usually the safer choice when workflows must stay tightly governed.


Choosing the Right Pattern (Now With Advanced Options)

You already know the basics:

  • Single Agent -> flexible but fragile
  • Sequential -> structured and reliable
  • Parallel -> fast but aggregation-heavy

Now you can extend that toolbox:

  • Loop -> when quality matters more than speed
  • Coordinator -> when problems are complex and need decomposition
  • Agent as Tool -> when you want modular capability without losing control

In practice, real Kemu Recipes often mix these patterns. A Coordinator might delegate tasks, each task might use a Sequential pipeline, and the final output might pass through a Loop for validation.

That composability is where Kemu’s visual model shines, you can literally see these patterns on the canvas as connected widgets.


Final Thoughts

The jump from basic to advanced agent patterns comes down to one thing: control.

Control over quality (Loop), control over complexity (Coordinator), and control over execution (Agent as Tool).

Once you start combining these inside Kemu Recipes, you move from simple automations to systems that feel adaptive, structured, and production-ready.

Importantly, you’re not guessing what the system is doing. You can see it, trace it, and refine it directly in the workflow.

That’s where things start to get interesting.

Build your first advanced workflow in Kemu and experience what controlled, intelligent automation feels like.

Ready to get started with Kemu?

Build your own computer vision solutions without writing code. Start creating powerful ML and machine vision pipelines today.

Get Started