<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Andréa&#39;s Notes</title>
    <link>https://andreabrduque.github.io/andrea-tech-notes/</link>
    <description>Recent content on Andréa&#39;s Notes</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Fri, 14 Aug 2026 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://andreabrduque.github.io/andrea-tech-notes/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How have you been deploying AI agents in the cloud?</title>
      <link>https://andreabrduque.github.io/andrea-tech-notes/posts/fas-cli/</link>
      <pubDate>Fri, 14 Aug 2026 00:00:00 +0000</pubDate>
      <guid>https://andreabrduque.github.io/andrea-tech-notes/posts/fas-cli/</guid>
      <description>Benchmarking azd against Azure AI Foundry, and why agent definitions deserve a lighter deployment path than long-lived cloud infrastructure.</description>
      <content:encoded><![CDATA[<p>I&rsquo;ve spent now a good amount of time around Azure&rsquo;s development tooling, and therefore have some opinions about the whole developer experience of deploying AI agents on Azure
AI Foundry.</p>
<p>Azure provides the <a href="https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/">Azure Developer CLI (<code>azd</code>)</a>, and according to Microsoft it
<strong>should</strong> accelerate your path from a local development environment to Azure.</p>
<p>But just from reading its docs and example templates - <code>azure.yaml</code>, Bicep files, hook
scripts - I didn&rsquo;t get the sense that <code>azd</code> was the right tool for starting an agentic AI
project. It seemed to bundle agents into the same deployment lifecycle as the long-lived cloud infrastructure around them (networking, access control, etc.).</p>
<p>So I decided to dig deeper and benchmark it: using <code>azd</code> to deploy against Azure AI Foundry,
starting from just a Foundry account and a project. How long until a deployed model and its agent can
actually answer an inference request?</p>
<p>Across 5 runs, <code>azd</code> averaged 22.5s for a GPT-5.6 deployment plus a simple
<a href="https://learn.microsoft.com/en-us/azure/foundry/agents/quickstarts/prompt-agent?tabs=python">prompt agent</a>. Curious where that time actually went, I dug through <code>azd</code>&rsquo;s
debug log, tracing the calls with Claude&rsquo;s help.</p>
<h2 id="where-the-225s-goes">Where the 22.5s goes</h2>
<p>Before <code>azd</code> touches the network at all, it shells out to a separate Bicep
compiler three times to turn the template into something Azure Resource Manager (ARM) can read.
For those unfamiliar with Azure, ARM is the API layer that Azure deployments ultimately go through. Whether you deploy with the Azure Portal, <code>az</code>, Bicep, Terraform, or <code>azd</code>, those tools eventually translate your intent into requests to Azure&rsquo;s resource management APIs.</p>
<p>Going back to my experiment, just compiling the Bicep templates takes about 9 seconds on my laptop, and this is before a single request leaves the machine.</p>
<p>And after this, it has to deal with the fact that ARM also tracks the deployment itself. <code>azd</code> validates that deployment, submits it, and polls its status until ARM says it has succeeded. In my trace, that meant roughly half a dozen additional round-trips before the resource I actually asked for was even confirmed. Call it another 5 seconds spent watching the deployment wrapper rather than the thing being deployed.</p>
<p>The last chunk is different. Not everything in an agent stack can be provisioned through the ARM template, and creating the agent itself requires going through the Foundry APIs. So <code>azd</code> hands off to a hook script, which spins up an entire Python interpreter just to make one API call.</p>
<h2 id="why-azd-does-this">Why <code>azd</code> does this</h2>
<p>I&rsquo;ve worked as a platform engineer, and I get why this exists when the job is managing real infrastructure. Bicep compilation, the ARM wrapper, and deployment state tracking buy real things in production: declarative and idempotent deployments, dependency ordering, validation, and a consistent audit trail for infrastructure where everything depends on everything else: networking, IAM, and dozens of resource types.</p>
<p>None of that buys me anything when I just want to get a model and a prompt
agent live. I don&rsquo;t think <code>azd</code> is bad tooling. I think it&rsquo;s built for a
different job than the one I&rsquo;m doing.</p>
<p>Agent definitions sit much closer to business logic than infrastructure, and they change on a completely different cadence. I don&rsquo;t think updating a prompt, changing a tool, or tweaking an agent definition should have to pass through the same pipeline as long-lived cloud infrastructure. When I&rsquo;m iterating on an agent, I might make those changes several times an hour, not once a quarter.</p>
<p>So the Azure-specific benchmark results aren&rsquo;t really the point here. They&rsquo;re just a concrete example of a broader mismatch in managed cloud tooling.</p>
<p>Now if you come from a Kubernetes background, your first reaction may be that the agent shouldn&rsquo;t be a cloud resource at all. That&rsquo;s a perfectly reasonable architecture: keep prompts, tools, and orchestration in application code and let the platform provide models and runtime primitives underneath. This problem only appears once agent definitions themselves are platform-managed objects.</p>
<p>But in a large enterprise, that&rsquo;s less and less the developer&rsquo;s call. Once an agent needs its own identity, scoped permissions, and an audit trail, and the organization wants an inventory of which agents exist and what they&rsquo;re allowed to reach, the definition will end up in the control plane whether or not you&rsquo;d have put it there to begin with.</p>
<p>(If you&rsquo;re wondering why the model deployment is part of the experiment at all, rather than just the agent, I get into that in the <a href="#appendix-why-include-the-model-deployment-at-all">appendix</a>.)</p>
<h2 id="the-trade-off-isnt-mandatory">The trade-off isn&rsquo;t mandatory</h2>
<p>What IaC is supposed to buy you (repeatability, idempotency, change detection, an audit trail) doesn&rsquo;t inherently require a Terraform-style state file or ARM&rsquo;s tracked deployment wrapper. Those are ways of implementing those guarantees, not the guarantees themselves. A tool can derive current state from the platform APIs, rely on idempotent resource operations, and keep history elsewhere. ARM&rsquo;s choice to wrap every deployment in a tracked resource is reasonable for the infrastructure workloads it was designed for, but it isn&rsquo;t the only possible design.</p>
<p>In practice, the tooling is already starting to reflect that distinction. Microsoft&rsquo;s own GitOps
reference architecture for <a href="https://techcommunity.microsoft.com/blog/azuredevcommunityblog/building-and-operating-a-microsoft-foundry-hosted-agent-with-gitops-and-github-t/4523393">Foundry Hosted Agents</a>
separates <code>/infra</code> from <code>/src/prompts</code>,
<code>/src/agents</code> and <code>/src/tools</code>. Long-lived infrastructure is provisioned with Bicep, while prompts and agent code are versioned, reviewed, packaged, and promoted on their own lifecycle. A prompt change doesn&rsquo;t require another infrastructure deployment.</p>
<p>AWS approaches the same need from a different direction. Bedrock AgentCore supports direct ZIP deployment, giving agent developers a much tighter iteration loop than a traditional CDK or CloudFormation pipeline. I don&rsquo;t think throwing a ZIP at an API is a particularly satisfying end state either: it gives up some of the declarative structure, constraints, and repeatability that make infrastructure tooling valuable in the first place. But it does recognize the underlying need. Agent developers need tooling designed around rapid behavioral iteration, not just infrastructure provisioning.</p>
<p>That&rsquo;s the gap I think the current tooling still hasn&rsquo;t filled. Agent definitions should be versioned, reviewable, reproducible, and safely promoted between environments, without forcing every prompt or tool change through a process designed for traditional cloud infrastructure.</p>
<h2 id="fas-split-by-change-frequency-not-by-resource-type"><code>fas</code>: split by change frequency, not by resource type</h2>
<p>With that problem in mind I wanted to see what a deployment path designed around a tighter iteration loop could actually look like.</p>
<p>I built <a href="https://github.com/andreabrduque/fas-cli"><code>fas-cli</code></a> (foundry agents
stack) as a tooling experiment. Models, connections, toolboxes, and agent definitions change frequently, so <code>fas</code> skips Bicep for that layer and deploys directly through the Azure SDK. On every <code>fas plan</code>, it reads the current resources from Azure and diffs them against the desired state expressed in Python.</p>
<p>For the small stack I benchmarked—a model deployment plus a running prompt agent—that cuts deployment time from an average of 22.5 seconds with <code>azd</code> to about 10 seconds with <code>fas</code>.</p>
<table>
	<thead>
			<tr>
					<th></th>
					<th><code>azd</code> / Bicep</th>
					<th><code>fas</code></th>
			</tr>
	</thead>
	<tbody>
			<tr>
					<td>Deploy time (model + prompt agent)</td>
					<td>22.5s avg (5 runs)</td>
					<td>10s avg (5 runs)</td>
			</tr>
			<tr>
					<td>State</td>
					<td>Azure is the source of truth; ARM retains deployment history</td>
					<td>Azure is the source of truth; no separate deployment state</td>
			</tr>
			<tr>
					<td>Planning</td>
					<td>ARM/Bicep evaluates desired state against live Azure</td>
					<td>Diffs Python definitions against live Azure</td>
			</tr>
			<tr>
					<td>Dependency execution</td>
					<td>ARM dependency graph, with additional <code>azd</code> orchestration</td>
					<td>DAG from typed references, independent operations run concurrently</td>
			</tr>
			<tr>
					<td>Concurrency control</td>
					<td>ARM deployment semantics</td>
					<td>Optimistic, no global lock (see below)</td>
			</tr>
			<tr>
					<td>Scope</td>
					<td>Any Azure resource</td>
					<td>Foundry accounts/projects only</td>
			</tr>
	</tbody>
</table>
<p>Three things make the iteration loop lighter.</p>
<ol>
<li>
<p><strong>No separate state store.</strong> <code>fas plan</code> reads Azure directly and compares what exists with the Python definitions. There is no Terraform-style state file, and no <code>fas</code> deployment record that has to be kept in sync with reality.</p>
<p>That doesn&rsquo;t mean there is no state: Azure itself is the state.</p>
<p>The trade-off is that <code>fas</code> doesn&rsquo;t maintain its own historical snapshot of what it previously deployed. If a change is wrong, you fix the definition and deploy again, or revert the change in Git. Azure&rsquo;s current state, Azure&rsquo;s platform logs, and Git history are the records.</p>
</li>
<li>
<p><strong>No deployment wrapper.</strong> <code>fas</code> calls the relevant Foundry APIs directly and waits on those operations. There is no separate ARM deployment resource to validate, submit, and poll first.</p>
<p>That shortcut only works because of the deliberately narrow scope for the tooling. ARM has to orchestrate almost anything Azure can provision; <code>fas</code> only has to understand a small Foundry resource graph.</p>
</li>
<li>
<p><strong>Optimistic concurrency instead of locking.</strong> <code>fas deploy</code> checks that nothing has changed since the preceding plan before it writes.</p>
<p>That works well as long as deploys don&rsquo;t overlap. Run <code>fas deploy</code> twice against the same project at nearly the same time—from two developers, or from a developer and CI—and the later write can silently win. No merge conflict, no lock contention, just the earlier change overwritten.</p>
<p>For one developer or a small team, that trade-off is probably acceptable. Once multiple people or pipelines are deploying the same project regularly, it needs stronger concurrency control. Today, <code>fas</code> doesn&rsquo;t have that.</p>
</li>
</ol>
<p>None of these ideas are novel. Declarative definitions, live-state diffing, and reconciliation loops have been standard practice in the Kubernetes ecosystem for a decade.</p>
<h2 id="what-fas-doesnt-do">What <code>fas</code> doesn&rsquo;t do</h2>
<p><code>fas</code> is deliberately scoped to Foundry accounts and projects: models, connections, toolboxes, and prompt agents. It isn&rsquo;t a general-purpose Azure provisioning tool. It doesn&rsquo;t handle multi-environment promotion from dev to stage to prod, and it doesn&rsquo;t manage RBAC for you. As discussed above, it also has no deployment locking yet.</p>
<p>Treat it for what it is: a tooling experiment for a fast sandbox iteration loop, not something I&rsquo;d point multiple developers and CI pipelines at in production.</p>
<h2 id="and-finally-where-i-land">And finally: where I land</h2>
<p>None of this is an argument against IaC. Terraform&rsquo;s state management and ARM/Bicep&rsquo;s tracked deployment model earn their keep when you&rsquo;re managing infrastructure with real interdependencies that changes relatively rarely. They&rsquo;re just the wrong shape for agent definitions that may change every hour and, in many cases, aren&rsquo;t ARM resources to begin with. Deployment tooling should match the lifecycle of the thing you&rsquo;re changing, not just the category of platform it happens to live in.</p>
<p>The interesting question isn&rsquo;t really whether you should use <code>fas</code>— you probably shouldn&rsquo;t. It&rsquo;s that the tooling gap is real enough that AWS has built a separate deployment path for it: the direct code deployment AgentCore Runtime added in November 2025, so developers don&rsquo;t have to push every iteration through the heavier container or infrastructure path.</p>
<p>But look at what that alternative is: a ZIP upload. No plan, no live-state diff, no dependency graph. Just an imperative push, primarily positioned around faster prototyping and iteration. That&rsquo;s the false choice I find interesting. Agent developers shouldn&rsquo;t have to choose between pipelines designed for cloud infrastructure and a fast path that gives up declarative deployment semantics entirely.</p>
<p>A lightweight path that keeps plan-and-diff semantics, reads the platform&rsquo;s live state, and drops the infrastructure-specific overhead is perfectly feasible. <code>fas</code> isn&rsquo;t proof that I&rsquo;ve found the right implementation. It&rsquo;s just proof that this design space exists.</p>
<p>Keeping agents in application code remains a legitimate architecture that avoids most of this, but as discussed, I foresee that option narrowing as agents pick up identities, permissions, and audit requirements of their own.</p>
<p>If your team is deploying agents through IaC tooling today, I&rsquo;d be curious where you drew the line: did agent definitions stay in the same pipeline as the infrastructure, move onto their own promotion path, or leave the platform entirely and go back into application code?</p>
<h2 id="appendix-why-include-the-model-deployment-at-all">Appendix: why include the model deployment at all?</h2>
<p>A fair question about this experiment is why put the model deployment in it at all. The agent isn&rsquo;t an ARM resource, it&rsquo;s created through the Foundry data-plane APIs. And architecturally, an agent definition doesn&rsquo;t need to know anything about the model at all: it can reference an endpoint, and whatever sits behind that endpoint is the platform&rsquo;s concern.</p>
<p>This doesn&rsquo;t change the fact that a deployed agent that can actually answer a request still has to resolve to a specific model, and that choice can make or break the agent&rsquo;s behavior. Run the same prompt and tools against a different model, or against a silently updated version behind the same endpoint, and you have a different agent and different eval results. So once the model deployment is abstracted as an endpoint, either that endpoint pins a model version, in which case the agent does know the model after all, just at one level of abstraction higher, or it doesn&rsquo;t, and your evals stop being reproducible.
In an organization where a platform team runs models as shared, governed endpoints, the model genuinely is infrastructure, and only the prompt, tools, and endpoint reference change fast. But while I&rsquo;m iterating on an agent, I still should own the model choice from a behavior perspective: I might pin a version so an eval stays reproducible, try a smaller model for speed, or test latest model releases. I won&rsquo;t change the model as often as I touch the prompt, but often enough that, for me, it belongs to my application development loop.</p>
<p>That&rsquo;s why I decided that the smallest unit worth deploying and benchmarking here isn&rsquo;t the agent alone, it&rsquo;s a model plus an agent that can actually answer a request.</p>
<p>Azure splits that unit across two planes: the model deployment lives in ARM, next to networking and IAM, while the agent lives behind the Foundry data-plane APIs. That split is exactly what produced the deployment trace at the start of this post: Bicep and the ARM deployment wrapper for one half, a hook script spinning up a Python interpreter for the other.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
