Subscribe free
Morning Merge AI · Monday, November 30, 20265 min read

Foundry's agent optimizer, and rules agents actually follow

Also: AWS's credential broker for agents, stateful Bedrock guardrails, Antigravity

Today's thread: the system around an agent matters more than the words you hand it. At Microsoft, a better failure-diagnosing model beat a model swap, and one developer's violation log says the same about rules.

The main thing

A wind-up clockwork apprentice reads a strip of punched paper tape through a violet magnifying lens on an articulated arm, with three alternative gear assemblies lined up on the bench

Microsoft Foundry now proposes fixes to your agent from production traces. InfoQ reports that Microsoft wired production traces, expert annotations and evaluation scores into an agent optimizer, announced at Ignite.

The optimizer generates candidate configurations covering system instructions, skills, tool descriptions and model choice, scores them against criteria your team defines, and ranks them. A developer approves the winner before it ships.

The weird part is in the team's engineering post. The reflector is a separate model that reads failing traces and diagnoses why the agent scored poorly, and it moved results more than the agent's own model did.

A stronger reflector helped more than switching the agent itself to a different model. If you tune agents by swapping models, that's worth sitting with.

The loop runs from the Azure Developer CLI: azd ai agent eval init builds a dataset and evaluator from a one-paragraph description, azd ai agent eval run scores a baseline, and azd ai agent optimize searches candidates. Then azd ai agent optimize apply --candidate <id> and azd deploy.

Availability is split. Production insights, which group recurring failures and rank fixes, are generally available, as are multi-turn evaluation and tracing for agents built with LangGraph, LangChain and CrewAI.

The optimizer itself, trace annotations, golden datasets and Programmed Training are in preview. The optimizer supports hosted agents on the Responses protocol and needs two models deployed for each run.

Gulf Air used it before its Falcon Eye agents went live on November 9: about 10,000 candidate evaluation questions, run in batches of 100, ending in a 400-question run. The post publishes no accuracy, latency or cost improvements.

Microsoft says its model router saves up to 65% against sending every request to a frontier model, based on its own testing. Treat that as a ceiling. Harri Jaakkonen's line is the one to keep: "A trace can inform a candidate, but only a human-approved release should change production."

Rules that hold

A wind-up clockwork apprentice reaches for a machine's lever and is stopped by a violet hinged gate bar, with a closed ledger book on the bench

A violation log taught one developer to write agent rules that stick. The agent writes a dated entry in one file every time it breaks a rule, and reads that file before each session. The author's claim: a rule that keeps showing up isn't being disobeyed. It was written for a human reader.

The rewrites follow three laws. Deterministic beats aspirational: "Be efficient with tests" became "Run only the failing test. Full suite only at the milestone gate." Enforceable beats advisory: after an agent rewrote git history to scrub a leaked key, force-push moved out of the prompt and into the harness, which now denies it.

Looped beats floating: a rule nobody revisits after a violation gets violated again, which is what the log is for.

The sharpest point is about people. Humans quietly round a vague instruction into something sensible, so you never learn it was broken. An agent executes it literally, which makes it "an instruction-quality test that runs every day, for free."

Bedrock Guardrails can now check a request against the whole session. Stateful guardrails, in gated preview, evaluate each request with your system prompt and earlier turns instead of only the latest message.

AWS says that cuts false prompt-attack flags on normal instructions, like a coding agent told to ignore generated files, and catches attacks spread across turns or hidden in tool results.

A security threat check reviews tool calls before they run, flagging known-malicious domains, commands that expose credentials and privilege escalation. Your app can stop the call, ask the user or log it. That's the second law sold as a service. Access is allowlisted, in US East (N. Virginia) and US West (Oregon).

AWS builds agent plumbing

A wind-up clockwork apprentice catches a small violet token from a wall dispenser while a large master key hangs inside a closed glass cabinet

AWS IAM Credential Broker hands agents short-lived tokens for other clouds. In public preview, it gets OAuth access tokens and API keys for Snowflake, Databricks, Salesforce, Azure and GCP through the identity provider you already use, such as Okta, Microsoft Entra ID or Auth0. Long-lived secrets stay in the broker; your code sees short-lived access tokens.

It supports client credentials, authorization code and token exchange flows, and refreshes tokens in the background so an agent doesn't keep asking. When an agent acts for a user, it gets only that user's access, so the external system can audit it. Most homegrown agent setups skip that part. It's free during the preview, in all commercial Regions.

AgentCore Runtime v2 now runs x86 agents. Until now, Runtime agents had to be ARM64, so anything that depended on a vendor binary without an ARM64 build had to be cross-compiled and revalidated. Sessions also get up to 8 vCPUs, 32 GB of memory, 10 GB container images and a build warmup hook so they start warm.

Agents there can also mount S3 Files without VPC configuration, as can those on Lambda MicroVMs. It's off by default, limited to the IAM roles and users you grant, and works only within the same Region.

Quick bits

Antigravity CLI 1.5.17 appears to charge custom agents 4× the quota. A careful bug report shows agy acp --agent <custom-agent> drawing exactly 4.00× the Gemini weekly and 5-hour quota per token compared with 1.5.16, using a custom agent with no tools and a one-line prompt. The default agent is unchanged, and the release notes don't mention it.

A Hacker News commenter says Google called it intentional; we couldn't confirm that. If you script custom agents on a consumer plan, check /usage before and after a run.

Rocket, a vibe-coding rival to Lovable and Replit, shuts down December 31. It has told users to download their code and data before then and stopped selling plans. Rocket told TechCrunch that investors canceled a planned round; Moneycontrol reported that due diligence found revenue discrepancies, which Rocket disputes. If you build on a hosted app builder, know your export path before you need it.

Before you swap your agent's model again, look at what reads its failures and what enforces its rules.

← All Morning Merge AI issues

Get this in your inbox every morning.

Free. Five minutes. Unsubscribe in one click.

Subscribe free →