Agentic patterns · 03 of 04
Agentic patterns: Agents inside a workflow
Put the process in plain code and give agents only the steps that need judgement. The workflow owns the rules, the order and the handovers, and the agent works inside those lines.
The principle
Agents inside a workflow
A group of agents that talk among themselves until they agree can look impressive in a demo. In a business process it is a liability: rules get negotiated away, nobody can say why a step happened, and the same input can give a different outcome tomorrow.
The workflow pattern reverses the roles. A deterministic workflow defines the steps and the typed messages between them, and law and policy run as ordinary code. An agent is called for the one step that needs judgement, such as finding the best available seat, and its proposal goes back through the rules before anything happens. The run can checkpoint and wait for a person for as long as it takes.
It also makes change cheap and visible. When the business changes its policy, you change one function and the next run follows it, with no prompt rewritten and no hope that the agents will remember. The demo’s third run shows exactly that.
codemodelagentperson
Also known as Workflows, as opposed to agents; prompt chaining (Anthropic) · Sequential orchestration (Azure Architecture Center) · Process Manager (Enterprise Integration Patterns) · Factor 8: own your control flow (12-factor agents)
Where it applies
- Claims, refunds and complaints, where regulation sets the outcome and an agent searches or drafts
- Month-end close: a fixed checklist, with agents to explain variances or chase missing items
- Customer onboarding, with KYC rules in code and an agent reading the documents
- Any process an auditor will want to replay step by step
Where it does not
- One agent with a few tools already does the job
- Open-ended research or brainstorming, where there is no process to enforce
- Teams that cannot yet write down their own process
Fill the boxes
One shape, three ways to build it
The pattern exists with or without AI. The design decision is which boxes deserve a model, and what that costs in money, speed and auditability.
All code
Every step is a rule or an API call. The process is fully auditable and stops at any step that needs searching, reading or weighing options.
Hybrid, as shown here
Code owns the order and the rules. One agent does the search, and its proposal passes back through the rules before anyone sees it.
All agents
Agents settle the outcome between themselves in a conversation. That is flexible, but the rules then live in prompts, and the same case can end differently on another day.
See it work
Cancelled at Schiphol
Friday 21:50 at Schiphol. Ana's 22:40 flight to Lisbon is cancelled: no crew. The airline rebooks her with a workflow: code works out what the law says she is owed, a seat-scout agent hunts for a flight, code checks it against policy, and Ana gets the last word. Then watch the airline change its rebooking policy in one function: the run follows, and no prompt is touched.
Recorded on 19 November 2026 with Claude Opus 5.5: the agents' answers are real, replayed here, and the real Agent Framework runtime ran the workflow. Flights, fares and bookings are invented.
Watch for. Agents live inside a deterministic workflow: typed edges route every message, plain code owns the rules (EU261, airline policy), the agent only picks a seat, and request_info checkpoints the run until a human answers.
Building it
This demo runs on Microsoft Agent Framework
Microsoft Agent Framework (the successor to AutoGen and Semantic Kernel) runs AI agents and plain-code steps in one typed workflow graph. Other frameworks can carry the same pattern; this is when I would pick this one.
Reach for it when
- Part of the process is fixed rules and only part needs a model's judgment
- You need typed, checkpointed runs that can wait hours for a human and resume
- You are on Azure or .NET, or moving off AutoGen or Semantic Kernel
Skip it when
- One agent with a few tools does the job
- You want open-ended agent brainstorming more than a controlled process
- You need A2A 1.0 or the preview pieces (DevUI, hosted agents) in production today
- Framework
- Microsoft Agent Framework 1.26 (Python)
- Licence
- MIT
- Model
- claude-opus-5-5
- Watch time
- ~2 min
Advice
Questions I ask before using it
- Which rules are non-negotiable, and do they live in code or in a prompt?
- Where exactly does judgement add value, and how small can we make that step?
- What does the agent see, and what is it allowed to change?
- Can we replay any run and explain every decision in it?
Contact
Questions, ideas or a conversation?
I’m always glad to hear from people working on AI, product strategy, transformation or software.