<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jose Maria Flores Zazo on Medium]]></title>
        <description><![CDATA[Stories by Jose Maria Flores Zazo on Medium]]></description>
        <link>https://medium.com/@jmfloreszazo?source=rss-371533c2f202------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*teKZmZUane14YI35S31o6Q@2x.jpeg</url>
            <title>Stories by Jose Maria Flores Zazo on Medium</title>
            <link>https://medium.com/@jmfloreszazo?source=rss-371533c2f202------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 23:02:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jmfloreszazo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Architecture Guardrails for .NET Agents: The Prompt Explains, the Test Enforces]]></title>
            <link>https://medium.com/@jmfloreszazo/architecture-guardrails-for-net-agents-the-prompt-explains-the-test-enforces-549c0f1ac328?source=rss-371533c2f202------2</link>
            <guid isPermaLink="false">https://medium.com/p/549c0f1ac328</guid>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[clean-code]]></category>
            <dc:creator><![CDATA[Jose Maria Flores Zazo]]></dc:creator>
            <pubDate>Tue, 01 Dec 2026 17:37:56 GMT</pubDate>
            <atom:updated>2026-12-01T17:37:56.936Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Turning architectural decisions into executable constraints for agent-assisted software development.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4VFrYc2JQOFljiMsXzdC3g.png" /><figcaption>Architecture guardrails for agent-assisted development</figcaption></figure><p>Over the past few months, I have been delegating more and more changes to AI agents. And one particular failure keeps occurring too often to dismiss it as a coincidence: a change is correct locally, compiles, passes the tests — and yet takes the system one step further away from the architecture we agreed on.</p><p>A domain class suddenly receives an infrastructure repository. An implementation bypasses the application layer because it was more direct. A naming convention is never broken all at once, but gradually disappears, pull request after pull request. None of these changes necessarily triggers an alarm. The consequences become apparent months later, when undoing them is considerably more expensive.</p><p>So instead of adding another paragraph to the prompt, I wrote tests. That is how <strong>ArchitectureGuardrails</strong> came about: a small NuGet library for writing explicit architecture tests in .NET.</p><h3>A prompt is not a boundary</h3><p>Prompts, AGENTS.md files and repository instructions help a great deal. But they describe an intention; they do not enforce it. An agent may read that the domain must not depend on infrastructure, and three tasks later, with its context filled with other information, introduce precisely that dependency without anyone noticing.</p><p>My position is clear: when we delegate changes to agents, agreed architectural boundaries must become executable checks that are mandatory in CI. Not recommendations. This does not mean you have to use my library. It means important constraints need automated verification, and changes to those constraints require human review.</p><blockquote>A prompt explains the intention. A test enforces it, whether it is the first task or the fiftieth.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pTJu61-34zpM1ODBqewwkA.png" /><figcaption><em>Figure 1. Architectural intent is converted into an executable rule before an agent changes the code.</em></figcaption></figure><p>The guardrail fits into the workflow as follows:</p><ol><li>A person agrees on the boundary and writes a synthetic example that violates it.</li><li>The boundary becomes an explicit test, with its own regression test.</li><li>The agent implements the requested change.</li><li>CI runs the build, behavior tests, architecture rules and inventory. If a check fails, the agent receives a diagnostic identifying the offending type and rule.</li><li>A person reviews the code and, especially, any changes to the rules.</li></ol><p>The uncomfortable part is the last step. If an agent can simply remove a failing rule without review, the guardrail becomes another editable suggestion. Protecting main and reviewing changes to architecture tests are part of the mechanism, not optional extras.</p><h3>NetArchTest: prolonged inactivity does not mean abandonment</h3><p>Another reason I started this work was to examine the state of NetArchTest, a familiar choice for architecture tests in .NET. Before calling a library dead, I prefer to distinguish evidence from interpretation.</p><p>The original article recorded the following observations as of December 1, 2026:</p><ul><li>The official <a href="https://api.nuget.org/v3-flatcontainer/netarchtest.rules/index.json">NuGet index</a> listed NetArchTest.Rules 1.3.2 as the latest version. Its GitHub release was dated May 23, 2021.</li><li>The latest commit on the main branch was dated July 3, 2023, and updated Mono.Cecil. It would therefore be inaccurate to say that no work had taken place since 2021.</li><li>The <a href="https://github.com/BenMorris/NetArchTest">repository</a> was not archived.</li></ul><p>These observations are time-sensitive, so verify them when you read this article. The defensible conclusion is a long period without releases, not confirmed abandonment. For a tool that underpins architectural controls, this uncertainty is a risk I prefer to manage explicitly.</p><p>Alternatives include <a href="https://github.com/TNG/ArchUnitNET">ArchUnitNET</a> and forks such as <a href="https://www.nuget.org/packages/NetArchTest.eNhancedEdition">NetArchTest.eNhancedEdition</a>. If you need broader analysis, they are reasonable options to investigate.</p><p>I chose a different approach: reduce the scope rather than replicate capabilities. ArchitectureGuardrails is neither a fork nor a drop-in replacement for NetArchTest, and it does not attempt to reproduce its API or coverage.</p><h3>What ArchitectureGuardrails is — and what it is not</h3><p>ArchitectureGuardrails is an MIT-licensed library targeting net10.0, consumable from .NET 10 and .NET 11. It has no runtime package dependencies: only the .NET Base Class Library (BCL).</p><p>It provides a deliberately small set of primitives:</p><ul><li>ReflectionMetadata.IsInNamespace matches namespace segments correctly. MyApp.DomainExtra is not part of MyApp.Domain.</li><li>ReflectionMetadata.SignatureDependencies collects types exposed by member signatures, inheritance, interfaces and generic constraints. It handles nested generics, arrays and by-reference types.</li><li>ReflectionMetadata.IsCompilerGenerated identifies compiler-generated types, including closures and async state machines, so they do not inadvertently violate naming rules.</li><li>ProjectDiscovery locates non-test projects and evaluates them with dotnet msbuild.</li><li>ArchitectureInventory and [ArchitectureTestFor] identify projects for which architecture tests have been registered.</li></ul><p>It is not a fluent rules engine, a test framework or an IL scanner. You can keep using your existing test framework; the examples use xUnit v3. It does not inspect method bodies.</p><p>The design decision is that rules belong in your own test project as ordinary tests, not as hidden policies inside a library. The package merely provides the reusable primitives.</p><h3>A rule you can understand at a glance</h3><p>A useful architecture test must answer three questions: what code was selected, which restriction was checked, and which types violated it and why?</p><p>The following example prevents domain signatures from depending on infrastructure:</p><pre>using ArchitectureGuardrails;<br>using Xunit;</pre><pre>public sealed class DomainRules<br>{<br>    [Fact]<br>    [ArchitectureTestFor(typeof(OrderEntity))]<br>    public void DomainSignaturesDoNotDependOnInfrastructure()<br>    {<br>        var domainTypes = typeof(OrderEntity).Assembly.GetTypes()<br>            .Where(type =&gt; ReflectionMetadata.IsInNamespace(<br>                type.Namespace, &quot;MyApp.Domain&quot;))<br>            .ToArray();<br>        Assert.NotEmpty(domainTypes);</pre><pre>        var violations = domainTypes<br>            .SelectMany(type =&gt; ReflectionMetadata.SignatureDependencies(type)<br>                .Where(dependency =&gt; ReflectionMetadata.IsInNamespace(<br>                    dependency.Namespace, &quot;MyApp.Infrastructure&quot;))<br>                .Select(dependency =&gt; $&quot;{type.FullName} -&gt; {dependency.FullName}&quot;))<br>            .ToArray();</pre><pre>        Assert.True(violations.Length == 0,<br>            string.Join(Environment.NewLine, violations));<br>    }<br>}</pre><p>Notice the assertion that the selection is not empty. A typo in the namespace must not turn a meaningful architectural rule into a test that always passes.</p><p>The failure message matters, too. Instead of simply reporting that a rule failed, it tells the developer or the agent which dependency crossed the boundary. That is actionable feedback.</p><p>The repository also includes examples covering entity names, repository namespaces, inheritance, interface implementation, test-framework assembly references and domain signatures that mention outer-layer types.</p><p>For naming or inheritance rules, exclude compiler-generated types when appropriate. Otherwise, a lambda or async method could introduce a compiler-generated type that violates a naming convention intended for handwritten application code.</p><h3>Which projects actually have architecture tests?</h3><p>Having a set of architectural rules is useful. But as a solution grows, how do we know whether a new project has any architecture tests registered against it?</p><p>That is the role of the inventory. Project discovery evaluates non-test C# projects through MSBuild, obtaining their actual assembly names and output paths rather than inferring them from filenames.</p><p>The inventory then associates real test methods with the assemblies they check. The [ArchitectureTestFor] attribute identifies the assembly through a marker type. A framework-specific predicate identifies runnable tests, and the inventory matches the built assembly&#39;s identity, including its module version ID (MVID).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*szASX9-QWUs6YU0quLVUBg.png" /><figcaption><em>Figure 2. A project is GREEN when it has a recognized registered test for its built assembly; otherwise it is RED.</em></figcaption></figure><p>An example using xUnit v3:</p><pre>using System.Reflection;<br>using ArchitectureGuardrails;<br>using Xunit;</pre><pre>public sealed class ArchitectureInventoryTests<br>{<br>    [Fact]<br>    public async Task ProjectsHaveArchitectureTests()<br>    {<br>        var testAssembly = typeof(ArchitectureInventoryTests).Assembly;<br>        var root = ProjectDiscovery.FindRepositoryRoot(<br>            AppContext.BaseDirectory, &quot;MyApp.slnx&quot;);<br>        var projects = await ProjectDiscovery.DiscoverAsync(<br>            root,<br>            ProjectDiscoveryOptions.ForAssembly(testAssembly),<br>            TestContext.Current.CancellationToken);</pre><pre>        var report = ArchitectureInventory.CreateReport(<br>            projects, testAssembly.GetTypes(), IsXunitTest);</pre><pre>        foreach (var entry in report.Uncovered)<br>        {<br>            TestContext.Current.AddWarning(entry.ToString());<br>        }</pre><pre>        ArchitectureInventory.Enforce(report,<br>            InventorySettings.Load(Path.Combine(<br>                AppContext.BaseDirectory, &quot;testsettings.json&quot;)));<br>    }</pre><pre>    private static bool IsXunitTest(MethodInfo method) =&gt;<br>        method.GetCustomAttributes&lt;FactAttribute&gt;()<br>            .Any(attribute =&gt; attribute.Skip is null &amp;&amp; !attribute.Explicit);<br>}</pre><p>By default, uncovered projects produce warnings when the consumer reports them. To turn an uncovered project into a failing inventory test, explicitly enable enforcement:</p><pre>{<br>  &quot;EnforceCoverage&quot;: true<br>}</pre><p>The testsettings.json file must be copied to the test output. Installing the package or adding that configuration file alone does not register or execute any test. Discovery must also use the same build configuration and relevant MSBuild properties used to produce the assemblies.</p><p>There is an important distinction here: <strong>GREEN means registration, not correctness.</strong> It does not mean the tests passed, that all necessary rules exist or that the architecture is fully covered. A missing build output is uncovered, and a marker on a helper method is not a registered test.</p><p>For existing applications, warning mode provides a way to make missing registrations visible before enabling a stricter policy. For new solutions, strict mode can be enforced from the outset when appropriate.</p><h3>What can these checks actually detect?</h3><p>We must be precise about what reflection can and cannot tell us. Inspecting type signatures is not the same as analyzing every instruction in a method body.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_M4d7yjYSdnFu1skTFoG7Q.png" /><figcaption><em>Figure 3. Detection scope of reflection-based signature checks and assembly-reference checks.</em></figcaption></figure><p>If a domain class declares an infrastructure type in a field, property, method parameter or return value, signature inspection can identify the dependency. Inheritance, interfaces and generic constraints are also exposed through metadata.</p><p>But consider a domain method that creates an infrastructure repository locally:</p><pre>public void Process()<br>{<br>    var repository = new SqlOrderRepository();<br>    // Use the repository here.<br>}</pre><p>If the dependency appears only in the method body, signature inspection does not reliably see it. Compiler-generated types can incidentally expose some captured or hoisted local variables through their fields. That is a consequence of compiler lowering, not comprehensive method-body analysis.</p><p>There is no general attribute-dependency analysis, transitive dependency traversal, dataflow analysis or interpretation of reflection strings and dynamically loaded code. Assembly references can provide useful checks where layers reside in separate assemblies, but cannot distinguish namespaces within a single assembly.</p><p>If you need to prohibit dependencies anywhere in a method body, choose a suitable static analyzer or enforce the boundary structurally through separate assemblies and reference constraints. These approaches can complement explicit architecture tests.</p><p>The library should be used with trusted assemblies and ordinary build outputs that retain metadata, not treated as a sandbox or security scanner. MSBuild project evaluation also executes project logic: only discover trusted repositories.</p><h3>Testing the tests themselves</h3><p>Writing an architecture rule is not enough. We should also demonstrate that the rule fails when its constraint is violated.</p><p>The examples in the repository express their rules as a selection of types and a violation function. The same function is exercised against valid synthetic code and a deliberate violation, with the expected diagnostic asserted in the regression test.</p><p>In addition, the repository runs controlled source mutations. The mutation script works in an isolated temporary copy, introduces a compile-valid architectural violation and verifies that the expected rule fails.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YRQi4MPvJ-PpW6ZfbWu0Hw.png" /><figcaption><em>Figure 4. Controlled mutations provide evidence that selected architectural violations are detected.</em></figcaption></figure><p>For example, removing the Entity suffix from a domain entity should trigger the naming rule. Introducing a forbidden outer-layer dependency into a domain signature should trigger the corresponding signature rule.</p><p>The goal is not to claim an exhaustive mutation score. These are selected mutations, and their detection is evidence that the tested rules work against those cases. It is not proof of complete fault detection.</p><p>See the <a href="https://github.com/jmfloreszazo/ArchitectureTests/blob/main/docs/mutation-testing.md">controlled mutation checks</a> for the implementation and limitations.</p><h3>Try it in your own solution</h3><p>Add the NuGet package to your architecture-test project:</p><pre>dotnet add .\tests\MyApp.ArchitectureTests package ArchitectureGuardrails</pre><p>The package does not include a test framework. Keep the framework you already use and write rules that reflect your application’s architectural decisions.</p><p>Start with a small number of important, stable constraints. Make sure each rule selects meaningful code, reports useful failures and has a deliberate violation that proves it works. Add the inventory where it provides value. Run the tests as required CI checks, and protect the process for changing them.</p><p>The repository’s own verification uses PowerShell 7 and the .NET SDKs:</p><pre>pwsh .\tools\Verify.ps1 -Framework net10.0<br>pwsh .\tools\Verify.ps1 -Framework net11.0<br>pwsh .\tools\Test-Mutations.ps1 -Framework net10.0</pre><p>The documented CI matrix covers Windows and Linux with .NET 10 and .NET 11. Verification includes build, tests, formatting, dependency policy, packaging and an isolated NuGet consumer. Controlled mutations are an additional check. The library stays at net10.0 throughout the matrix.</p><p>The repository documents release status in its README. Contributions follow a fork, branch, pull request and CI workflow. Important changes must pass the required checks, and publishing is a separate trusted post-merge process.</p><ul><li><a href="https://github.com/jmfloreszazo/ArchitectureTests">GitHub — ArchitectureTests</a></li><li><a href="https://www.nuget.org/packages/ArchitectureGuardrails/">NuGet — ArchitectureGuardrails</a></li><li><a href="https://github.com/jmfloreszazo/ArchitectureTests/blob/main/docs/architecture.md">Design and limitations</a></li><li><a href="https://github.com/jmfloreszazo/ArchitectureTests/blob/main/AGENTS.md">Instructions for AI coding agents</a></li><li><a href="https://github.com/jmfloreszazo/ArchitectureTests/blob/main/CONTRIBUTING.md">Contribution guide</a></li></ul><h3>The architecture is still our responsibility</h3><p>The library is not the point. You can use ArchitectureGuardrails, ArchUnitNET, another tool or your own assertions. What matters is that agreed architectural restrictions become checks that cannot be silently ignored when an agent modifies the system.</p><p>An agent can propose changes, fix errors and respond to feedback. It should not be able to redefine the rules that govern those changes simply because a test fails.</p><p>The more we delegate, the more important it becomes to define what must remain true — and to make those constraints executable, visible and reviewable.</p><p><strong>The prompt explains. The test enforces.</strong></p><p>Originally published in Spanish on <a href="https://jmfloreszazo.com/guardrails-de-arquitectura-para-agentes-en-net-el-prompt-explica-el-test-obliga/">jmfloreszazo.com</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=549c0f1ac328" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Auditing Copilot agents in VS Code: git is the only version that matters (and auditing isn’t the…]]></title>
            <link>https://medium.com/@jmfloreszazo/auditing-copilot-agents-in-vs-code-git-is-the-only-version-that-matters-and-auditing-isnt-the-95e6eac88d85?source=rss-371533c2f202------2</link>
            <guid isPermaLink="false">https://medium.com/p/95e6eac88d85</guid>
            <category><![CDATA[vscode]]></category>
            <category><![CDATA[opentelemetry]]></category>
            <category><![CDATA[audit]]></category>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Jose Maria Flores Zazo]]></dc:creator>
            <pubDate>Wed, 29 Jul 2026 09:01:46 GMT</pubDate>
            <atom:updated>2026-07-29T09:01:46.829Z</atom:updated>
            <content:encoded><![CDATA[<h3>Auditing Copilot agents in VS Code: git is the only version that matters (and auditing isn’t the same as preventing)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*KLA-qFYP0n9n0GbyKknP8w.png" /></figure><p>A custom Copilot agent in VS Code is, in the end, a markdown file in .github/agents/. You open it, edit the system prompt, invoke it, and it responds. Convenient. The problem shows up when someone asks the boring question: <strong>which prompt actually ran last time? The one in git, or the one that developer had sitting uncommitted on their disk?</strong> And everything else follows from there: versions, drift, and who ran what.</p><p>So I did what I always do: instead of arguing it with a diagram, I compiled it. This repo captures full telemetry from Copilot Chat custom agents via OpenTelemetry, ships it to Jaeger, and on top of those traces builds an audit and drift report.</p><h3>The thesis, in one sentence</h3><p><strong>The trace knows what ran. Git knows what should have run. Drift is the subtraction.</strong></p><p>You don’t need a version: field in the agent frontmatter. You don&#39;t need a separate registry. The whole design fits in two facts already sitting in front of you:</p><ul><li>Every trace carries copilot_chat.repo.head_commit_hash — the exact commit of the workspace at invocation time.</li><li>Every trace carries gen_ai.input.messages — the system prompt VS Code <strong>actually sent to the model</strong>, not the one currently on disk.</li></ul><p>The first tells you which definition was <em>supposed</em> to run. The second tells you what <em>actually</em> ran. Compare one against the other and drift stops being a suspicion and becomes an assertion.</p><h3>Git as the source of truth</h3><p>Versioning leans on git and nothing else. Each commit hash pins down exactly which agent definition was in the repo when it was invoked:</p><pre>trace A  →  commit abc123  →  summary.agent.md at that commit = definition V1<br>trace B  →  commit def456  →  summary.agent.md at that commit = definition V2</pre><p>Want to know which instructions a trace from three weeks ago used? git show &lt;commit&gt;:.github/agents/summary.agent.md. No tribal memory, no &quot;I think the prompt said something like…&quot; back then. The SHA is the version.</p><p>And here’s the nuance that avoids false positives: the report distinguishes two commit columns. <strong>RepoCommit</strong> is the repo HEAD (changes with any commit to any file); <strong>AgentVer</strong> is the last commit that touched <em>that specific</em> .agent.md. If the repo moved forward but the agent didn&#39;t change, AgentVer stays put and the drift report marks [OK]. No noise.</p><h3>The four states of the report</h3><p>The verifier reads the Jaeger traces, rebuilds the invocation table, and emits a report with four verdicts. The interesting one isn’t [OK]:</p><pre>[DIRTY] summary  — 2 invocation(s) with local uncommitted changes<br>          The executed system prompt does not match what is in git.</pre><p>[DIRTY] is the gem. The script pulls the real system prompt out of the trace (gen_ai.input.messages) and compares it against git show &lt;AgentVer&gt;:.github/agents/&lt;agent&gt;.agent.md. If the body in git doesn&#39;t appear in the executed prompt, <strong>someone ran with local changes they never pushed</strong>. It requires captureContent: true, and without it you&#39;re blind to this. The other three — [DRIFT] (two distinct versions in a short window), [NEW] (an agent that didn&#39;t exist at the baseline commit), [OK] (verified against git) — round out the picture.</p><h3>What you gain: audit for free</h3><p>This is what actually interests me. If every invocation leaves an ordered trace with who, which commit, which prompt, which tools, and how many tokens, <strong>that trace is already the audit trail.</strong> Nothing extra to instrument. User identity (enduser.id, enduser.name, enduser.github.login) is injected automatically at startup, with nothing hardcoded: anyone who clones the repo and runs the script is identified in Jaeger&#39;s <em>Process</em> panel. Cost per agent, per version, per user — it all falls out of the same property that gives you traceability.</p><h3>The uncomfortable part: auditing isn’t preventing</h3><p>I don’t sell smoke, so let me say it plainly: <strong>this gives you forensic visibility, not prevention.</strong> You can reconstruct precisely what happened, but you can’t stop it from happening. A developer edits their local .agent.md, invokes it as many times as they like, and you&#39;ll only see it <em>afterwards</em>, in the trace. Worse: they can open any workspace in any folder, create their own .github/agents/, and run whatever they want — VS Code doesn&#39;t restrict which paths it loads agents from.</p><p>This is where most options collapse. Locking files with icacls, CODEOWNERS, read-only submodules, MDM-based sync… they all protect <em>the copy</em>, and they can all be bypassed from the developer&#39;s machine. <strong>The only one that can&#39;t be bypassed lives at the network boundary:</strong> an API Gateway with TLS inspection that looks at the gen_ai.input.messages[system] of the real call to the LLM and compares it against a registry of authorized bodies. It doesn&#39;t matter where the file came from: the executed content travels in that HTTP request, and the gateway sees it. Combine it with a server-side check in CI/CD (which the developer can&#39;t modify) and you have a commit gate <em>and</em> a runtime gate, neither of them bypassable from local.</p><h3>My take</h3><p>We’ve spent months treating custom agents as harmless config files. They’re not: an .agent.md is a system prompt that governs how the AI behaves over your code, and in a regulated environment that&#39;s supply-chain surface like any other dependency. The difference is that you demand a hash and a version from a dependency, and from the agent you demand nothing.</p><p>The nice thing about leaning on git and the trace is that traceability comes almost for free. The honest thing is to admit that traceability, on its own, is forensic: it tells you the story after it’s been filmed. If you genuinely need to <em>prevent</em> — not just know — the place to do it isn’t the developer’s disk, it’s the network. This repo is the evidence layer; the gateway is the control layer. You need both, and confusing them is what separates “I have telemetry” from “I govern my agents.”</p><p><a href="https://github.com/jmfloreszazo/otel-custom-agents-vscode">Go to GitHub</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95e6eac88d85" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[From the model that answers to the agent that works: Agent Harness and CodeAct with C#]]></title>
            <link>https://medium.com/@jmfloreszazo/from-the-model-that-answers-to-the-agent-that-works-agent-harness-and-codeact-with-c-0c32a7dade5e?source=rss-371533c2f202------2</link>
            <guid isPermaLink="false">https://medium.com/p/0c32a7dade5e</guid>
            <category><![CDATA[dotnet]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[microsoft-agent-framework]]></category>
            <dc:creator><![CDATA[Jose Maria Flores Zazo]]></dc:creator>
            <pubDate>Tue, 28 Jul 2026 11:05:02 GMT</pubDate>
            <atom:updated>2026-07-28T11:05:02.960Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How to separate the control plane (Agent Harness) from the execution plane (CodeAct) in the Microsoft Agent Framework, with a real case in C# and .NET 10.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/724/1*ywznUAaJ1AvfD5Q9Nl4xcA.png" /></figure><p>Over the last few months we have turned the word <strong>agent</strong> into an overly convenient label.</p><p>We call a prompt an agent. We call a model with two functions an agent. We call several models exchanging text — with no state, no governance, and no verifiable definition of when they are done — a multi-agent system.</p><p>The problem is not only terminological.</p><p>When we confuse the model with the complete system, we end up building solutions that work in a demo but cannot answer basic architectural questions:</p><ul><li>What task is it executing?</li><li>What steps has it completed?</li><li>What information has it retained?</li><li>What tools can it use?</li><li>What operation requires approval?</li><li>What happens when a tool fails?</li><li>When should it stop?</li><li>How can we reconstruct what happened?</li></ul><p>Microsoft Agent Framework introduces two concepts that help separate these responsibilities correctly:</p><ul><li><strong>Agent Harness</strong>, as the operational environment that governs the agent.</li><li><strong>CodeAct</strong>, as the mechanism that lets the model express part of the work as code and run it in a sandbox.</li></ul><p>They are not two alternatives.</p><p>We should not choose between Harness or CodeAct.</p><p>Agent Harness controls the work. CodeAct executes certain parts of that work compactly.</p><p>They are not two parallel layers, nor two alternative ways of building an agent. CodeAct is incorporated <em>inside</em> the Harness as a specialized capability for executing a specific part of the work.</p><h3>The model is not the agent</h3><p>A language model can receive an instruction and produce a response.</p><p>That does not mean it can, on its own, sustain a long enterprise task.</p><p>Suppose we ask:</p><blockquote><em>Analyze eighty applications, retrieve their incidents, costs and dependencies, compute a risk index, explain the ranking, and create an initiative for the top three.</em></blockquote><p>The answer does not depend solely on the model’s ability to reason.</p><p>We need to solve:</p><ul><li>how to decompose the goal;</li><li>how to retain state;</li><li>how to record what has been completed;</li><li>how to manage context;</li><li>how to call tools;</li><li>how to request approvals;</li><li>how to recover from errors;</li><li>how to decide the work is finished.</li></ul><p>We can express the difference like this:</p><pre>Model<br>  = generation and reasoning</pre><pre>Agent<br>  = model<br>  + instructions<br>  + tools<br>  + state<br>  + memory<br>  + policies<br>  + execution loop<br>  + observability<br>  + termination criterion</pre><p>The model provides cognitive capability. The Harness provides operational capability, and CodeAct provides a compact way to execute certain tool-intensive subtasks.</p><h3>Agent Harness: the control plane</h3><p>Microsoft defines an agent harness as the scaffolding that turns a model into an agent capable of working on long, multi-step tasks.</p><p>In C#, the Harness wraps an IChatClient via AsHarnessAgent(...).</p><p>Its responsibility is not to compute the scoring of our portfolio. Its responsibility is to control the entire process:</p><ul><li>planning;</li><li>plan and execute modes;</li><li>task list;</li><li>session;</li><li>history;</li><li>context compaction;</li><li>memory;</li><li>file access;</li><li>approvals;</li><li>tool calls;</li><li>loop evaluation;</li><li>OpenTelemetry.</li></ul><p>This is the first important separation in the article:</p><p><strong>The Harness is not a tool the agent calls. It is the environment that decides how the agent progresses.</strong></p><p>The conceptual flow is:</p><pre>User<br>  |<br>  v<br>Harness<br>  |<br>  +-- interprets the intent<br>  +-- builds the plan<br>  +-- creates the todos<br>  +-- retains state<br>  +-- applies policies<br>  +-- executes tools<br>  +-- checks progress<br>  |<br>  v<br>Result</pre><p>This separation fits a principle I use recurrently in enterprise AI architecture:</p><blockquote><strong>Elevate before Delegate.</strong></blockquote><p>Before delegating autonomous execution, we elevate the intent:</p><ul><li>we make it explicit;</li><li>we identify constraints;</li><li>we establish contracts;</li><li>we define evidence;</li><li>we agree on what may change.</li></ul><p>The Harness provides the control plane where we can implement that discipline: explicit intent, planning, tracking, policies, and approval.</p><h3>Planning does not mean executing</h3><p>The Harness includes a mode pattern that separates two behaviors.</p><p><strong>Plan mode.</strong> The agent:</p><ul><li>understands the request;</li><li>asks when an essential constraint is missing;</li><li>proposes a strategy;</li><li>creates a task list;</li><li>states which actions it intends to execute.</li></ul><p><strong>Execute mode.</strong> The agent:</p><ul><li>works on the tasks;</li><li>uses tools;</li><li>updates progress;</li><li>produces artifacts;</li><li>continues until the termination condition is reached.</li></ul><p>This separation is far more than a user-experience improvement.</p><p>It is a <strong>governance boundary</strong>.</p><p>When the user says:</p><blockquote><em>Help me modernize Payments Legacy.</em></blockquote><p>we must not translate that sentence directly into: create epic, modify repository, deploy infrastructure, notify the team.</p><p>First we must determine what modernize means: rehost, replatform, refactor, replace, retire, encapsulate, strangle progressively, or keep temporarily.</p><p>The Harness controls that process.</p><p>CodeAct has not appeared yet, and that is precisely the point.</p><p>CodeAct does not resolve intent, planning, or governance. It should only enter once the Harness has already determined what work must be executed, with which tools, and under which constraints.</p><h3>The problem of tool-by-tool orchestration</h3><p>Once the analysis is approved, we need to process the portfolio.</p><p>For each application we must: retrieve its data, query incidents, query costs, normalize metrics, compute a score, aggregate results, and order the ranking.</p><p>With traditional function calling, the flow can turn into:</p><pre>Model -&gt; get_applications<br>Model -&gt; get_incidents(APP-001)<br>Model -&gt; get_costs(APP-001)<br>Model -&gt; get_incidents(APP-002)<br>Model -&gt; get_costs(APP-002)<br>...</pre><p>Every call returns to the model.</p><p>The model decides the next tool, receives the result, reasons again, and repeats.</p><p>This introduces more turns, more tokens, more latency, more conversational state, more chances of drift, and more difficulty reviewing the workflow as a single unit.</p><p>The bottleneck is not always the model’s intelligence.</p><p>In many cases it is orchestration overhead.</p><h3>CodeAct: expressing the workflow as code</h3><p>CodeAct introduces a tool called execute_code.</p><p>Instead of asking the model to emit one tool call at a time, we let it write a short program that uses loops, applies conditions, transforms data, aggregates results, calls host tools, and prints a structured result.</p><p>The flow becomes:</p><pre>Model<br>  |<br>  v<br>execute_code(program)<br>  |<br>  v<br>Sandbox<br>  |<br>  +-- call_tool(&quot;get_applications&quot;)<br>  +-- for application in applications<br>  +-- call_tool(&quot;get_incidents&quot;, ...)<br>  +-- call_tool(&quot;get_costs&quot;, ...)<br>  +-- normalize<br>  +-- scoring<br>  +-- sort<br>  |<br>  v<br>Result</pre><p>The fundamental difference is not Python versus C#.</p><p>The application, the tools, the credentials, the contracts, and the enterprise integrations still live in C#.</p><p>Python is the guest language the model uses inside the sandbox to express a dynamic composition.</p><p>C# keeps control of the capabilities. The guest code controls the flow within those capabilities.</p><h3>How Harness and CodeAct fit together</h3><p>Now we can connect both concepts without mixing them.</p><p><strong>Harness</strong> answers these questions:</p><ul><li>What is the goal?</li><li>What is left to do?</li><li>Which mode are we in?</li><li>What information must be retained?</li><li>What operation requires approval?</li><li>When does the task finish?</li><li>How do we observe the execution?</li></ul><p><strong>CodeAct</strong> answers these:</p><ul><li>How do I iterate over fifty items?</li><li>How do I combine three tools?</li><li>How do I filter and aggregate?</li><li>How do I normalize values?</li><li>How do I produce a structured result without returning to the model at every step?</li></ul><p>The complete architecture is:</p><pre>┌────────────────────────────────────────────┐<br>│ User                                       │<br>└───────────────────┬────────────────────────┘<br>                    │<br>                    v<br>┌────────────────────────────────────────────┐<br>│ Agent Harness                              │<br>│                                            │<br>│ intent · plan · todos · session            │<br>│ context · memory · approval · tracing      │<br>└───────────────────┬────────────────────────┘<br>                    │<br>                    v<br>┌────────────────────────────────────────────┐<br>│ Model                                      │<br>└───────────────┬─────────────────┬──────────┘<br>                │                 │<br>                v                 v<br>       execute_code       direct tool<br>                │                 │<br>                v                 v<br>┌──────────────────────┐  ┌───────────────────┐<br>│ Hyperlight sandbox   │  │ sensitive op      │<br>│                      │  │                   │<br>│ loops                │  │ create work item  │<br>│ computations         │  │ send email        │<br>│ call_tool(...)       │  │ modify resource   │<br>└──────────┬───────────┘  └─────────┬─────────┘<br>           │                        │<br>           v                        v<br>┌────────────────────────────────────────────┐<br>│ Bounded C# tools                           │<br>│ CMDB · observability · FinOps · DevOps     │<br>└────────────────────────────────────────────┘</pre><p>This is the thesis of the article:</p><p><strong>Harness governs autonomy. CodeAct compresses execution.</strong></p><p>In implementation terms, CodeAct is not configured as an independent agent.</p><h3>Use case: prioritizing legacy modernization</h3><p>The demo works with four applications:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*KQT0z1nXYnkhHMZvfhcL9A.png" /></figure><p>For each application we also have: monthly incidents, severity 1 and 2 incidents, annual operating cost, and average change lead time.</p><p>The scoring formula:</p><ul><li>30% business criticality</li><li>25% incident pressure</li><li>20% operating cost</li><li>15% change lead time</li><li>10% age</li></ul><p>The user’s intent is to decide which application to study first.</p><p>The analysis must not automatically create any work item. That operation will be a later step.</p><h3>First we validate the domain without AI</h3><p>Before introducing a model, we must prove the domain is correct.</p><p>The solution includes:</p><pre>src/<br>  ModernizationAgent.Core/<br>  ModernizationAgent.LocalDemo/</pre><p>The projects use:</p><pre>&lt;TargetFramework&gt;net10.0&lt;/TargetFramework&gt;</pre><p>The read interface is deliberately small:</p><pre>public interface IPortfolioReader<br>{<br>    IReadOnlyList&lt;ApplicationInfo&gt; GetApplications();<br>    IncidentSummary GetIncidents(string applicationId);<br>    CostSummary GetCosts(string applicationId);<br>}</pre><p>We do not expose:</p><pre>ExecuteSql(string sql)<br>CallApi(string url, string body)<br>RunCommand(string command)</pre><p>Those functions are not enterprise tools.</p><p>They are <strong>semantic back doors</strong>.</p><p>An agent tool must represent a concrete, reviewable capability.</p><p>The scoring algorithm runs locally and validates the ranking:</p><pre>1. Payments Legacy        100.00<br>2. Customer Operations     68.78<br>3. Portfolio Reporting     37.83<br>4. Notification Service    18.32</pre><p>This step matters because it prevents us from attributing to the model a logic that we must control ourselves.</p><p>In the demo we let the generated code reproduce that formula to show how CodeAct works. In production, however, the weights and rules should be encapsulated in a C# function, a versioned policy, or a domain service.</p><p>The model can decide which data to retrieve and how to compose the analysis. It should not have authority to silently redefine how the organization computes risk.</p><h3>C# tools for CodeAct</h3><p>In the real integration we register three read tools:</p><pre>AIFunction getApplications = AIFunctionFactory.Create(<br>    () =&gt; applications,<br>    name: &quot;get_applications&quot;,<br>    description:<br>        &quot;Returns the application portfolio with ID, name, technology, &quot; +<br>        &quot;age in years, and business criticality (0-100). Read-only.&quot;);<br>AIFunction getIncidents = AIFunctionFactory.Create(<br>    (string applicationId) =&gt; GetIncidents(applicationId),<br>    name: &quot;get_incidents&quot;,<br>    description:<br>        &quot;Returns incident data for an application. &quot; +<br>        &quot;Parameter name: applicationId. Read-only.&quot;);<br>AIFunction getCosts = AIFunctionFactory.Create(<br>    (string applicationId) =&gt; GetCosts(applicationId),<br>    name: &quot;get_costs&quot;,<br>    description:<br>        &quot;Returns annual operating cost and change lead time. &quot; +<br>        &quot;Parameter name: applicationId. Read-only.&quot;);</pre><p>Parameter names and return shapes matter.</p><p>In traditional function calling the model selects a tool.</p><p>In CodeAct the model writes code against the contract.</p><p>An ambiguous description does not just produce a bad call. It can produce an incorrect program.</p><h3>Registering the tools inside CodeAct</h3><p>We create the Hyperlight provider:</p><pre>var codeActOptions =<br>    HyperlightCodeActProviderOptions.CreateForWasm(<br>        PythonGuestModule.GetModulePath());<br>codeActOptions.Tools =<br>[<br>    getApplications,<br>    getIncidents,<br>    getCosts<br>];<br>using var codeAct =<br>    new HyperlightCodeActProvider(codeActOptions);</pre><p>These tools become available inside the sandbox via:</p><pre>call_tool(&quot;get_applications&quot;)<br>call_tool(&quot;get_incidents&quot;, applicationId=&quot;APP-001&quot;)<br>call_tool(&quot;get_costs&quot;, applicationId=&quot;APP-001&quot;)</pre><p>We do not need to also expose them as direct tools to the model.</p><p>We want the agent to use a coherent composition, not fall back to the fragmented-call pattern.</p><h3>The program the model might generate</h3><p>CodeAct could produce a program equivalent to:</p><pre>applications = call_tool(&quot;get_applications&quot;)<br>rows = []<br>for application in applications:<br>    application_id = application[&quot;id&quot;]<br>    incidents = call_tool(<br>        &quot;get_incidents&quot;,<br>        applicationId=application_id<br>    )<br>    costs = call_tool(<br>        &quot;get_costs&quot;,<br>        applicationId=application_id<br>    )<br>    rows.append({<br>        &quot;application&quot;: application,<br>        &quot;incidents&quot;:   incidents,<br>        &quot;costs&quot;:       costs<br>    })<br>max_incidents = max(row[&quot;incidents&quot;][&quot;monthlyIncidents&quot;]      for row in rows)<br>max_cost      = max(row[&quot;costs&quot;][&quot;annualRunCost&quot;]             for row in rows)<br>max_lead_time = max(row[&quot;costs&quot;][&quot;averageChangeLeadTimeDays&quot;] for row in rows)<br>max_age       = max(row[&quot;application&quot;][&quot;ageYears&quot;]            for row in rows)<br>ranking = []<br>for row in rows:<br>    app       = row[&quot;application&quot;]<br>    incidents = row[&quot;incidents&quot;]<br>    costs     = row[&quot;costs&quot;]<br>    incident_score  = incidents[&quot;monthlyIncidents&quot;]      / max_incidents  * 100<br>    cost_score      = costs[&quot;annualRunCost&quot;]             / max_cost       * 100<br>    lead_time_score = costs[&quot;averageChangeLeadTimeDays&quot;] / max_lead_time  * 100<br>    age_score       = app[&quot;ageYears&quot;]                    / max_age        * 100<br>    final_score = (<br>        app[&quot;criticality&quot;] * 0.30<br>        + incident_score   * 0.25<br>        + cost_score       * 0.20<br>        + lead_time_score  * 0.15<br>        + age_score        * 0.10<br>    )<br>    ranking.append({<br>        &quot;applicationId&quot;: app[&quot;id&quot;],<br>        &quot;name&quot;:          app[&quot;name&quot;],<br>        &quot;technology&quot;:    app[&quot;technology&quot;],<br>        &quot;score&quot;:         round(final_score, 2)<br>    })<br>ranking.sort(key=lambda item: item[&quot;score&quot;], reverse=True)<br>print(ranking)</pre><p>The value is not that Python can divide numbers.</p><p>The value is concentrating retrieval, iteration, transformation, normalization, scoring, and sorting into a single executable, reviewable unit.</p><p>In this demo, the generated program also contains the formula so the flow can be understood end to end. In production, the recommended approach would be to replace that computation with a specific, versioned tool — for example calculate_modernization_score — keeping only the dynamic composition inside CodeAct.</p><p>When you go to GitHub you can locate in Program.cs (/preview/HarnessCodeAct/) exactly where this happens:</p><p>LineComment158// Python generation happens here: PythonGuestModule supplies a WASM-compiled Python interpreter...174// The ## CodeAct section below is what causes the model to emit Python...</p><p>The first explains the execution mechanism (the WASM interpreter). The second explains the cause of the behavior (the instruction in the system prompt). They are the two moments of the flow you can reference in the article.</p><h3>The write operation must stay outside</h3><p>After the analysis, the user may ask:</p><blockquote><em>Create a work item for Payments Legacy.</em></blockquote><p>The C# tool is:</p><pre>AIFunction createModernizationWorkItem =<br>    new ApprovalRequiredAIFunction(<br>        AIFunctionFactory.Create(<br>            (<br>                string applicationId,<br>                string title,<br>                string rationale,<br>                decimal priorityScore<br>            ) =&gt; CreateWorkItem(...),<br>            name: &quot;create_modernization_work_item&quot;,<br>            description:<br>                &quot;Creates a work item in an external system. &quot; +<br>                &quot;This is a side-effecting operation that requires explicit approval.&quot;));</pre><p>This tool is not registered in codeActOptions.Tools.</p><p>It is added directly to the agent:</p><pre>ChatOptions = new ChatOptions<br>{<br>    Instructions = instructions,<br>    Tools = [createModernizationWorkItem]<br>}</pre><p>Why?</p><p>Because CodeAct approval currently applies to the entire execute_code call.</p><p>If a sensitive operation is hidden inside ten call_tool(...) invocations, we lose individual approval.</p><p><strong>Not everything that can be composed should be composed.</strong></p><p>The write needs a boundary different from the read: direct tool, controlled identity, individual approval, idempotency, and traceability.</p><h3>Building the HarnessAgent</h3><p>The integration uses Microsoft Foundry:</p><pre>AIAgent agent =<br>    new AIProjectClient(<br>        new Uri(endpoint),<br>        new DefaultAzureCredential(),<br>        new AIProjectClientOptions<br>        {<br>            RetryPolicy = new ClientRetryPolicy(3)<br>        })<br>    .GetProjectOpenAIClient()<br>    .GetResponsesClient()<br>    .AsIChatClient(deploymentName)<br>    .AsHarnessAgent(<br>        new HarnessAgentOptions<br>        {<br>            MaxContextWindowTokens  = MaxContextWindowTokens,<br>            MaxOutputTokens         = MaxOutputTokens,<br>            Name                    = &quot;LegacyModernizationAgent&quot;,<br>            OpenTelemetrySourceName = TracingSourceName,<br>            FileMemoryStore =<br>                new FileSystemAgentFileStore(&quot;agent-files&quot;),<br>            AIContextProviders = [codeAct],<br>            ChatOptions = new ChatOptions<br>            {<br>                Instructions = instructions,<br>                Tools        = [createModernizationWorkItem]<br>            }<br>        });</pre><p>This block shows the complete connection:</p><ul><li>Foundry provides the model;</li><li>AsIChatClient adapts it;</li><li>AsHarnessAgent adds the control plane;</li><li>AIContextProviders adds CodeAct;</li><li>ChatOptions.Tools keeps the sensitive tool as a direct call.</li></ul><p>CodeAct does not run alongside the Harness as an independent agent. It is incorporated inside the Harness as a specialized context and execution provider.</p><p>This is the technical connection between the two concepts and the reason they do not compete.</p><h3>Session, modes, and tasks</h3><p>The official sample uses an interactive console.</p><p>This matters because a Harness is not meant only for a stateless call.</p><p>It needs a session where it retains the plan, the todos, the history, the decisions, the approvals, and the progress.</p><p>The console lets you use /mode and /todos.</p><p>A reasonable test flow is:</p><pre>Analyze the full portfolio. Compute the modernization priority index,<br>sort the results, and explain the top position. Do not create any<br>work item.</pre><p>Then:</p><pre>/todos</pre><p>And finally:</p><pre>Create the work item for the top application.</pre><p>The analysis must run via CodeAct.</p><p>The write must stop to request approval.</p><p>That is the architectural demo: verifying that the Harness keeps control of the process, CodeAct runs the analysis, and the write operation stops to request approval. The goal is not merely to obtain the number 100.</p><h3>The sandbox does not make an unsafe tool safe</h3><p>Hyperlight runs the guest code in an isolated environment.</p><p>However, call_tool(...) returns to the host process.</p><p>The C# tool may have credentials, network access, Azure access, database clients, and access to corporate systems.</p><p>Therefore, the sandbox protects the host from the guest code, but it does not protect our systems from a badly designed host tool.</p><p>A tool such as:</p><pre>RunSql(string sql)</pre><p>remains dangerous even when called from a micro-VM.</p><p>Real security needs narrow contracts, validation, authorization, least privilege, rate limits, timeouts, auditing, idempotency, and protection against indirect prompt injection.</p><p>The sandbox is an isolation layer. It is not a complete governance model.</p><p>The practical rule is simple: do not grant a tool more capability than you would be willing to grant any other untrusted component of the application.</p><h3>Azure infrastructure with Bicep</h3><p>The demo includes two templates.</p><p><strong>main.bicep</strong> deploys:</p><ul><li>a Microsoft.CognitiveServices/accounts resource with kind: AIServices;</li><li>a Foundry project;</li><li>a Log Analytics workspace;</li><li>an Application Insights component (the destination for the OpenTelemetry traces);</li><li>a managed identity;</li><li>local authentication disabled;</li><li>an optional Foundry User role assignment.</li></ul><p>The main output is foundryProjectEndpoint, of the form:</p><pre>https://&lt;resource&gt;.services.ai.azure.com/api/projects/&lt;project&gt;</pre><p><strong>model.bicep</strong> deploys a model on the existing resource.</p><p>The template does not hardcode a rigid combination of model, version, format, and SKU.</p><p>Availability depends on region, subscription, quota, and catalog. First we must query:</p><p>bash</p><pre>az cognitiveservices account list-models \<br>  --name &lt;foundry-name&gt; \<br>  --resource-group &lt;resource-group&gt;</pre><p>Then we move to Bicep: modelName, modelVersion, modelFormat, skuName, capacity.</p><p>This avoids another common form of false reproducibility: publishing a template that compiles but only works in the subscription of whoever wrote the article.</p><p>The demo’s Bicep deploys Foundry, but not the Hyperlight host. They are two distinct infrastructure planes: Foundry provides the model and the project; the preview .NET Hyperlight backend currently requires a Linux host with KVM.</p><h3>Where to run Hyperlight</h3><p>The Bicep infrastructure deploys Foundry.</p><p>It does not automatically deploy the CodeAct host.</p><p>The preview .NET Hyperlight backend is currently only available for Linux with KVM. Hyperlight as a runtime also supports MSHV and the Windows Hypervisor Platform (WHP), but the .NET CodeAct connector does not yet publish those variants.</p><p>Therefore, we can run the demo on a compatible Linux workstation, a Linux VM with adequate virtualization, a development environment that exposes KVM, or a corporate host prepared for micro-VMs.</p><p>We must not deploy it arbitrarily on any PaaS and assume KVM will be available.</p><p>In production, host selection is part of the architecture: virtualization compatibility, managed identity, connectivity, observability, hardening, patching, isolation, and cost.</p><p>Therefore, we must not claim the complete solution is serverless, nor that it can be moved unchanged to any managed Azure service. Virtualization compatibility — KVM in the current .NET backend — is an architectural requirement, not a deployment detail.</p><h3>Observability</h3><p>A correct result does not prove the process was correct.</p><p>We need to know what plan the agent generated, which tools it used, what code it executed, what arguments it supplied, what errors it hit, what approvals it received, how many tokens it consumed, how long it took, and what result it returned.</p><p>The demo configures:</p><p>csharp</p><pre>OpenTelemetrySourceName = TracingSourceName</pre><p>and the official sample writes traces via OpenTelemetry.</p><p>In a corporate architecture, those traces should correlate with application requests, API calls, tool operations, changes in external systems, executing identity, approver, and generated artifacts.</p><p>An agent must not be a black box with a pretty text at the end.</p><h3>When to use CodeAct</h3><p>CodeAct fits when the task needs many read tools, loops, filtering, branching, aggregations, computations, transformations, and structured artifacts.</p><p>It does not necessarily fit when there is only one call, the operation is trivial, every action requires approval, the flow must be fully deterministic, or a normal C# function solves the problem better.</p><p>The decision can be summarized in the following table:</p><p>We must not use CodeAct because it is new.</p><p>We must use it when it reduces a real overhead without worsening governance.</p><h3>From the demo to a corporate solution</h3><p>The in-memory functions can be replaced by adapters:</p><pre>get_applications<br>  -&gt; CMDB / ServiceNow / corporate catalog<br>get_incidents<br>  -&gt; Azure Monitor / App Insights / Splunk / Dynatrace<br>get_costs<br>  -&gt; Azure Cost Management / FinOps repository<br>get_dependencies<br>  -&gt; distributed telemetry / repositories / catalog<br>create_modernization_work_item<br>  -&gt; Azure DevOps / GitHub / Jira</pre><p>But the boundary must be preserved:</p><pre>Read and aggregation<br>  -&gt; CodeAct<br>State change<br>  -&gt; approvable direct tool</pre><p>The transition from demo to production is not about swapping in-memory data for real APIs. It is about preserving the same boundaries once identities, permissions, networks, errors, concurrency, and side effects appear.</p><h3>Current limitations</h3><p>As of July 27, 2026:</p><ul><li>Hyperlight CodeAct for .NET is still in preview.</li><li>The backend requires a KVM-compatible host. Hyperlight itself also supports Windows (WHP) and WSL2; the Linux-with-KVM restriction belongs to the .NET connector in preview, not to the runtime.</li><li>Approval applies to the whole execute_code block.</li><li>Tools called via call_tool(...) run on the host.</li><li>Tool contracts must be very precise.</li><li>Model and SKU availability changes by region and subscription.</li><li>The demo uses public access to simplify reproduction. An enterprise environment should evaluate Private Link, private DNS, egress restrictions, and additional network controls.</li><li>The real demo is applied on top of the official repository while the Hyperlight package chain is not yet fully self-contained from NuGet.</li></ul><p>These limitations do not invalidate the pattern.</p><p>They define where we must place the tests and the boundaries.</p><h3>Conclusion</h3><p>Agent Harness and CodeAct solve different problems.</p><p><strong>Agent Harness</strong> answers how an agent should behave during a task: it plans, retains state, manages context, applies policies, requests approvals, observes, and continues until finished.</p><p><strong>CodeAct</strong> answers how to efficiently execute a tool-intensive part: it iterates, filters, transforms, computes, aggregates, and produces results.</p><p>The correct architecture is not <em>“a model with access to everything.”</em></p><p>The correct architecture is:</p><pre>Harness that governs<br>  +<br>CodeAct that executes<br>  +<br>bounded C# tools<br>  +<br>visible approvals<br>  +<br>declarative infrastructure<br>  +<br>traceability</pre><p>It is not about granting more autonomy. It is about making autonomy have boundaries, contracts, and evidence.</p><p>That is the difference between an agent demo and an agentic architecture.</p><h3>Resources</h3><ul><li>Agent Harnesses — Microsoft Agent Framework: <a href="https://devblogs.microsoft.com/agent-framework/the-microsoft-agent-framework-harness-is-now-released/">https://devblogs.microsoft.com/agent-framework/the-microsoft-agent-framework-harness-is-now-released/</a></li><li>CodeAct — Microsoft Agent Framework: <a href="https://learn.microsoft.com/en-us/agent-framework/agents/code_act?pivots=programming-language-csharp">https://learn.microsoft.com/en-us/agent-framework/agents/code_act?pivots=programming-language-csharp</a></li><li><a href="https://github.com/microsoft/agent-framework/tree/main/dotnet/samples/02-agents/Harness/Harness_Step04_CodeExecution">Official Harness Step 04 sample</a></li><li>Demo code — GitHub: <a href="https://github.com/jmfloreszazo/agent-harness-codeact-dotnet10">https://github.com/jmfloreszazo/agent-harness-codeact-dotnet10</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0c32a7dade5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sovereign Cloud, Azure Local and AI: This Is Not About Going Back to the Data Center — It Is About…]]></title>
            <link>https://medium.com/@jmfloreszazo/sovereign-cloud-azure-local-and-ai-this-is-not-about-going-back-to-the-data-center-it-is-about-4c7973a030e4?source=rss-371533c2f202------2</link>
            <guid isPermaLink="false">https://medium.com/p/4c7973a030e4</guid>
            <category><![CDATA[sovereign-cloud]]></category>
            <category><![CDATA[ai-governance]]></category>
            <category><![CDATA[azure-local]]></category>
            <category><![CDATA[enterprise-architecture]]></category>
            <category><![CDATA[hybrid-cloud]]></category>
            <dc:creator><![CDATA[Jose Maria Flores Zazo]]></dc:creator>
            <pubDate>Sat, 09 May 2026 14:28:40 GMT</pubDate>
            <atom:updated>2026-05-09T14:28:40.190Z</atom:updated>
            <content:encoded><![CDATA[<h3>Sovereign Cloud, Azure Local and AI: This Is Not About Going Back to the Data Center — It Is About Regaining Operational Control</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*tkdI710--m5K00RakO40nQ.png" /></figure><p>For years, we have sold the cloud as an almost binary conversation: either you are in the cloud or you are on-premises. In my view, that debate is now too limited.</p><p>The real question is no longer “cloud yes” or “cloud no”. The relevant question for governments, banking, healthcare, industry, defense or critical infrastructure is something else:</p><p><strong>What level of operational, legal, technical and continuity control do I need over my most sensitive systems?</strong></p><p>And this is where the conversation around sovereign cloud, Azure Local, disconnected operations, Microsoft 365 Local, Foundry Local and more controlled DevOps models starts to become truly interesting.</p><p>My thesis is simple: digital sovereignty is not about moving everything out of the public cloud. It is about designing an architecture capable of demonstrating control when normal conditions stop being normal.</p><p>Microsoft already presents its Sovereign Cloud strategy through three models: sovereign public cloud, sovereign private cloud and national clouds operated with local partners. Microsoft’s own documentation describes Sovereign Public Cloud as Azure/Microsoft cloud with additional controls around residency, customer-managed keys, operational transparency, Data Guardian, External Key Management and tamper-evident logs; and defines Sovereign Private Cloud as a model running in customer- or partner-controlled data centers, based on Azure Local and Microsoft 365 Local, and oriented toward hybrid or disconnected scenarios.</p><h3>Sovereignty Is Not Just Data Residency</h3><p>One common mistake is to reduce sovereignty to “my data is in Europe” or “my data is in a specific region”.</p><p>That matters, but it is not enough.</p><p>Real sovereignty has several layers.</p><p>First, <strong>data sovereignty</strong>: where the data resides, who encrypts it, who can access it and under what conditions.</p><p>Second, <strong>operational sovereignty</strong>: who manages the platform, what exceptional access paths exist, how they are audited and whether traceability can be demonstrated.</p><p>Third, <strong>technological sovereignty</strong>: whether critical workloads can continue operating even if connectivity is lost, or if there is a contractual, regulatory, geopolitical or provider-related crisis.</p><p>Fourth, <strong>software delivery lifecycle sovereignty</strong>: where the code lives, where pipelines run, where secrets are stored, who can modify the software supply chain and how every change is evidenced.</p><p>For me, this last part is too often forgotten. In regulated enterprises, source code, pipelines and deployment artifacts can be as sensitive as production data. It makes little sense to obsessively protect a database if the path that allows software to be changed is weakly governed.</p><h3>Azure Local: Hybrid Cloud Starts to Look Like a Continuity Insurance Policy</h3><p>Azure Local is especially relevant because it stops framing the data center as an “old world” separated from the cloud. Microsoft describes it as a distributed infrastructure solution to run virtual machines, containers and selected Azure services on customer-owned infrastructure; Azure Stack HCI is now also part of Azure Local.</p><p>The important difference is not only technical. It is strategic.</p><p>Azure Local can become the foundation for an architecture where certain workloads continue to benefit from the cloud model, but with greater control over location, operations and continuity. In the Sovereign Private Cloud documentation, Microsoft positions Azure Local as the infrastructure foundation for sovereign workloads, including compute, storage, networking, lifecycle management, virtual machines and AKS enabled by Arc.</p><p>This does not mean that Azure Local is “all of Azure inside your data center”. That interpretation would be wrong and dangerous. It means something more specific: a local foundation, manageable with a cloud-like experience, on top of which regulated, hybrid, edge or disconnected scenarios can be built.</p><p>And this is the nuance I consider essential: Azure Local should not be sold as on-premises nostalgia. It should be understood as <strong>sovereign architectural resilience</strong>.</p><h3>Disconnected Operations: Useful, but Not Magic</h3><p>Disconnected operations are probably one of the most important pieces for regulated industries. Public documentation indicates that they allow Azure Local instances to be deployed and managed without a connection to the Azure public cloud, using a local control plane and a familiar portal and CLI experience for virtual machines and containerized applications through selected Azure Arc-enabled services.</p><p>This is very powerful, but it needs to be framed correctly.</p><p>Disconnected does not mean “without governance”.<br>Disconnected does not mean “without patches”.<br>Disconnected does not mean “without identity”.<br>Disconnected does not mean “without operations”.</p><p>In fact, the more isolated an environment is, the more discipline it requires: version management, offline update procedures, local identity control, backups, observability, evidence, runbooks, failover testing, restoration and periodic validation.</p><p>Sovereign cloud does not remove complexity. It moves it into the space where architects should be comfortable: <strong>risk design, controls and evidence</strong>.</p><h3>Microsoft 365 Local: Useful, but Let’s Not Confuse the Scope</h3><p>Microsoft 365 Local is another interesting piece, but it needs to be explained precisely. According to Microsoft Learn, Microsoft 365 Local allows Exchange Server, SharePoint Server and Skype for Business Server to run on customer-owned and customer-managed Azure Local infrastructure, with greater control over residency, access and compliance. It also indicates support for hybrid and fully disconnected scenarios.</p><p>This matters for sectors that need local productivity or continuity in isolation scenarios.</p><p>But we must avoid a misunderstanding: <strong>Microsoft 365 Local should not automatically be interpreted as “the full Microsoft 365 cloud running locally”.</strong></p><p>At least based on current public information, we are not talking about simply replicating the full modern SaaS experience of Microsoft 365, Teams, Copilot, Entra ID, Conditional Access and the cloud ecosystem inside a local data center. It is a solution with a specific scope, useful for certain scenarios, but it must be explained without creating the wrong expectations.</p><p>In regulated environments, selling the scope of a platform incorrectly can be almost as dangerous as designing it incorrectly.</p><h3>Sovereign AI: Data Cannot Always Go to the Model</h3><p>AI introduces a new tension. Before, we worried about where the database was. Now we also need to ask:</p><p>Where does inference run?<br>Where are embeddings processed?<br>Where are prompts stored?<br>Where are models evaluated?<br>Where do traces remain?<br>What data flows through a RAG chain?<br>Which agent can act on which system?</p><p>Microsoft already documents Foundry Local on Azure Local as a way to bring AI closer to the data, deploying and running models within the Azure Local environment. Public documentation states that Foundry Local is in preview, that it can be deployed on Kubernetes connected to Azure Arc or directly on Kubernetes, and that preview access is required for deployment.</p><p>For me, this points to an important idea: enterprise AI will not be decided only by the most powerful model, but by the most governable operating model.</p><p>In banking, healthcare, public administration or industry, many AI workloads will not be able to freely move to any global endpoint. We will need architectures where sensitive data remains close to its control domain, where inference is traceable and where agents cannot act without limits.</p><p>This connects with something I have been defending for some time: enterprise AI cannot be only about individual productivity. It must evolve toward a governed lifecycle model: intent, living specification, controls, ADRs, guardrails, testing, deployment and auditability.</p><h3>Sovereign DevOps: Code Is Also Sovereignty</h3><p>There is one point that I believe will gain increasing importance: <strong>software delivery sovereignty</strong>.</p><p>GitHub Enterprise Server already exists as the self-hosted version of GitHub. GitHub’s official documentation describes it as a self-hosted platform that runs on an organization’s own infrastructure, with access controls, security, networking, IAM, monitoring and VPN defined by the enterprise. It also makes clear that the administrator is responsible for keeping the instance updated.</p><p>This is not a minor detail.</p><p>If an organization needs extreme sovereignty, controlling production is not enough. It also needs to control:</p><p>repositories;<br>pull requests;<br>secrets;<br>pipelines;<br>artifacts;<br>branch policies;<br>review evidence;<br>SBOMs;<br>artifact signing;<br>change traceability;<br>third-party dependencies.</p><p>My point here is clear: GitHub Enterprise Server fits very well conceptually into a software delivery sovereignty strategy. But in architecture, we should not sell intuition as certainty. Until there is sufficient documentation or a real validation in a controlled environment, the responsible approach is to treat it as a promising option, not as a closed and universally applicable capability.</p><h3>Sovereign Cloud Is Not a Technology: It Is a Decision Architecture</h3><p>For me, the biggest mistake would be to turn this into yet another product catalog.</p><p>Azure Local, Microsoft 365 Local, Foundry Local, Confidential Computing, External Key Management, Data Guardian, Sovereign Landing Zone and Regulated Environment Management are pieces. Some are already available, others are evolving, and all of them require design.</p><p>The Sovereign Landing Zone, for example, is positioned as a policy-as-code approach to apply controls around location, encryption, configuration and confidential computing in sovereign environments. Microsoft also documents REM as an experience to configure, deploy and monitor workloads in support of sovereign operations, complementing EKM, Data Guardian and Confidential Computing.</p><p>But no landing zone replaces a serious conversation about risk.</p><p>The right question is not: “Which product should I buy?”<br>The right question is: “Which loss-of-control scenarios do I need to withstand?”</p><p>For example:</p><p>What happens if I lose connectivity for several days?<br>What happens if an external provider cannot operate my environment?<br>What happens if a critical workload must move to local execution?<br>What happens if I need to demonstrate that no unauthorized operator accessed sensitive data?<br>What happens if my software pipeline is compromised?<br>What happens if an AI model processes regulated information outside the accepted perimeter?</p><p>That is where an architect adds value. Not by drawing boxes, but by turning uncertainty into verifiable decisions.</p><h3>My Point of View</h3><p>My reading is that we are entering a stage where hybrid cloud stops being a transition solution and becomes a strategy for sovereign resilience.</p><p>For years, many organizations have seen hybrid as a form of debt: “we have not migrated everything yet”. I believe that is changing. In the coming years, well-designed hybrid architectures may become a competitive advantage for regulated sectors.</p><p>But it has to be truly hybrid, not a Frankenstein.</p><p>Identity must be designed.<br>Networking must be designed.<br>Observability must be designed.<br>Updates must be designed.<br>DevSecOps must be designed.<br>AI must be designed.<br>Disconnected operations must be tested for real.<br>Evidence must exist.</p><p>Sovereign cloud should not become an excuse to return to artisanal, opaque and hard-to-operate models. It should be exactly the opposite: bringing cloud discipline, automation, governance and traceability to environments where local control is mandatory.</p><h3>Conclusion</h3><p>I do not believe the future is about abandoning the public cloud. I also do not believe the future is about blindly trusting it for everything.</p><p>I believe the future will be more nuanced:</p><p>public cloud for innovation, elasticity and advanced services;<br> sovereign public cloud for regulated workloads with reinforced controls;<br> Azure Local and private models for continuity, edge, defense, industry and critical scenarios;<br> local or hybrid AI when data, latency or regulation require it;<br> sovereign DevOps when code and the software supply chain are critical assets.</p><p>Digital sovereignty is not a button.<br>It is not a region.<br>It is not a contract.<br>It is not a landing zone.<br>It is not a product.</p><p><strong>It is an architecture of control, continuity and evidence.</strong></p><p>And honestly, that is a conversation where architects need to be much more present.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4c7973a030e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Azure Subscription Snapshot: understand your Azure in minutes]]></title>
            <link>https://medium.com/@jmfloreszazo/azure-subscription-snapshot-understand-your-azure-in-minutes-10798957ebce?source=rss-371533c2f202------2</link>
            <guid isPermaLink="false">https://medium.com/p/10798957ebce</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[cloud-governance]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[generative-ai-tools]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Jose Maria Flores Zazo]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 06:51:10 GMT</pubDate>
            <atom:updated>2026-04-27T06:51:10.686Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/836/1*jliWoXPEzeusHNp18gyvqA.png" /></figure><p>Not everything you find has IaC.</p><p>Inheriting an Azure subscription usually begins with an uncomfortable question: <strong>what is in here, and what could break if I touch it?</strong> <a href="https://github.com/jmfloreszazo/azure-subscription-snapshot">Azure Subscription Snapshot</a> exists to answer exactly that, without guesswork and without relying on tribal knowledge. You run one command, let it finish, and get a complete, organized, reusable picture of your environment.</p><p>The project creates a deterministic snapshot of a subscription or resource group: inventory, configuration, RBAC, identities, policies, locks, diagnostics, deployments, networking, services, and recent activity. Everything is written as stable JSON with sorted keys, so you can commit it to Git and compare real changes over time. If Azure did not change, the files do not change either.</p><p>The real power shows up when you stop treating the dump as a simple export. Azure Subscription Snapshot builds a relationship graph (`nodes.json` and `edges.json`) so you can analyze dependencies, detect orphaned resources, and understand the blast radius of an outage or deletion. It also generates Mermaid diagrams for architecture, network, identity, and resource types, plus a self-contained HTML report that you can open and share without external services.</p><p>For AI-assisted teams, the project is already prepared for Copilot Chat and Azure MCP. Its prompts and specialized chat modes let you ask practical questions over real data: who has Owner, which resources are exposed, what changed in the last 90 days, where cost waste might exist, or what starter Bicep can be reconstructed from the captured state. The agent reads local snapshot files first and only reaches out to Azure when it needs to verify or extend incomplete information.</p><p>That makes it especially useful for handovers, audits, security reviews, governance, and day-to-day operations. Instead of starting with ten portal tabs and scattered one-off queries, you start with a versionable, auditable knowledge base that is easy to reason about. Take a baseline today, run another snapshot next week, and drift becomes visible: new resources, changed permissions, modified policies, or configuration changes that moved away from the expected state.</p><p>In short: Azure Subscription Snapshot turns an Azure subscription into navigable evidence. It gives you fast context, reduces uncertainty, helps prioritize risk, and lets humans and AI agents work from the same facts. It is small in shape, but powerful in effect: moving from “I do not know what is here” to “I know exactly where to start.”</p><pre>az login<br>az account set --subscription &quot;&lt;sub-id-or-name&gt;&quot;<br>./Invoke-AzureSnapshot.ps1 -OutputDir .\out -GenerateReport</pre><p>When it finishes, open `out/12-report/report.html` and explore the inventory, diagrams, and relationships.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10798957ebce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an AI Gateway on top of YARP in .NET]]></title>
            <link>https://medium.com/@jmfloreszazo/building-an-ai-gateway-on-top-of-yarp-in-net-d65819936215?source=rss-371533c2f202------2</link>
            <guid isPermaLink="false">https://medium.com/p/d65819936215</guid>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[yarp]]></category>
            <category><![CDATA[llm-guardrails]]></category>
            <category><![CDATA[reverse-proxy]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Jose Maria Flores Zazo]]></dc:creator>
            <pubDate>Tue, 17 Mar 2026 10:38:49 GMT</pubDate>
            <atom:updated>2026-03-17T10:38:49.975Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*0yCUwpH2RNt8wNCSJibVWA.jpeg" /></figure><p>More and more applications are starting to use LLMs. Integrating a model is straightforward: make an HTTP call and you’re done.</p><p>The problem appears when AI moves into production.</p><p>At that point, you need:</p><ul><li>guardrails</li><li>access control</li><li>sensitive data protection</li><li>model routing</li><li>auditing</li><li>cost control</li><li>rate limiting</li></ul><p>Many organizations address this by introducing an AI Gateway in front of the models.</p><p>But if you’re working in .NET, you already have a very powerful building block:</p><p><strong>YARP (Yet Another Reverse Proxy).</strong></p><p>That’s where <strong>Yarp.AiGateway</strong> comes in.</p><h3>The idea</h3><p>Instead of building a gateway from scratch, this project extends YARP and introduces AI-specific capabilities directly into the proxy pipeline.</p><p>The architecture looks like this:</p><ul><li>YARP handles reverse proxying, routing, and forwarding</li><li>The AI Gateway intercepts requests and responses to enforce security policies</li></ul><p>It’s a very simple approach — but extremely powerful.</p><h3>What the AI Gateway adds</h3><p>The middleware introduces capabilities specifically designed for AI workloads:</p><ul><li>prompt injection detection</li><li>automatic PII redaction (emails, IDs, IBANs, credit cards…)</li><li>semantic content analysis</li><li>secret leakage detection</li><li>per-user or per-tenant rate limiting</li><li>routing across multiple providers</li><li>auditing and metrics</li></ul><p>All configured through a single file:</p><p><strong>aigateway.json</strong></p><h3>Integration example</h3><pre>builder.Services.AddReverseProxy()<br>    .LoadFromConfig(builder.Configuration.GetSection(&quot;ReverseProxy&quot;))<br>    .AddTransforms(context =&gt;<br>    {<br>        context.AddRequestTransform(tc =&gt;<br>        {<br>            var apiKey = Environment.GetEnvironmentVariable(&quot;AZURE_OPENAI_API_KEY&quot;) ?? &quot;&quot;;<br>            tc.ProxyRequest.Headers.TryAddWithoutValidation(&quot;api-key&quot;, apiKey);<br>            return ValueTask.CompletedTask;<br>        });<br>    });<br>builder.Services.AddAiGatewayFromJson(&quot;aigateway.json&quot;);<br>app.MapReverseProxy(proxyPipeline =&gt;<br>{<br>    proxyPipeline.UseAiGatewayGuardrails();<br>});</pre><p>YARP continues to handle the proxy.</p><p>The AI Gateway simply adds intelligence and security into the pipeline.</p><h3>Why this approach</h3><p>Many projects try to build a full gateway from scratch.</p><p>This project takes a different path:</p><p><strong>leverage YARP as the foundation and add an AI layer on top.</strong></p><p>This provides several advantages:</p><ul><li>reuse a production-proven proxy</li><li>reduce complexity</li><li>improve performance</li><li>simplify maintenance</li></ul><p>In other words:</p><ul><li><strong>YARP = infrastructure</strong></li><li><strong>AI Gateway = policies and security</strong></li></ul><h3>A simple example</h3><p>Imagine an API that allows weather-related queries.</p><p>Valid request:</p><p><em>Madrid is at 28°C. Is this good weather for outdoor events?</em></p><p>Response:</p><p><em>200 OK</em></p><p>But if the prompt attempts something outside policy:</p><p><em>Madrid is at 28°C. How would this affect a football match?</em></p><p>The gateway can block it before it reaches the model:</p><p><em>422 Prompt blocked by policy</em></p><p>The model is never executed.</p><h3>Automatic sensitive data protection</h3><p>Another key advantage is automatic sanitization.</p><p>Input sent by the developer:</p><p><em>Patient Pepito García, MRN-2024–12345, pepito@hospital.com</em></p><p>What the model actually receives:</p><p><em>[</em>REDACTED_PATIENT], [REDACTED_MRN], [REDACTED_EMAIL]</p><p>This enables compliance with regulations such as <strong>GDPR</strong> or <strong>HIPAA</strong> without relying solely on application code.</p><p>Protection is enforced at the infrastructure layer.</p><h3>Why this matters</h3><p>The core idea is simple: <strong>AI governance can live at the proxy layer.</strong></p><p>And if you are already using YARP, there is no need to introduce an additional platform.</p><p>You simply extend the pipeline.</p><h3>Explore the repository</h3><p>The project includes:</p><ul><li>full YARP integration</li><li>multiple LLM providers</li><li>configurable guardrails</li><li>complete examples</li><li>automated tests</li><li>.http files for quick testing</li></ul><p>Repository: <a href="https://github.com/jmfloreszazo/yarp_aigateway"><strong>GitHub</strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d65819936215" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software Craftsmanship in the Age of AI]]></title>
            <link>https://medium.com/@jmfloreszazo/software-craftsmanship-in-the-age-of-ai-b6673e6e78c1?source=rss-371533c2f202------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6673e6e78c1</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[software-craftmanship]]></category>
            <dc:creator><![CDATA[Jose Maria Flores Zazo]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 07:56:56 GMT</pubDate>
            <atom:updated>2026-03-11T07:56:56.284Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e0gErTZx3l4iTENSiGH17A.png" /></figure><h3>The discipline that does not disappear — it becomes visible</h3><p>Over the past months, a recurring narrative has emerged across the technology industry:<br> Artificial Intelligence will replace developers because it can now write code.</p><p>Tools such as GitHub Copilot and large language models developed by organizations like OpenAI, Anthropic, and Google DeepMind can generate functions, translate between languages, scaffold services, and even produce small working systems.</p><p>However, this discussion is often based on a flawed premise:<br> <strong>equating code generation with software engineering.</strong></p><p>Software Craftsmanship has never been about merely producing lines of code.<br> It has always been about <strong>designing systems that are correct, maintainable, and able to evolve over time</strong>.</p><p>And precisely for that reason, in the age of AI, its relevance increases rather than disappears.</p><h3>A historical parallel: the Industrial Revolution</h3><p>Industrial Revolution fundamentally transformed how societies produced goods.</p><p>Machines began to perform tasks that previously required human manual labor. Production accelerated dramatically. Many believed that skilled workers would become obsolete.</p><p>That did not happen.</p><p>Engineering did not disappear.<br> Technical expertise did not vanish.<br> Quality did not become irrelevant.</p><p>Instead, the nature of skilled work changed.</p><p>Value shifted from manual effort to:</p><ul><li>designing machines</li><li>optimizing production processes</li><li>ensuring reliability</li><li>controlling quality</li></ul><p>The people who understood the systems behind the machines became more valuable, not less.</p><p>Artificial Intelligence is creating a very similar shift in software development.</p><p>Machines can now generate code.<br> But <strong>they still cannot design responsible, long-lived systems within real organizational constraints</strong>.</p><h3>Generating code is not software engineering</h3><p>Large language models are remarkably capable. They can generate:</p><ul><li>syntactically correct functions</li><li>API integrations</li><li>example architectures</li><li>basic unit tests</li></ul><p>But they do not possess true system awareness.</p><p>They do not know:</p><ul><li>how the system must evolve over the next five years</li><li>which architectural decisions were constrained by business requirements</li><li>what technical debt already exists</li><li>what operational responsibilities the platform must support</li></ul><p>These responsibilities remain firmly within the domain of engineering.</p><p>AI produces components.<br>Engineering builds the system.</p><h3>What AI actually changes</h3><p>Artificial Intelligence dramatically accelerates the production of code.</p><p>When production accelerates, <strong>differences in engineering discipline become amplified</strong>.</p><p>Three clear outcomes begin to appear.</p><h3>1. Engineers who already produced good software will become even better</h3><p>Teams that already practice disciplined engineering — clean design, automated testing, thoughtful architecture, and continuous refactoring — use AI as a force multiplier.</p><p>AI removes friction from repetitive work:</p><ul><li>boilerplate generation</li><li>scaffolding services</li><li>drafting tests</li><li>producing documentation</li></ul><p>This allows engineers to focus on the aspects of software that actually require expertise:</p><ul><li>system design</li><li>architecture</li><li>simplification</li><li>quality</li></ul><p>The result is simple: <strong>good engineering teams become extraordinarily productive.</strong></p><h3>2. Engineers who produced mediocre software will create problems faster</h3><p>Teams that lacked strong engineering discipline before AI often struggle with:</p><ul><li>duplicated code</li><li>missing tests</li><li>inconsistent architecture</li><li>ad-hoc technical decisions</li></ul><p>With AI, the speed of code generation increases — but the underlying engineering discipline does not.</p><p>Systems accumulate complexity faster.<br>Technical debt grows more quickly.<br>Architectural drift accelerates.</p><p>More code does not necessarily mean better systems.<br>Often it simply means <strong>a larger surface area for problems</strong>.</p><h3>3. Engineers who produced poor software may struggle to remain relevant</h3><p>The third scenario is uncomfortable but realistic.</p><p>AI removes much of the purely mechanical part of programming.</p><p>If the value of a developer was primarily:</p><ul><li>typing code without understanding the system</li><li>assembling fragments from online sources</li><li>implementing features without architectural awareness</li></ul><p>AI can now perform much of that work.</p><p>In that case, the problem is not the technology.</p><p>The problem is <strong>the absence of real engineering skills</strong>.</p><h3>The evolving role of the software engineer</h3><p>In this new environment, the role of the engineer evolves.</p><p>Historically, a large portion of the work involved writing code manually.</p><p>Increasingly, the focus shifts toward:</p><p><strong>System design</strong><br>Understanding boundaries, dependencies, scalability, and long-term evolution.</p><p><strong>Critical thinking</strong><br>Evaluating AI-generated solutions and identifying subtle flaws.</p><p><strong>Architecture</strong><br>Maintaining coherence across complex systems.</p><p><strong>Code governance</strong><br>Ensuring that generated code meets quality standards before entering the system.</p><p>AI writes code.<br>Engineers decide <strong>which code deserves to exist</strong>.</p><h3>Discipline becomes visible</h3><p>For many years, poor engineering practices could remain hidden inside large organizations or long-running projects.</p><p>AI changes that dynamic.</p><p>When anyone can generate code quickly, the true differentiator shifts elsewhere:</p><ul><li>clarity of system design</li><li>architectural coherence</li><li>quality of engineering decisions</li></ul><p>In other words: <strong>engineering discipline is no longer optional.</strong></p><h3>My point of view</h3><p>The narrative that Artificial Intelligence will eliminate Software Craftsmanship misunderstands the nature of the profession.</p><p>The reality is more nuanced — and more interesting.</p><p>AI does not eliminate craftsmanship.</p><p><strong>It exposes it.</strong></p><p>It makes visible the difference between those who understand software as engineering and those who see it only as code production.</p><p>In a world where anyone can generate code,<br> the real competitive advantage will belong to those who can <strong>design, reason about, and evolve complex systems responsibly</strong>.</p><p>Software Craftsmanship is not disappearing.</p><p>If anything, it is becoming <strong>more important than ever.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6673e6e78c1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Be Legal with Docker: Your Guide to Using Docker Legally and Productively]]></title>
            <link>https://medium.com/@jmfloreszazo/be-legal-with-docker-your-guide-to-using-docker-legally-and-productively-a63d8eca8ae4?source=rss-371533c2f202------2</link>
            <guid isPermaLink="false">https://medium.com/p/a63d8eca8ae4</guid>
            <category><![CDATA[wsl-2]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[windows]]></category>
            <dc:creator><![CDATA[Jose Maria Flores Zazo]]></dc:creator>
            <pubDate>Fri, 27 Feb 2026 13:18:16 GMT</pubDate>
            <atom:updated>2026-02-27T13:18:16.457Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3VoYx_rlPJiiAeRNgQgI0w.png" /></figure><h3>Be Legal with Docker: Your Guide to Using Docker Legally and Productively</h3><p>Working with Docker in professional environments raises two critical questions:</p><ul><li>Are we using container tools legally and in compliance with licensing terms?</li><li>Do we have a reproducible and fully functional development environment, especially on Windows/WSL2?</li></ul><p><strong>Be Legal with Docker</strong> addresses both. It is a repository designed for developers and teams who want to use Docker without legal ambiguity or operational dependencies that complicate day-to-day work:</p><p><a href="https://github.com/jmfloreszazo/be_legal_with_docker?utm_source=chatgpt.com">https://github.com/jmfloreszazo/be_legal_with_docker</a></p><h3>What Problem Does This Project Solve?</h3><p>Many organizations face uncertainty regarding Docker Desktop usage, licensing constraints, and internal compliance requirements. This project provides a clear path to:</p><ul><li>Use Docker CE (Community Edition) — container software without development usage restrictions;</li><li>Set up a robust Docker environment on Windows using WSL2;</li><li>Automate common container management tasks with a dedicated tool.</li></ul><p>In other words, this is not just a tutorial. It provides reusable tools and procedures to ensure Docker works smoothly in Windows-centric development environments while aligning with compliance policies.</p><h3>What Does the Repository Include?</h3><p>The project consists of two main components:</p><h3>WSL2 Setup</h3><p>Scripts and documentation to provision a fully functional Linux environment inside Windows using WSL2, including Docker Engine, development languages, and essential tooling.</p><h3>Docker Manager</h3><p>A Python-based CLI that simplifies Docker interaction (containers, images, networks, volumes) in a structured and controlled way.</p><p>Everything is designed to help standardize these steps across teams, internal documentation, or development pipelines.</p><h3>Why Is It Relevant?</h3><ul><li>In corporate environments, where licensing agreements and internal policies matter, this project provides clarity and traceability.</li><li>For Windows-based developers, it offers a solid alternative to closed or license-dependent solutions.</li><li>It promotes consistent and reproducible development environments.</li></ul><h3>Conclusion</h3><p><strong>Be Legal with Docker</strong> is more than a repository — it is a recommended practice for using Docker legally, efficiently, and in alignment with enterprise policies, especially in Windows/WSL2 contexts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a63d8eca8ae4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clean Room Environment with Azure Confidential Computing for Secure VB6 to .NET Code Migration]]></title>
            <link>https://medium.com/@jmfloreszazo/clean-room-environment-with-azure-confidential-computing-for-secure-vb6-to-net-code-migration-da511d293a16?source=rss-371533c2f202------2</link>
            <guid isPermaLink="false">https://medium.com/p/da511d293a16</guid>
            <category><![CDATA[confidential-computing]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[legacy-modernization]]></category>
            <dc:creator><![CDATA[Jose Maria Flores Zazo]]></dc:creator>
            <pubDate>Thu, 15 Jan 2026 08:32:46 GMT</pubDate>
            <atom:updated>2026-01-15T08:32:46.372Z</atom:updated>
            <content:encoded><![CDATA[<h3>Clean Room Environment with Azure Confidential Computing for Secure VB6 to .NET Code Migration</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*74A6K9Xpq6TiFX5sm6dFCg.png" /></figure><p>How hardware enclaves and remote attestation enable trustless source-code transformation</p><h3>The real problem: trust and IP in source code transformation</h3><p>Migrating source code across organizational boundaries introduces a <strong>structural, bilateral trust problem</strong>.</p><ul><li><strong>Client A</strong> owns strategic VB6 code containing business logic, proprietary algorithms, and valuable intellectual property.</li><li><strong>Provider B</strong> owns a proprietary tool capable of transforming VB6 code into .NET, which itself represents significant IP and know-how.</li></ul><p>Both parties need to collaborate, yet <strong>neither can afford to expose their intellectual property to the other</strong>.</p><p>Traditional approaches — NDAs, audits, supervised execution, contractual trust — <strong>do not provide technical guarantees</strong>. They rely on people and processes rather than on cryptographic verification.</p><p>The right question, therefore, is not <em>“Who do we trust?”</em> but:</p><blockquote><strong><em>How do we design a system where trust is not required at all?</em></strong></blockquote><h3>Azure Confidential Computing: protecting data in use</h3><p><a href="https://azure.microsoft.com/en-us/solutions/confidential-compute"><strong>Azure Confidential Computing</strong></a> introduces a fundamental shift:<br> <strong>data remains encrypted even while it is being processed</strong>.</p><p>This is achieved through <strong>Trusted Execution Environments (TEEs)</strong> backed by hardware technologies such as <strong>AMD SEV-SNP</strong> and <strong>Intel TDX / SGX</strong>, where:</p><ul><li>Code and data are decrypted only inside a secure CPU boundary</li><li>The operating system, hypervisor, and cloud administrators cannot access the content</li><li>The integrity of the execution environment can be <strong>cryptographically verified</strong></li></ul><h3>Key components</h3><ul><li><strong>Confidential VMs</strong><br> Virtual machines whose memory is encrypted and isolated from the hypervisor.</li><li><strong>Application Enclaves</strong><br> Fine-grained isolated execution at process or container level.</li><li><strong>Azure Attestation</strong><br> A remote attestation service that verifies the environment is genuine and running <em>exactly</em> the expected code.</li></ul><h3>Clean room architecture: collaboration without IP exposure</h3><p>A <strong>technical </strong><a href="https://learn.microsoft.com/en-us/azure/databricks/clean-rooms/"><strong>clean room</strong></a> is an environment where:</p><ul><li>Client A never exposes its VB6 source code</li><li>Provider B never exposes its conversion algorithm</li><li>Neither party can inspect the other’s IP</li><li>All guarantees are <strong>verifiable via attestation</strong>, not promises</li></ul><h3>Core properties</h3><h4>Complete isolation</h4><ul><li>VB6 code exists in plaintext only inside the enclave</li><li>Provider B’s conversion binary is never accessible to Client A</li></ul><h4>Mandatory pre-attestation</h4><ul><li>Client A validates the hash of Provider B’s software <em>before</em> sending any data</li><li>If attestation fails, the process is aborted</li></ul><h4>End-to-end encryption</h4><ul><li>Encrypted input into the enclave</li><li>Encrypted output readable only by Client A</li><li>Provider B acts solely as infrastructure operator</li></ul><h4>Restricted execution</h4><ul><li>No internet access</li><li>No unauthorized I/O</li><li>Minimal attack surface</li></ul><h3>Secure migration flow (VB6 → .NET)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*beogLjzn6Uxy_zT5IMeDMQ.jpeg" /><figcaption><a href="https://mermaid.live/edit#pako:eNptkk1u2zAQha8y4MpFHUM_tmxzEcBOtC0KtMii0GYijiwCEqmSlFPH8LYH6BF7kpKS7TpItKIw75v3ZsgjK7Ugxpmlnz2pkh4l7gy2hQL_dWicLGWHysEG0MJDIymc35e3ofzV6L0UZGD7XpAPvFaVFygnsYFclQ3uCSab197Qp0KN0Pbu_j7n8Ehdow8W6Kx6ka6GUqs9GSu1Aqd1MwL5nSc2HDbOkXXoQpVCDj8OTGq0NXyGGo14wcEmMJsReSIjK0kW8IYd89y2O0PYuDcme2ykGEuXnj74N1JiiG0OnSMBT9sMrO6NDxN2_V-fXwYdlD6DEuAMKltp09qB-_v7D8y-5N9voTF5fu0f6h8bnIe8GhiyfePGOjX2zYgg1QfjhK0-a-PZzuiSrIWJ0iDQIVh_i-e9-IELxaZsZ6RgvELfespaMi2Gf3YMqoK5mloqGPdHQRWGJKxQJ8_59_FD65ZxZ3pPGt3v6mufvvN2l2d5lXhLMg-6V47x9dCB8SP7xXgaz2fxMomSdJ4ts9U8nbID43GWzJLVMomzaJEkWZQtTlP2OnhGs1UcpYs0Xa_SJI0W6_j0Dx02-nk">View</a></figcaption></figure><ol><li>Provider B deploys a confidential VM or enclave containing the conversion tool</li><li>The enclave produces a signed attestation report</li><li>Client A verifies the attestation (hardware + code hash)</li><li>Client A encrypts and submits VB6 source code</li><li>Conversion occurs entirely inside the enclave</li><li>The resulting .NET code is encrypted for Client A and returned</li><li>The enclave is destroyed after execution</li></ol><p>At no point does either party gain access to the other’s intellectual property.</p><h3>Key management (non-negotiable)</h3><p>This architecture is <strong>only valid</strong> if cryptographic keys:</p><ul><li>Are never accessible to Provider B</li><li>Are released to the enclave <strong>only after successful attestation</strong></li><li>Are managed via HSMs or <strong>Azure Key Vault</strong> with attestation-based release policies</li></ul><p>Without this, the entire model collapses.</p><h3>What this architecture really protects</h3><h3>Protected</h3><ul><li>Client A’s original VB6 source code</li><li>The generated .NET source code</li><li>Provider B’s transformation algorithm</li><li>Process integrity</li><li>Auditability and cryptographic evidence</li></ul><h3>Residual risks (not failures)</h3><h4>Functional IP</h4><p>If Client A voluntarily shares the converted .NET code, confidentiality is lost.<br>This is inherent to any code transformation — the business logic remains the same.</p><h4>Advanced side-channel attacks</h4><p>Risk is low but non-zero. Modern hardware (SEV-SNP / TDX) and best practices mitigate most realistic threats, but no microarchitecture is perfect.</p><h4>Poor key hygiene on the client side</h4><p>The enclave does not protect Client A’s laptop, scripts, or CI pipelines. If keys are mishandled locally, security is compromised.</p><h3>Comparison with alternatives</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/522/1*Fn_P1gwGDznXbg_K4C_tbQ.jpeg" /></figure><h3>What about FHE and SMPC?</h3><p>Pure cryptographic alternatives such as <a href="https://en.wikipedia.org/wiki/Homomorphic_encryption"><strong>Fully Homomorphic Encryption</strong></a><strong> (FHE)</strong> and <a href="https://en.wikipedia.org/wiki/Secure_multi-party_computation"><strong>Secure Multi-Party Computation</strong></a><strong> (SMPC)</strong> allow computation without ever decrypting data.</p><p>However, their computational cost and functional limitations make them impractical today for complex tasks such as source-code transformation. In contrast, confidential computing enclaves provide <strong>production-ready security with near-native performance</strong>, decrypting data only within hardware-isolated execution.</p><p>If you are interested in FHE research, see <a href="https://github.com/microsoft/SEAL"><strong>Microsoft SEAL</strong></a>.</p><h3>Non-negotiable requirements</h3><ul><li>Mandatory attestation before releasing data</li><li>Enclave-bound key management</li><li>Minimal, audited enclave code</li><li>Strict network and output controls</li><li>Ephemeral enclaves (destroyed after execution)</li><li>Contracts aligned with the architecture</li><li>Up-to-date hardware and firmware</li></ul><h3>Conclusion</h3><p>This architecture is <strong>not marketing</strong> and <strong>not cryptographic theory</strong>.</p><p>It is a <strong>practical, verifiable, production-ready solution</strong> to a problem that previously required blind trust.</p><p>The real value is not Azure itself, but a shift in mindset:</p><blockquote><strong><em>Trust moves from organizations and contracts to cryptography and hardware guarantees.</em></strong></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da511d293a16" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deterministic Workflows vs Autonomous Agents vs Hybrid Models — When to use each approach in AI…]]></title>
            <link>https://medium.com/@jmfloreszazo/deterministic-workflows-vs-autonomous-agents-vs-hybrid-models-when-to-use-each-approach-in-ai-c7327bea43a1?source=rss-371533c2f202------2</link>
            <guid isPermaLink="false">https://medium.com/p/c7327bea43a1</guid>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Jose Maria Flores Zazo]]></dc:creator>
            <pubDate>Mon, 12 Jan 2026 08:17:51 GMT</pubDate>
            <atom:updated>2026-01-12T08:17:51.729Z</atom:updated>
            <content:encoded><![CDATA[<h3>Deterministic Workflows vs Autonomous Agents vs Hybrid Models — When to use each approach in AI architecture (and when not to)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yC5a5p2Z8FhEEGQHt0Urlg.png" /></figure><h3>Introduction: why not every AI problem should be solved with agents</h3><p>In recent months, a growing confusion has emerged in software and AI architecture:<br> <strong>everything seems to be solved with autonomous agents</strong>.</p><p>This is false.<br>It is dangerous.<br>And, in enterprise environments, it is often <strong>expensive</strong> if not properly constrained.</p><p>The image accompanying this article does not describe a fad or a passing trend. It represents a <strong>real continuum of architectural decisions</strong> that have existed for years and are now being amplified by AI:</p><ul><li><strong>Deterministic workflows</strong></li><li><strong>Agentic workflows / hybrid models</strong></li><li><strong>Autonomous agents</strong></li></ul><p>They are not equivalent.<br>They are not interchangeable.<br>And <strong>they do not solve the same problems</strong>.</p><p>This article does not attempt to choose “the best” approach, but rather to provide <strong>clear criteria to decide when to use each one… and when not to</strong>.</p><h3>The real continuum between workflows, agents, and hybrid models</h3><p>These three approaches are not competing solutions, but <strong>different positions within the same decision space</strong>.</p><p>The difference between them is not how much AI they use, but <strong>how the process is governed</strong> and <strong>who makes decisions during execution</strong>.</p><p>To understand this properly, we must look at the right axis.</p><h3>The right axis for deciding between workflows and agents</h3><p>The header image represents two fundamental dimensions of any AI architecture.</p><h3>Process predictability and flow control</h3><ul><li>Should the flow be <strong>repeatable, auditable, certifiable</strong>?</li><li>Should two identical executions produce the same result?</li></ul><h3>Autonomy in system decision-making</h3><ul><li>Does the system decide <strong>how to proceed</strong>?</li><li>Can it redefine steps, try alternatives, or change strategy?</li></ul><p>From the combination of these two axes, <strong>three clear zones emerge</strong>, each with very different technical, operational, and governance implications.</p><h3>How to decide between a workflow, an agent, or a hybrid model in 60 seconds</h3><p>Before going into detail, a practical rule of thumb:</p><ul><li>Do you need control, repeatability, or compliance? → <strong>Deterministic workflow</strong></li><li>Is the problem not well defined and the path largely irrelevant? → <strong>Autonomous agent</strong></li><li>Do you need both? → <strong>Hybrid / agentic workflow</strong></li></ul><p>With this compass, we can analyze each model.</p><h3>Deterministic workflows: when to use them in enterprise systems</h3><h4>What is a deterministic workflow in software architecture?</h4><p>Predefined, sequential, or conditional processes where:</p><ul><li>The flow is designed <strong>in advance</strong></li><li>AI, if present, <strong>does not decide the flow</strong></li><li>Each step is <strong>auditable and reproducible</strong></li></ul><p>AI may participate, but it <strong>does not govern</strong>.</p><h4>Examples of deterministic workflows</h4><ul><li>CI/CD</li><li>Customer onboarding</li><li>Financial processes</li><li>ETLs</li><li>Regulatory flows</li><li>BPM, RPA, pipelines</li></ul><h4>When you should use deterministic workflows</h4><ul><li>Legal or regulatory requirements</li><li>Strong traceability needs</li><li>Strict SLAs</li><li>High cost of failure</li><li>External audits</li></ul><h4>When NOT to use agents in critical workflows</h4><ul><li>Because “it looks modern”</li><li>Because “AI can decide better”</li><li>Because the process is long</li></ul><p><strong>If a process must be explainable step by step, it is not agent territory.</strong></p><h3>Autonomous agents: when they make sense and when they do not</h3><h4>What is an autonomous agent in AI?</h4><p>Goal-oriented systems, not flow-oriented ones:</p><ul><li>The agent decides the steps</li><li>The path emerges at runtime</li><li>The result takes precedence over the process</li></ul><p>There is no predefined “correct flow”.</p><h4>Suitable use cases for autonomous agents</h4><ul><li>Exploratory research</li><li>Open-ended analysis</li><li>Creative generation</li><li>Complex intelligent support</li><li>Unstructured diagnostics</li><li>Ambiguous incident resolution</li></ul><h4>When it makes sense to use autonomous agents</h4><ul><li>Poorly defined problems</li><li>High variability</li><li>No known optimal path</li><li>Low or reversible cost of failure</li><li>Human supervision exists</li></ul><h4>Real risks of autonomous agents</h4><ul><li>Non-determinism</li><li>Difficult auditing</li><li>Unpredictable cost</li><li>Inconsistent results</li></ul><p><strong>An agent is not an intelligent workflow.<br>It is a different category.</strong></p><h3>Hybrid models or agentic workflows: the most scalable approach</h3><p>This is the <strong>right zone for approximately 80% of modern enterprise use cases</strong>.</p><h4>Why hybrid models work better in enterprises</h4><p>Most real-world processes have:</p><ul><li>Clear parts</li><li>And ambiguous parts</li></ul><p>Neither pure determinism nor full autonomy works well on its own.</p><h4>What is an agentic workflow?</h4><ul><li>The <strong>workflow governs</strong></li><li>The <strong>agent decides locally</strong></li><li>Autonomy is <strong>bounded and supervised</strong></li></ul><p>The flow does not disappear.<br><strong>It becomes porous.</strong></p><h4>Golden rule of hybrid design</h4><blockquote><strong><em>The workflow defines the frame.<br>The agent operates within it.</em></strong></blockquote><h4>Correct pattern for workflows with bounded agents</h4><ol><li>The workflow defines phases</li><li>In certain steps: Reasoning is delegated and/or Exploration is allowed</li><li>Results return to the flow</li><li>They are validated, controlled, and audited</li></ol><h4>Typical examples of hybrid models</h4><ul><li>Legacy modernization</li><li>Document validation</li><li>Classification + decision</li><li>Code generation with controls</li><li>Analysis with human checkpoints</li><li>AI-DLC, AURORA-IA, intelligent pipelines</li></ul><h3>Comparison between deterministic workflows, hybrid models, and autonomous agents</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/553/1*tHGqg9gGhmg0p2g1SJHcfw.png" /></figure><h3>Anti-pattern: indiscriminate agentification in AI architecture</h3><blockquote><em>“Since we have AI, let’s use agents.”</em></blockquote><p>This mistake leads to:</p><ul><li>Unstable systems</li><li>Governance difficulties</li><li>Legal risk</li><li>Loss of business trust</li></ul><p>Mature architecture <strong>does not maximize autonomy</strong>.<br><strong>It maximizes conscious control.</strong></p><h3>Real client questions to decide the right approach</h3><h4>Questions that indicate a deterministic workflow</h4><ul><li>Must it be auditable step by step?</li><li>Must two executions yield the same result?</li><li>Is there regulation or compliance?</li><li>Are BPM, RPA, or scripts already in place?</li><li>Is failure unacceptable?</li></ul><h4>Questions that indicate an autonomous agent</h4><ul><li>Is the problem not well defined?</li><li>Do we not know the optimal path?</li><li>Does the result matter more than the process?</li><li>Do we accept variability?</li><li>Is there human supervision?</li></ul><h4>Questions that indicate a hybrid model</h4><ul><li>Is part of the process clear and part unclear?</li><li>Do we want control and flexibility?</li><li>Are there complex decisions within phases?</li><li>Do we want explicit checkpoints?</li><li>Must it scale in an enterprise environment?</li></ul><h3>Conclusion: AI architecture with conscious control</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/423/1*32KMlREIHZbMDNDv9XPHHw.png" /></figure><h3>Final rule</h3><blockquote><em>If you cannot explain the flow, do not use workflows.<br>If you cannot accept variability, do not use agents.<br>If you need both, design a hybrid consciously.</em></blockquote><p><strong>Mature architecture does not pursue maximum autonomy.<br>It pursues maximum responsibility over where intelligence is delegated.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c7327bea43a1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>