{"id":1507,"date":"2026-03-15T07:00:55","date_gmt":"2026-03-15T07:00:55","guid":{"rendered":"https:\/\/bogdanburuiana.com\/?p=1507"},"modified":"2026-04-30T07:30:06","modified_gmt":"2026-04-30T07:30:06","slug":"agent-workflows-from-single-tasks-to-automated-business-processes","status":"publish","type":"post","link":"https:\/\/bogdanburuiana.com\/index.php\/2026\/03\/15\/agent-workflows-from-single-tasks-to-automated-business-processes\/","title":{"rendered":"Agent Workflows: From Single Tasks to Automated Business Processes"},"content":{"rendered":"\n<p>A single well-configured AI agent is impressive. But most real business processes aren&#8217;t single tasks &#8211; they&#8217;re sequences of tasks, with decisions, branches, approvals, and handoffs in between. That&#8217;s where agent-driven workflows come in.<br>Think of workflows as the difference between hiring one very capable person and building a team with a clear process. The person is valuable. The team with a process is scalable.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>What Is a Workflow in Foundry?<\/strong><\/p>\n\n\n\n<p>In Microsoft Foundry, a workflow is a declarative definition of a sequence of steps involving AI agents, conditions, and human interactions. Instead of writing imperative code to manage execution flow, you define what should happen and when using a visual, node-based approach.<br><\/p>\n\n\n\n<p>The platform handles:<\/p>\n\n\n\n<ul>\n<li>Execution order and state management<\/li>\n\n\n\n<li>Passing outputs between steps<\/li>\n\n\n\n<li>Conditional branching<\/li>\n\n\n\n<li>Human-in-the-loop pauses<\/li>\n\n\n\n<li>Error handling and retry<\/li>\n<\/ul>\n\n\n\n<p>You focus on the logic. Foundry manages the execution.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>The Core Concepts: Nodes and Edges<\/strong><\/p>\n\n\n\n<p>Every Foundry workflow is a graph. The graph has nodes (the workers) and edges (the connections between them).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"\/wp-content\/uploads\/2026\/04\/image-22-1024x683.png\" alt=\"\" class=\"wp-image-1509\" srcset=\"\/wp-content\/uploads\/2026\/04\/image-22-1024x683.png 1024w, \/wp-content\/uploads\/2026\/04\/image-22-300x200.png 300w, \/wp-content\/uploads\/2026\/04\/image-22-768x512.png 768w, \/wp-content\/uploads\/2026\/04\/image-22.png 1536w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Nodes (called Executors in Foundry) are the workers. They can be:<\/p>\n\n\n\n<ul>\n<li>AI agents &#8211; the reasoning, language-capable workers<\/li>\n\n\n\n<li>Custom logic components &#8211; deterministic code for calculations, data transforms<\/li>\n\n\n\n<li>Human approval steps &#8211; pauses waiting for a person<\/li>\n<\/ul>\n\n\n\n<p>Edges define how data and control flow between nodes. There are five types:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><strong>Edge Type<\/strong><\/td><td><strong>Behaviour<\/strong><\/td><\/tr><tr><td>Direct<\/td><td>Node A always feeds into Node B<\/td><\/tr><tr><td>Conditional<\/td><td>Node B only triggers if a condition is met<\/td><\/tr><tr><td>Switch-case<\/td><td>Routes to different nodes based on predefined conditions<\/td><\/tr><tr><td>Fan-out<\/td><td>Sends one message to multiple nodes simultaneously<\/td><\/tr><tr><td>Fan-in<\/td><td>Combines outputs from multiple nodes into one final step<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"has-medium-font-size\"><strong>The Three Main Workflow Patterns<\/strong><\/p>\n\n\n\n<p><strong>Pattern 1: Sequential Workflow<\/strong><br>Steps execute in a fixed, ordered sequence. Each step&#8217;s output becomes the next step&#8217;s input.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"455\" src=\"\/wp-content\/uploads\/2026\/04\/image-23-1024x455.png\" alt=\"\" class=\"wp-image-1510\" srcset=\"\/wp-content\/uploads\/2026\/04\/image-23-1024x455.png 1024w, \/wp-content\/uploads\/2026\/04\/image-23-300x133.png 300w, \/wp-content\/uploads\/2026\/04\/image-23-768x341.png 768w, \/wp-content\/uploads\/2026\/04\/image-23-1536x683.png 1536w, \/wp-content\/uploads\/2026\/04\/image-23.png 1881w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Best fo<\/strong>r: Predictable multi-stage pipelines where each step depends on the previous one.<br><strong>Real example: <\/strong>Customer support triage. Extract the customer issue -> Classify as billing\/technical\/general -> Enrich with customer account history -> Route to the appropriate support queue.<br><em>Pros:<\/em> Easy to reason about, predictable execution, straightforward debugging<br><em>Cons:<\/em> One slow step blocks everything; not suited for parallel workloads<\/p>\n\n\n\n<p><strong>Pattern 2: Human-in-the-Loop Workflow<\/strong><\/p>\n\n\n\n<p>The workflow pauses at a defined point and waits for a human decision before continuing.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"563\" src=\"\/wp-content\/uploads\/2026\/04\/image-24-1024x563.png\" alt=\"\" class=\"wp-image-1511\" srcset=\"\/wp-content\/uploads\/2026\/04\/image-24-1024x563.png 1024w, \/wp-content\/uploads\/2026\/04\/image-24-300x165.png 300w, \/wp-content\/uploads\/2026\/04\/image-24-768x422.png 768w, \/wp-content\/uploads\/2026\/04\/image-24-1536x844.png 1536w, \/wp-content\/uploads\/2026\/04\/image-24.png 1692w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Best for:<\/strong> High-stakes or irreversible actions. Anything where you need a human to verify before committing.<br><strong>Real example:<\/strong> Financial reconciliation agent. Agent identifies discrepancies, prepares a summary report, then pauses. A finance team member reviews and either approves the corrective journal entries or sends back for investigation.<br><em>Pros<\/em>: Maintains human oversight for sensitive operations; builds trust in AI-assisted processes<br><em>Cons:<\/em> Workflow speed is limited by human response time; requires clear notification and escalation design<\/p>\n\n\n\n<p><strong>Pattern 3: Group Chat (Collaborative) Workflow<\/strong><br>Multiple specialised agents share a common conversation. Control shifts dynamically based on context.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"690\" src=\"\/wp-content\/uploads\/2026\/04\/image-25-1024x690.png\" alt=\"\" class=\"wp-image-1512\" srcset=\"\/wp-content\/uploads\/2026\/04\/image-25-1024x690.png 1024w, \/wp-content\/uploads\/2026\/04\/image-25-300x202.png 300w, \/wp-content\/uploads\/2026\/04\/image-25-768x517.png 768w, \/wp-content\/uploads\/2026\/04\/image-25.png 1528w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Best for:<\/strong> Tasks requiring different specialisations &#8211; where no single agent has all the expertise needed.<br><strong>Real example: <\/strong>Report generation. Research agent gathers and summarises sources. Writing agent drafts the narrative. Review agent checks for factual consistency and flags gaps. Output is a collaborative product of all three.<br><em>Pros: <\/em>Specialisation leads to better quality; agents can build on each other&#8217;s work<br><em>Cons: <\/em>More complex to configure and debug; requires a well-designed orchestrator to avoid loops<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Workflow Events: Understanding Execution State<\/strong><\/p>\n\n\n\n<p>One of the more technical aspects of Foundry workflows is the event system. Understanding what events fire and when is essential for debugging.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"563\" src=\"\/wp-content\/uploads\/2026\/04\/image-26-1024x563.png\" alt=\"\" class=\"wp-image-1513\" srcset=\"\/wp-content\/uploads\/2026\/04\/image-26-1024x563.png 1024w, \/wp-content\/uploads\/2026\/04\/image-26-300x165.png 300w, \/wp-content\/uploads\/2026\/04\/image-26-768x422.png 768w, \/wp-content\/uploads\/2026\/04\/image-26-1536x845.png 1536w, \/wp-content\/uploads\/2026\/04\/image-26.png 1691w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>When a workflow behaves unexpectedly, start by examining the event log in sequence. The gap between events &#8211; or a missing event &#8211; tells you exactly where things broke down.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Designing for Failure<\/strong><\/p>\n\n\n\n<p>Every node in a workflow can fail. The questions to ask when designing:<\/p>\n\n\n\n<ol>\n<li>What happens if this node times out? Define timeouts per node and at the workflow level.<\/li>\n\n\n\n<li>What happens if an agent call returns an error? Retry? Skip? Notify a human? Abort?<\/li>\n\n\n\n<li>What happens if a tool call fails mid-workflow? Is the workflow idempotent? Can it safely retry from the beginning?<\/li>\n\n\n\n<li>What is the compensation strategy? If step 5 fails after steps 1-4 completed, do you need to undo those steps?<\/li>\n<\/ol>\n\n\n\n<p>A workflow without failure design is a workflow that will behave unpredictably in production. Design the unhappy path first.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>A Note on Monitoring Workflows<\/strong><\/p>\n\n\n\n<p>Foundry workflows emit telemetry you can capture in Azure Monitor and Application Insights. Set up:<\/p>\n\n\n\n<ul>\n<li>Workflow duration &#8211; alerting on unusually long runs<\/li>\n\n\n\n<li>Error rate &#8211; alerting on node failures<\/li>\n\n\n\n<li>Token consumption &#8211; tracking LLM costs per workflow execution<\/li>\n\n\n\n<li>Human approval lag &#8211; how long are human-in-the-loop steps actually taking?<\/li>\n<\/ul>\n\n\n\n<p>That last one is often ignored. If human approval steps are taking 4 hours average when the SLA requires 1 hour, the bottleneck is human, not technical &#8211; and you need to know that.<\/p>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Pros and Cons of Agent Workflows<\/strong><\/p>\n\n\n\n<p><em>Pros:<\/em><\/p>\n\n\n\n<ul>\n<li>Automate complex multi-step processes that previously required human coordination<\/li>\n\n\n\n<li>Visual, declarative approach is accessible to solution architects and business analysts<\/li>\n\n\n\n<li>Human-in-the-loop patterns provide oversight without sacrificing automation<\/li>\n\n\n\n<li>Nodes are modular &#8211; individual agents can be updated without rebuilding the workflow<\/li>\n<\/ul>\n\n\n\n<p><em>Cons:<\/em><\/p>\n\n\n\n<ul>\n<li>Debugging distributed workflow execution is harder than debugging sequential code<\/li>\n\n\n\n<li>State management across nodes requires careful design<\/li>\n\n\n\n<li>Fan-out\/fan-in patterns introduce complexity around output merging<\/li>\n\n\n\n<li>Human-in-the-loop workflows are only as fast as the humans in them<\/li>\n\n\n\n<li>Costs accumulate across every node &#8211; multi-agent workflows can be expensive<\/li>\n<\/ul>\n\n\n\n<p class=\"has-medium-font-size\"><strong>My Rule for When to Use a Workflow vs. a Single Agent<\/strong><\/p>\n\n\n\n<p>A single agent with good tools can handle a surprising amount of complexity. Before building a workflow, ask:<br><em>Can one well-configured agent with the right tools complete this end-to-end?<\/em><br>If yes &#8211; use a single agent. Simpler to configure, simpler to debug, lower cost.<br>If the process genuinely requires different specialisations, parallel execution, conditional branching based on business logic, or human approval gates &#8211; that&#8217;s when you reach for a workflow.<br>Don&#8217;t over-engineer. Start with the simplest thing that works.<\/p>\n\n\n\n<p><em>Next: I&#8217;ll cover multi-agent orchestration patterns using the Microsoft Agent Framework &#8211; where the orchestration moves into code and you get much more fine-grained control.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A single well-configured AI agent is impressive. But most real business processes aren&#8217;t single tasks &#8211; they&#8217;re sequences of tasks, with decisions, branches, approvals, and handoffs in between. That&#8217;s where agent-driven workflows come in.Think of workflows as the difference between hiring one very capable person and building a team with a clear process. The person [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/posts\/1507"}],"collection":[{"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/comments?post=1507"}],"version-history":[{"count":1,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/posts\/1507\/revisions"}],"predecessor-version":[{"id":1514,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/posts\/1507\/revisions\/1514"}],"wp:attachment":[{"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/media?parent=1507"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/categories?post=1507"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bogdanburuiana.com\/index.php\/wp-json\/wp\/v2\/tags?post=1507"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}