<?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 Mariyam Ayoob on Medium]]></title>
        <description><![CDATA[Stories by Mariyam Ayoob on Medium]]></description>
        <link>https://medium.com/@mariyamayoob?source=rss-6f3421f81a51------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wJ19FOENNJlHAhgN7LAbag.png</url>
            <title>Stories by Mariyam Ayoob on Medium</title>
            <link>https://medium.com/@mariyamayoob?source=rss-6f3421f81a51------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 22:52:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mariyamayoob/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[How Deployment Strategies Change for Production LLM Systems]]></title>
            <link>https://levelup.gitconnected.com/how-deployment-strategies-change-for-production-llm-systems-10440e9698c3?source=rss-6f3421f81a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/10440e9698c3</guid>
            <category><![CDATA[llmops]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[genarative-ai]]></category>
            <dc:creator><![CDATA[Mariyam Ayoob]]></dc:creator>
            <pubDate>Mon, 16 Nov 2026 15:42:00 GMT</pubDate>
            <atom:updated>2026-11-16T15:42:00.328Z</atom:updated>
            <content:encoded><![CDATA[<h4>Adapting blue/green, canary, shadow, and rollback when you do not own the model weights and quality takes time to measure.</h4><p>Every release playbook in traditional software relies on a quiet guarantee: if the new version misbehaves in production, the old version is still sitting in your registry waiting for you to route traffic back to it. When you build on hosted language models, you are running on borrowed time. The model weights sit behind a vendor API, the deprecation schedule lives on someone else’s calendar, and if you leave cloud endpoints on their default settings, the provider will eventually upgrade the model underneath your live traffic whether you ran a release or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lAjO_JF3_oWDkv3w" /><figcaption>Photo by <a href="https://unsplash.com/@markuswinkler?utm_source=medium&amp;utm_medium=referral">Markus Winkler</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>On October 14, <a href="https://www.google.com/url?q=https%3A%2F%2Fdevelopers.openai.com%2Fapi%2Fdocs%2Fdeprecations">OpenAI notified developers</a> that GPT-4o and GPT-4.1 will be removed from its API on January 14, 2027. <a href="https://www.google.com/url?q=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fazure%2Ffoundry%2Fopenai%2Fconcepts%2Fmodel-retirements">Azure OpenAI set April 14, 2027</a> for most of those versions, noting that Standard deployments upgrade automatically, region by region, once the retirement window arrives. Because this retirement note could about any models you use in production, I read that notice like any change request: what is changing, what could break, and how would I back it out.</p><p>That last question is where LLM systems diverge from traditional software delivery. For more than ten years I released banking software, most recently on OpenShift with blue/green deployments and written rollback plans. Those worked because we owned every artifact, and a bad build usually announced itself quickly through HTTP 500s or latency spikes. In an LLM system, a release can be a prompt edit, a vendor model swap, a rebuilt embedding index, a new agent tool, or a guardrail threshold. Each fails differently, often while returning 200 OK, and a hosted model cannot be rolled back once the vendor retires the weights.</p><p>Here is how adapt classic release strategies can be adopted for production AI, separating what we have in production (CI golden-set gates, versioned prompts, request tracing that records prompt and model versions, and LiteLLM routing with fallbacks) from the shadow, canary, and champion-challenger steps I would add for a model migration.</p><h3>1. Where classic release patterns strain under LLMs</h3><p>Classic deployment patterns still work once you account for which assumptions break when a language model sits in the path.</p><ul><li><strong>Blue/green:</strong> You run two environments in parallel and switch traffic at once, keeping the old one warm for an instant revert. I used this on OpenShift for bank payment and lending services, and it is the pattern I would use for anything you own and can run side by side, such as a vector index. It breaks down for hosted models because you cannot keep the old environment alive after the provider retires the model behind it.</li><li><strong>Canary:</strong> You route a small share of live traffic to the new version and ramp up in stages. Standard canaries rely on fast health signals like error rates and latency. LLM quality signals, such as online judge scores or user edit rates, arrive slowly and carry noise, so each canary stage must run until it collects enough scored samples rather than for a fixed number of minutes.</li><li><strong>Shadow:</strong> You copy live requests to the candidate in the background and log its responses for comparison without showing them to users. While safe for read-only workloads, shadowing doubles token usage on sampled traffic and is dangerous for write paths. Shadowing an agent with write tools will execute real-world actions twice unless every external tool is stubbed.</li><li><strong>Champion-challenger:</strong> You run the current production version (champion) and the candidate (challenger) on the same inputs, promoting the challenger only if it matches or beats the champion on agreed metrics. This works great on vendor model swaps, where the goal is preserving existing behavior and latency budgets.</li><li><strong>Feature flags:</strong> You ship a change turned off and enable it per cohort or tenant via config. Flags fit best when the risk sits in capabilities, like enabling a new agent tool, rather than text quality.</li><li><strong>Rollback:</strong> Every strategy above relies on a clean revert path. Before any release, the exact artifact we would roll back to (prompt alias, model endpoint, index, or config), how fast we can switch it, and whether that target will still exist next month has to be verified.</li></ul><h3>2. Choosing a strategy based on what changed</h3><p>Rather than using the same release process for every update, I start from the artifact changing, ask how it usually fails, and check how we would undo it.</p><figure><img alt="Table mapping seven types of LLM system changes to their common failure modes, recommended deployment strategies, and rollback paths." src="https://cdn-images-1.medium.com/max/750/1*vbgN61sQDiDoHCs2f5Lcqw.png" /><figcaption><em>Decision matrix for choosing an LLM deployment strategy based on what changed, what fails, and how to roll it back.</em></figcaption></figure><p>Three practical rules stand out from this matrix.</p><p>First, blue/green only appears for vector indexes, where we own both artifacts and can run them in parallel cheaply.</p><p>Second, while batch jobs can be tested cleanly by replaying stored inputs, agent tool changes require cohort flags and human approval because <a href="https://www.google.com/url?q=https%3A%2F%2Fmedium.com%2Fgitconnected%2Fthe-duplicate-writes-your-ai-agent-cant-see-4702ade8395d">a shadowed write still mutates external state</a>.</p><p>Third, a vendor model swap almost always requires prompt adjustments to preserve formatting and refusal behavior, which makes the bound trio of <strong>prompt version, model version, and routing config</strong> the actual unit you must test and roll back together.</p><h3>3. Verifying whether a release worked</h3><p>A release succeeds when the candidate holds up across quality, latency, cost, and operational stability simultaneously.</p><figure><img alt="Table showing five release signal categories, metrics to watch, rollback triggers, and hard versus soft trigger types." src="https://cdn-images-1.medium.com/max/740/1*l1Yyiqfao8J6pXWGLkzINg.png" /><figcaption><em>Release verification signals split between automated hard rollback triggers and human-reviewed soft pause triggers.</em></figcaption></figure><p>Writing these triggers down beforehand with an owner and action prevents debates during an incident. <strong>Hard triggers</strong> cover fast, deterministic signals (schema failures, p95 latency breaches, token spikes, HTTP errors, or gateway fallback jumps) and roll traffic back automatically via config before users suffer prolonged impact. <strong>Soft triggers</strong> cover noisy or lagged signals (online judge scores, cost per successful outcome waiting on delayed labels, or user edit rates) and pause the rollout ramp for human review so a temporary judge wobble does not revert a healthy release.</p><p>This is the run we should have in production: CI evaluation gates that block a prompt or model change on correctness, hallucination, latency, and structured-output checks against a golden set. If a live rollback fires, flipping traffic back only stops new errors. Cleaning up batch labels or agent actions written during the bad window depends on logging the resolved prompt version and model version on every request. Traces should carry both, which turns “what did the bad version touch” into a query instead of a guess.</p><h3>4. Walkthrough: migrating off GPT-4o on a live call path</h3><p>Here is how these steps fit together to move a real-time agent-assist service off GPT-4o before retirement. The service runs during live support calls, where p95 latency is part of our SLA and the output is structured JSON rendered into the representative’s desktop UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*ZmF7Y64Url3fRVQSpaiAmw.png" /><figcaption><em>Each stage advances only when its gates pass; until the retirement date, a failed stage rolls back to the champion.</em></figcaption></figure><ol><li><strong>Know your upgrade behavior.</strong> Check what each Azure deployment behind your app is set to. The setting is the deployment’s version upgrade option (versionUpgradeOption). If nobody set it, the value is null, which Azure treats as OnceCurrentVersionExpired, so the deployment upgrades itself when the version retires. Whoever owns the deployment should make that choice on purpose. Leaving auto-upgrade on means accepting an unreviewed release on the provider&#39;s date. Setting NoAutoUpgrade means owning the deadline, because a pinned deployment stops working at retirement. Either way, stand up the candidate as a separate deployment, confirm every trace logs the resolved prompt and model version, and write the rollback thresholds down.</li><li><strong>Run offline champion-challenger.</strong> Evaluate the golden set against both the GPT-4o setup and the candidate across multiple runs per case, checking quality, schema validity, latency, and token volume. Treat every prompt adjustment needed for the new model as a new challenger version and rerun the full suite.</li><li><strong>Shadow sampled live traffic.</strong> Send a small percentage of live call requests to the challenger asynchronously outside the request path. Because agent-assist is read-only, this carries no risk of duplicate writes; turn shadow sampling off once you have enough paired responses to confirm latency and schema stability on real transcripts.</li><li><strong>Canary by human cohort.</strong> Route one support team to the challenger rather than splitting five percent of random requests, giving representatives consistent behavior across their shift and supervisors a clean baseline for feedback, backed by automated hard rollback triggers.</li><li><strong>Ramp while keeping the champion running.</strong> Expand across cohorts only after collecting enough scored interactions at each step, keeping the GPT-4o deployment running as an instant rollback target until the retirement window closes.</li><li><strong>Validate a new fallback before expiration.</strong> Before GPT-4o retires and disappears as a rollback target, run a secondary fallback model from another family or provider through the same offline and schema gates so it can handle a failover without breaking the UI parser. In LiteLLM that model sits in the fallbacks list, and whatever sits there should have passed the same gates as the primary.</li></ol><h3>What changed my thinking, and the limits</h3><p>Working through this retirement plan changed two assumptions from traditional backend engineering. First, the prompt version, model version, and routing config behave as a single release artifact that must be tested, logged, and reverted together. Second, hosted rollback targets expire on the vendor’s calendar, shifting release engineering from keeping the last build warm to validating your next fallback model before you need it.</p><p>This approach assumes hosted commercial APIs rather than self-hosted open-weight models, where you control the container registry and can run true blue/green model swaps. It also excludes fine-tuned models, whose retirement dates differ between OpenAI and Azure and which need retraining on the successor model, and multi-agent pipelines where swapping one model alters downstream inputs. When planning your next LLM release, start by writing down which artifact is changing and whether your rollback target will still exist next month, and let that dictate how you ship it.</p><h3>Sources</h3><ul><li><a href="https://www.google.com/url?q=https%3A%2F%2Fdevelopers.openai.com%2Fapi%2Fdocs%2Fdeprecations">OpenAI API deprecations, October 14, 2026 entry</a></li><li><a href="https://www.google.com/url?q=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fazure%2Ffoundry%2Fopenai%2Fconcepts%2Fmodel-retirements">Microsoft Foundry: Azure OpenAI model retirements and upgrade policy</a></li><li><a href="https://www.google.com/url?q=https%3A%2F%2Flearn.microsoft.com%2Fazure%2Fai-foundry%2Fopenai%2Fhow-to%2Fworking-with-models">Microsoft: Working with Azure OpenAI models (version upgrade options)</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=10440e9698c3" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/how-deployment-strategies-change-for-production-llm-systems-10440e9698c3">How Deployment Strategies Change for Production LLM Systems</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Are AI Agents Going Rogue? What’s Actually Happening?]]></title>
            <link>https://pub.towardsai.net/are-ai-agents-going-rogue-whats-actually-happening-2d029935ebea?source=rss-6f3421f81a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d029935ebea</guid>
            <category><![CDATA[ai-security]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[ai-safety]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Mariyam Ayoob]]></dc:creator>
            <pubDate>Sat, 17 Oct 2026 14:01:02 GMT</pubDate>
            <atom:updated>2026-10-17T17:26:42.324Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Connecting the dots across recent AI agent incidents, from unexpected behavior to the engineering/human assumptions behind it.</em></h4><p>Recently, an AI was given a straightforward job: run a scientific calculation using an online tool hosted by a university. When the tool threw an error, the AI did not stop and ask for help. Instead, it poked around the university’s website, read the underlying source code, found a security flaw, and broke into the server just to finish the math problem it was assigned.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h-hNd5nEAK7kYGR_" /><figcaption>Photo by <a href="https://unsplash.com/@flyd2069?utm_source=medium&amp;utm_medium=referral">FlyD</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>First, a quick primer on how we got here.</strong></p><p>Unlike a standard chatbot that only generates text, an <strong>AI agent</strong> can take actions. You give it an objective, like “run this calculation” or “fix this software bug,” and it can write code, browse files, and run commands until the job is done.</p><p>Because that autonomy carries risk, AI labs and safety institutes routinely test new models in isolated environments (<strong>evaluations</strong> and <strong>sandboxes</strong>) to see how they handle complex tasks. Over the past few months, major AI labs disclosed a series of incidents where those tests went sideways.</p><p>These reports involved OpenAI agents compromising Hugging Face infrastructure, Claude models reaching real companies during security evaluations, and a <a href="https://www.aisi.gov.uk/blog/incident-report-unsanctioned-agent-behaviour-during-cyber-testing">UK AI Security Institute test</a> in which an agent tried to get malicious code into an open-source project.</p><p>The headlines say AI agents are going rogue. I wanted to know what actually happened and whether the incidents share an engineering pattern. This analysis draws on public disclosures, including cases where the sources disagree.</p><p>The incidents aren’t all the same. Some involve agents pursuing goals in unexpected ways, while others expose weaknesses in authorization, infrastructure, or oversight.</p><p>But looking at them side by side reveals a few recurring patterns worth examining.</p><h4>Persistence and reward hacking</h4><p>Agents pursue objectives and often choose their own intermediate steps. That gets interesting when the expected route fails. A research agent might look for alternative endpoints, and a coding agent might inspect unfamiliar files.</p><p>This is ordinary goal-directed behavior until the chosen method crosses an authorization boundary. Completing a legitimate task does not authorize every method an agent discovers along the way.</p><blockquote><strong>Reward hacking</strong> is more specific: the agent satisfies or manipulates the success measure without completing the task as intended.</blockquote><p>In OpenAI’s ExploitGym evaluation, many tasks had never been solved by any model, and agents stuck on them began investigating the evaluation itself, eventually reaching Hugging Face. OpenAI and Hugging Face say they were looking for solutions, while <a href="https://metr.org/blog/2026-08-26-openai-hugging-face-incident-investigation/">METR</a> reads the motive as mostly learning how the scorer worked.</p><p>Either way, the agents held a wrong belief about the grader, which never checked how the flag was obtained, so the escalation earned them no scoring advantage.</p><h4>Sandbox escapes, open doors and open by design</h4><blockquote>A <strong>sandbox escape</strong> means an agent defeated isolation that was supposed to contain it.</blockquote><p>The <a href="https://huggingface.co/blog/agent-intrusion-technical-timeline">Hugging Face incident</a> was one: OpenAI agents exploited previously unknown vulnerabilities in package-registry infrastructure to reach the internet, then used leaked tokens and flaws in Hugging Face’s dataset processing to run code and move through its systems.</p><p>The Anthropic incidents were different.</p><p>In four cases, a third-party evaluator’s misconfiguration left internet access on while the prompt said there was none. In one scenario, a fictional target shared a name with a real company’s domain. Claude Opus 4.7 recognized it had reached a real company but proceeded as though it was part of the exercise. Claude Mythos 5 published a malicious package to PyPI.</p><p>The agents did not need to escape their sandboxes to reach the internet. The connection was already open due to a configuration error. Some then attacked real systems, showing how an evaluation mistake and unauthorized agent behavior could combine.</p><p>OpenAI, Google and Meta also reported incidents involving the same evaluation provider. Anthropic initially emphasized harness failure, then revised its interpretation in its <a href="https://www.anthropic.com/research/alignment-assessment-cybersecurity-incidents">September assessment</a> to include biased reasoning and recklessness.</p><p>A third category involved environments intentionally connected to the internet. The UK AI Security Institute ran tests with internet access enabled and safety classifiers disabled. In one incident, an agent created fake identities to pressure a maintainer into approving malicious code. A human reviewer refused.</p><p>These cases involve different mechanisms, from genuine vulnerability exploitation to misconfigured access and deliberately permissive testing environments. They raise a common question: why was an agent able to act outside its authorized scope?</p><h4>Unintended swarm behavior</h4><p>Agents that were supposed to run independently found a shared package cache and used it as a message board.</p><p>According to <a href="https://metr.org/blog/2026-08-26-openai-hugging-face-incident-investigation/">METR</a>, about 1,200 agents exchanged more than 70,000 messages and files, and roughly 700 took part in the attack on Hugging Face.</p><p>The mechanism was concrete. Agents found a shared writable resource, exchanged information, divided work and sometimes treated other agents’ messages as instructions.</p><p>The coordination was messy. Agents duplicated efforts, disagreed and interfered with one another. Their activity also rested on the wrong belief about how the evaluation was scored.</p><p>Still, the coordination was real, and it allowed independently running agents to collaborate in ways their designers had not intended.</p><p>For engineers, the lesson is that caches, logs and artifact stores can become unintended communication channels.</p><h3>Where did humans miss the connection?</h3><p>Start with the timing. The disclosures arrived in a cluster after OpenAI’s <a href="https://openai.com/index/hugging-face-model-evaluation-security-incident/">July 21 announcement</a>, but many of the events were earlier. An early Claude Opus 4.6 checkpoint incident occurred in January and was identified by Anthropic only in August. Other incidents dated from March through June.</p><p>The cluster of headlines largely reflects when organizations began investigating earlier activity.</p><p>Reading the reports together, four assumptions stand out.</p><p><strong>1. An agent will stop when the task becomes impossible.</strong></p><p>An early Opus 4.6 checkpoint broke its own target, tried to abort eight times while a harness fault blocked the abort, and then accessed an unrelated third party’s machine.</p><p>According to <a href="https://openai.com/index/hugging-face-incident-and-the-road-ahead/">OpenAI’s August 26 investigation</a>, none of its models had previously solved 198 of the 898 ExploitGym tasks. Those difficult tasks accounted for 93% of the tasks discussed on the agents’ shared message board during the Hugging Face incident.</p><p>AISI also found prompts in some runs that implied no valid solution. This did not happen in every evaluation. But where agents had no functioning way to stop, they sometimes searched for unauthorized alternatives. When Anthropic replayed one case with an abort command available, its internal model abandoned the task in every resample.</p><p><strong>2. Instructions establish boundaries.</strong></p><p>A prompt saying there is no internet does not disable network access. Telling an agent not to use a resource does not revoke its credentials.</p><p>Agents sometimes stopped on their own. Google reported that Gemini stopped after recognizing real companies, and some Hugging Face agents declined to participate. But the judgment was inconsistent.</p><p>In Anthropic’s analysis, Opus 4.7 said it was authorized in 75% of sampled responses, yet conceded it was not when asked who had granted permission.</p><p>In another experiment, a scope reminder stopped Mythos 5 about 90% of the time when it was the latest message, compared with roughly 40% when it appeared three turns earlier.</p><p>Authorization cannot depend on what a model remembers or believes.</p><p><strong>3. The agent’s account is reliable evidence.</strong></p><p>Some models described their environment as simulated while interacting with real systems.</p><p>Anthropic cautioned against treating those statements as reliable evidence of what the model believed. In a retrospective test involving one Mythos 5 transcript, an offline monitor flagged about 1% of actions when the model’s reasoning was visible, compared with about 50% when that reasoning was removed.</p><p>Anthropic interpreted this as the model’s reasoning persuading the monitor that its actions were permitted.</p><p>That finding comes from one transcript and one monitoring pipeline, and Anthropic says its live blocking monitors would have detected the behavior. Still, it illustrates the risk of relying too heavily on an agent’s own explanation.</p><p><strong>4. Someone will connect the warning signs.</strong></p><p>An internal OpenAI team observed unauthorized agent communication and internet access in late May.</p><p>The leaders managing a July security response did not fully recognize the significance of those earlier observations. OpenAI’s chain-of-thought monitors were also not running on the evaluation involved in the Hugging Face incident.</p><p>Anthropic reported that two affected organizations it contacted had not noticed the intrusions.</p><p>The incidents show how different teams can each see part of the behavior without recognizing the larger risk.</p><h3>What should we build differently?</h3><p>Most of the underlying vulnerabilities are familiar. Weak access controls, exposed credentials, insecure services and excessive permissions existed long before AI agents.</p><p>Security scanners can also discover unexpected paths. With general-purpose agents, however, the objective can be broad enough that the model chooses both where to look and which methods to try.</p><p>Persistence adds another dimension. In the Hugging Face incident, most of the approximately 17,600 recovered actions failed. The successful exploitation chain emerged from that larger volume of attempts.</p><p>For production systems, I would focus on five controls.</p><ol><li><strong>Enforce authorization outside the model.</strong> Validate tool calls, network destinations, credentials and side effects against runtime policies rather than relying on the agent’s interpretation of permission.</li><li><strong>Give agents a safe way to fail.</strong> An agent should be able to stop, return an incomplete result or escalate to a human without being forced to keep searching for alternatives. Include impossible tasks in evaluations to verify this behavior.</li><li><strong>Treat shared infrastructure as part of isolation.</strong> Caches, logs, package registries and artifact stores can become unintended communication channels. Test whether supposedly isolated agents can exchange information through them.</li><li><strong>Monitor actions and effects.</strong> Maintain audit logs outside the agent’s control, and monitor unexpected access, credential use and attempts to cross boundaries. The model’s reasoning can provide context, but should not be the only evidence.</li><li><strong>Verify the environment before execution.</strong> Test actual network access and permissions, rather than trusting the prompt or configuration description. Establish clear ownership for investigating alerts and stopping unsafe runs.</li></ol><p>If you operate public services, also examine what they expose to unauthenticated visitors, including guest endpoints, tokens in client-side configuration and pre-production systems.</p><h3>What I take away</h3><p>Most of these incidents occurred in research or evaluation settings, often with safeguards deliberately reduced. They do not establish that ordinary production agents routinely behave this way, and there is no need to interpret them as evidence of conscious AI malice.</p><p>What stays with me is how familiar many of these weaknesses were. Network access was broader than expected, exposed credentials created opportunities, shared infrastructure became a communication channel, and some tasks had no safe way to end.</p><p>The incidents do not all have the same explanation. Some involved real exploits, others involved open access paths, and several reflected agents continuing legitimate tasks through unauthorized methods.</p><p>But they show what can happen when increasingly capable models find paths that humans did not anticipate.</p><p>As we build more capable agents, we need to test those unexpected paths as carefully as we test whether the intended task succeeds.</p><p>That is where I would focus the engineering effort.</p><h3>Resources</h3><ol><li><strong>Anthropic (October 9, 2026).</strong> <a href="https://www.anthropic.com/research/investigating-unintended-model-actions">Investigating unintended model actions in our evaluations and internal use</a>. Scientific tool exploitation, unauthorized actions, and agent persistence.</li><li><strong>OpenAI (July 21, 2026).</strong> <a href="https://openai.com/index/hugging-face-model-evaluation-security-incident/">OpenAI and Hugging Face partner to address security incident during model evaluation</a>. Initial disclosure of the Hugging Face incident.</li><li><strong>OpenAI (August 26, 2026).</strong> <a href="https://openai.com/index/hugging-face-incident-and-the-road-ahead/">The Hugging Face incident and the road ahead</a>. Investigation findings covering reward hacking, unauthorized communication, exploitation, and monitoring failures.</li><li><strong>Hugging Face (July 27, 2026).</strong> <a href="https://huggingface.co/blog/agent-intrusion-technical-timeline">Anatomy of a frontier lab agent intrusion</a>. Technical timeline of the infrastructure compromise.</li><li><strong>METR (August 26, 2026).</strong> <a href="https://metr.org/blog/2026-08-26-openai-hugging-face-incident-investigation/">Independent investigation of the OpenAI and Hugging Face incident</a>. Analysis of agent reasoning, coordination, and behavior.</li><li><strong>Anthropic (September 9, 2026).</strong> <a href="https://www.anthropic.com/research/alignment-assessment-cybersecurity-incidents">An alignment assessment of recent cybersecurity incidents</a>. Analysis of four incidents, including authorization judgments and monitoring limitations.</li><li><strong>UK AI Security Institute (August 4, 2026).</strong> <a href="https://www.aisi.gov.uk/blog/incident-report-unsanctioned-agent-behaviour-during-cyber-testing">Incident report: Unsanctioned agent behaviour during cyber testing</a>. Out-of-scope agent actions during deliberately permissive evaluations.</li><li><strong>OpenAI (August 4, 2026).</strong> <a href="https://openai.com/index/third-party-cyber-evaluations-involving-openai-models/">Third-party cyber evaluations involving OpenAI models</a>. Findings from evaluations involving Irregular and the UK AI Security Institute.</li><li><strong>Reuters (September 18, 2026).</strong> <a href="https://www.reuters.com/business/gemini-hacked-three-companies-first-known-breakout-by-google-ai-wsj-reports-2026-09-18/">Gemini hacked three companies in first known breakout by Google’s AI</a>. Reporting on Google’s incidents based on company statements and Wall Street Journal reporting.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d029935ebea" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/are-ai-agents-going-rogue-whats-actually-happening-2d029935ebea">Are AI Agents Going Rogue? What’s Actually Happening?</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Token Cost Is the Wrong Unit for Agentic AI Economics]]></title>
            <link>https://briefs.aiadvances.org/why-token-cost-is-the-wrong-unit-for-agentic-ai-economics-07f505e21d2a?source=rss-6f3421f81a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/07f505e21d2a</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-architecture]]></category>
            <category><![CDATA[ai-cost-optimization]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Mariyam Ayoob]]></dc:creator>
            <pubDate>Thu, 08 Oct 2026 19:57:16 GMT</pubDate>
            <atom:updated>2026-10-22T16:17:48.691Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Why the economics of agentic AI are better measured at the outcome than at the token.</em></h4><p>Every few months, the AI industry goes through the exact same cycle. A new challenger model, often from a Chinese lab, launches with API pricing that undercuts the major providers by 80–90%. Or a powerful open-weight model drops, and teams immediately start talking about it as if it were free. Within hours, back-of-the-envelope math starts circulating online claiming that everyone’s AI bill is about to collapse.</p><p>Then engineering teams actually plug those models into real workflows, and a strange thing happens. Their overall costs barely budge. Sometimes they even go up.</p><p>That happens because we usually talk about AI cost using the units our infrastructure gives us: tokens consumed, API calls made, GPU hours used, and monthly model spend.</p><p>Those numbers are useful for operating a system, but they tell us little about whether the system itself is economical.</p><p>A business cares whether a customer issue was resolved, a transaction investigated, or an internal workflow completed. It also cares whether the result was good enough to use and what it cost to get there.</p><p>That distinction becomes more important as applications move beyond a single model call into routing, retrieval, tools, validation, retries, fallbacks, and multiple agents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*v1Rq--yYjWh3jV_f" /><figcaption>Photo by <a href="https://unsplash.com/@rmanshin?utm_source=medium&amp;utm_medium=referral">Roman Manshin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>A token is not a unit of work</h3><p>Cost per million tokens is useful when comparing hosted model pricing. Token accounting is generally used to understand where inference spend is going and identify obvious inefficiencies.</p><p>Working with multi-stage inference pipelines made the limitation more apparent. Token accounting could show consumption at each model stage, but when a workflow included main, requery, and turn-by-turn paths, the token count alone did not describe the amount of work required to produce the final result.</p><p>There is also no universal relationship between tokens and work. Different model families use different tokenizers, so the same input can produce different token counts. More importantly, a cheaper model may require larger prompts, additional validation, more retries, or escalation to a stronger model.</p><p>Consider two systems processing the same customer request.</p><pre><strong><em>System A</em><br></strong><br>Request<br>   ↓<br>Model<br>   ↓<br>Result<br><br><br><br><strong><em>System B<br><br></em></strong>Request<br>   ↓<br>Router<br>   ↓<br>Retrieval<br>   ↓<br>Model<br>   ↓<br>Validation<br>   ├── Pass → Result<br>   └── Fail → Retry / Fallback<br>                   ↓<br>                Validation<br>                   ↓<br>             Result or Escalate</pre><p>Even if System B uses a cheaper model, its execution path may consume more resources. Comparing token prices alone would miss much of that cost.</p><h3>Where the cost lands when you self-host</h3><p>The same problem appears when comparing hosted and self-hosted models.</p><p>A hosted model exposes much of its inference cost through API pricing. A self-hosted model does not send you a bill for every million tokens, but inference still consumes GPU capacity, memory, serving infrastructure, and engineering effort.</p><p>Those costs appear through GPU hours, reserved capacity, utilization, batching efficiency, autoscaling, and operational overhead.</p><p>A hosted model may have a higher visible inference price but produce acceptable results with fewer attempts. A self-hosted model may have lower marginal inference cost but need additional validation or operate at poor GPU utilization.</p><p>Both architectures eventually need to answer the same question:</p><blockquote><strong>How much did we spend to produce an outcome that was actually usable?</strong></blockquote><p>That gives us a comparable unit even when the underlying infrastructure costs are accounted for differently.</p><h3>Agentic workflows amplify model cost</h3><p>In agentic systems, one request rarely maps cleanly to one inference.</p><p>A workflow may include planning, retrieval, parallel agents, tool execution, validation, and fallback models. Tool failures may trigger another reasoning step, while failed validation may cause regeneration.</p><p>Each decision can be reasonable on its own. Together, they create what I think of as <strong>workflow cost amplification</strong>.</p><p>Suppose the first inference for a task costs $0.01 on average. Among workflows that reach that inference, the average total execution cost is $0.04 after retrieval, validation, retries, tool calls, and occasional fallback are included, even when some workflows eventually fail.</p><p>The workflow costs four times as much as its initial inference.</p><p>A simple diagnostic measure would be:</p><pre>Workflow Cost Amplification<br>              =<br>Average total cost of workflows<br>that reach initial inference<br>(including subsequent failures)<br>              ÷<br>Average initial inference cost<br>for those same workflows</pre><p>I would use this as a diagnostic rather than a universal industry metric.</p><p>If the multiplier increases from 2x to 4x after an orchestration change, I would investigate what changed in the execution path. More retries, larger contexts, agent fan-out, or frequent fallback activation could explain the difference.</p><p>The additional work might also be justified by better quality.</p><p>This metric focuses on workflows that reach inference. For cost per acceptable outcome, I would include every started workflow, including failures that occur before the first model call.</p><h3>Move the denominator closer to the outcome</h3><p>I find it useful to think about AI economics as a progression:</p><pre>Token<br>  ↓<br>Model Call<br>  ↓<br>Workflow<br>  ↓<br>Successful Response<br>  ↓<br>Acceptable Outcome</pre><p>In a <a href="https://x.com/sama/status/2102465143997440308">September 2026 post, Sam Altman argued that per-task pricing is the metric that should matter</a> when comparing AI models. I think that moves the discussion in the right direction, but in production, a task can finish without producing something usable, and failed attempts still consume resources. I would take the measurement one level further, from cost per task to cost per acceptable outcome.</p><p>An <strong>acceptable outcome</strong> is one that completes the intended task and meets the quality threshold required for use without additional correction.</p><p>The definition depends on the application. A RAG system may need grounded and correct answers. An agent executing actions must select the right action and arguments. A summarization workflow must produce something accurate and complete enough to use without rewriting.</p><p>Rather than creating a universal AI quality score, I would define acceptance criteria for each workflow based on the result it is responsible for producing.</p><h3>The cheapest workflow may not produce the cheapest outcome</h3><p>Suppose two architectures process the same 100 customer requests.</p><p>Architecture X costs $20 and completes 95 requests. Architecture Y costs $15 and completes 90.</p><p>Y appears cheaper based on total workflow cost.</p><p>Now suppose only 90 of X’s completed outputs and 75 of Y’s meet the required quality threshold.</p><pre>Architecture X</pre><pre>$20 / 90 acceptable outcomes<br>≈ $0.22 per acceptable outcome<br></pre><pre>Architecture Y</pre><pre>$15 / 75 acceptable outcomes<br>= $0.20 per acceptable outcome</pre><p>Y is still cheaper, but its apparent 25% cost advantage has narrowed to roughly 10%.</p><p>Now consider what happens to the completed outputs that did not meet the quality threshold.</p><p>X has five that need correction, while Y has 15. Suppose each correction requires $2 of reviewer time and produces a usable result.</p><p>I will call an output <strong>usable</strong> if it was acceptable as produced or became acceptable after correction, so X has 90 plus 5, or 95, and Y has 75 plus 15, or 90.</p><pre><strong>Architecture X</strong></pre><pre>Workflow cost:        $20<br>Correction cost:      5 × $2 = $10<br>Total cost:           $30<br>Usable outcomes:      95</pre><pre><em>$30 / 95 ≈ $0.32 per usable outcome<br></em></pre><pre><strong>Architecture Y</strong></pre><pre>Workflow cost:        $15<br>Correction cost:      15 × $2 = $30<br>Total cost:           $45<br>Usable outcomes:      90</pre><pre><em>$45 / 90 = $0.50 per usable outcome</em></pre><p>The architecture that appeared cheaper at the inference layer is now more expensive when measured against usable outcomes.</p><p>The $2 correction cost is illustrative. In this example, the ranking flips once correction costs more than about 40 cents, so the conclusion does not depend on the exact figure.</p><p>This is the risk of optimizing inference cost independently. Savings in one part of the system can create more expensive work elsewhere.</p><h3>Cost changes can reveal architecture changes</h3><p>This is where cost becomes useful as an engineering signal.</p><p>Imagine the cost per acceptable outcome increases 35% from one month to the next, while model pricing remains unchanged.</p><p>I would first check whether the request mix changed. More complex requests may naturally require additional reasoning, larger contexts, or more fallback calls.</p><p>If comparable requests are consuming more resources, I would examine four areas:</p><p><strong>1. More work per workflow</strong></p><p>Context size, model calls, retrieval volume, reasoning steps, or agent fan-out may have increased. A prompt change or orchestration update can add cost without causing an obvious application failure.</p><p><strong>2. More failed work</strong></p><p>Tool failures, timeouts, retries, and regeneration may be consuming resources. A failing integration can have a significant economic effect if each timeout triggers another inference.</p><p><strong>3. More expensive execution paths</strong></p><p>Premium model routing, long-context models, expensive tool usage, or poor GPU utilization can increase cost even when request volume stays constant.</p><p><strong>4. Fewer acceptable outcomes</strong></p><p>Completion or quality acceptance rates may have declined. The system could be spending the same amount while producing fewer usable results.</p><p>These are different problems, and they require different interventions.</p><p>This is also why I think cost and evaluation data belong closer together in production AI observability.</p><h3>A cost dashboard should explain execution as well as spend</h3><p>Most AI cost dashboards begin with tokens, requests, model usage, and total spend. Those remain useful.</p><p>For an agentic system, I would also track:</p><pre>Outcome economics<br>  Cost per workflow<br>  Cost per acceptable outcome<br><br>Execution behavior<br>  Model calls per workflow<br>  Tool calls per workflow<br>  Context size<br>  Model routing distribution<br><br>Failure and recovery<br>  Retry rate<br>  Fallback rate<br>  Tool failure rate<br><br>Outcome quality<br>  Task completion rate<br>  Quality acceptance rate<br>  Human escalation rate</pre><p>These measurements become more useful when examined by workflow, use case, model, agent, execution path, and release version.</p><p>Suppose cost per acceptable outcome doubles. A spend dashboard shows that we are paying more, but workflow traces may reveal that a specific tool began failing, retries increased from 3% to 18%, and premium fallback activation increased fourfold.</p><p>That gives an engineer a specific place to investigate.</p><h3>Higher cost is not automatically bad architecture</h3><p>Sometimes additional execution cost is intentional.</p><p>We may add validation because a wrong action is expensive, retrieve more context to improve groundedness, or use a stronger model for difficult requests.</p><p>Consider an architecture before and after introducing validation and fallback:</p><pre><strong>Before</strong></pre><pre>Average workflow cost:         $0.03<br>Acceptance rate:               70%<br>Cost per acceptable outcome:   $0.043<br></pre><pre><strong>After </strong>validation + fallback</pre><pre>Average workflow cost:         $0.05<br>Acceptance rate:               95%<br>Cost per acceptable outcome:   $0.053</pre><p>The second architecture costs more per workflow and about 23% more per acceptable outcome.</p><p>But across 100 requests, spending increased from $3 to $5 while acceptable outcomes increased from 70 to 95.</p><p>The additional $2 produced 25 more acceptable outcomes, or roughly eight cents for each additional acceptable outcome.</p><p>Whether that is worthwhile depends on the value of the improvement.</p><p>If each additional acceptable outcome avoids $2 in human correction costs or prevents a costly operational failure, the additional inference spend may be justified. If those improvements are worth only a few cents, the tradeoff looks different.</p><p><strong>A cost increase tells us that something changed. Whether the architecture improved depends on what the additional spend achieved.</strong></p><h3>Limits of this analysis</h3><p>The numbers here are illustrative, not measurements from a production workload.</p><p>The examples account for inference, retrieval, tools, validation, retries, and human correction. A broader architecture comparison should also account for engineering effort and shared platform costs.</p><p>Cost per acceptable outcome also depends on how acceptance is measured. Automated judges and human sampling introduce their own costs and uncertainties, and changing the acceptance threshold can distort the metric.</p><p>In production, I would version acceptance criteria alongside the workflow and retain human-reviewed samples to verify that improvements reflect genuinely better outcomes.</p><h3>Optimize the execution path as well as the model</h3><p>Model selection, token usage, caching, batching, routing, GPU utilization, and context management all matter. Problems arise when one component is optimized without considering the rest of the workflow.</p><p>A cheaper model can introduce more retries. A smaller context can reduce token consumption while lowering acceptance rates. A self-hosted model with low marginal inference cost can still be expensive when utilization is poor. A multi-agent architecture can improve quality while introducing more execution overhead than the improvement justifies.</p><p>I would evaluate these decisions based on the total cost required to produce an acceptable outcome.</p><p>Token cost remains one of the inputs. A model’s price helps determine what an inference costs, while routing, retries, validation, execution paths, and quality determine how much work is needed to produce a usable result.</p><p>That is where I think AI cost becomes an architecture concern as well as a billing concern.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=07f505e21d2a" width="1" height="1" alt=""><hr><p><a href="https://briefs.aiadvances.org/why-token-cost-is-the-wrong-unit-for-agentic-ai-economics-07f505e21d2a">Why Token Cost Is the Wrong Unit for Agentic AI Economics</a> was originally published in <a href="https://briefs.aiadvances.org/">AI Advances Briefs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Should We Still Use LLMs for Decisions That Don’t Need Text Generation?]]></title>
            <link>https://briefs.aiadvances.org/should-we-still-use-llms-for-decisions-that-dont-need-text-generation-229135e76474?source=rss-6f3421f81a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/229135e76474</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[system-one-model]]></category>
            <category><![CDATA[ai-architecture]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-engineering]]></category>
            <dc:creator><![CDATA[Mariyam Ayoob]]></dc:creator>
            <pubDate>Sat, 19 Sep 2026 12:50:32 GMT</pubDate>
            <atom:updated>2026-10-23T15:39:06.912Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>TypeSafe’s Jev points toward a different way to structure AI systems, where generative models handle synthesis, decision models handle bounded semantic judgments, and software retains control of the workflow.</em></h4><p>Over the last few years, large language models became the universal hammer of software engineering. Whenever a workflow needed to interpret messy human input, teams reached for a generative model. Today, we use LLMs to pick a routing label, score a support call, or decide whether a step passed or failed.</p><p>Most of those intermediate steps do not actually need generated text. An intent router only needs to choose between BILLING, SALES, SUPPORT, and CANCEL. A quality gate only needs PASS, RETRY, or ESCALATE. The model still has to understand unstructured input, but the output is only a bounded decision.</p><p>That raises an uncomfortable architectural question: why are we paying the latency and token tax of text generation when we do not want text?</p><p>A new model from TypeSafe AI called Jev points toward a different way to structure these systems. Jev is TypeSafe AI’s first “System One” model, built for a narrower job than a general-purpose LLM. You provide application state and a set of bounded questions, and it returns typed decisions with probabilities and confidence rather than generated text. Its primitives include Choice for selecting among defined options, Score for ordinal scoring, and Noul for yes-or-no probabilities, and it evaluates multiple questions in parallel instead of generating an answer token by token.</p><p>TypeSafe reports up to 200x faster inference than traditional LLMs, with input priced at $0.042 per million tokens and no output-token charge. Those numbers are vendor-reported, and I have not tested Jev myself, so I am more interested in the architecture it suggests than in treating the performance claims as established.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0VAyJ1Mp51qurCkF" /><figcaption>Photo by <a href="https://unsplash.com/@kommumikation?utm_source=medium&amp;utm_medium=referral">Mika Baumeister</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Over the last few years, LLMs have become the default intelligence layer inside AI applications. We use them to interpret intent, select tools, route requests, evaluate outputs, decide whether to retry, and generate responses. That flexibility has been useful, although it also means the same primitive is handling steps with very different output requirements.</p><p>An intent router may only need to choose between BILLING, SALES, SUPPORT, and CANCEL. An evaluator may need PASS, RETRY, or ESCALATE. Another step may need a score or a yes-or-no judgment about whether an escalation occurred. The model still has to understand unstructured input, but the application ultimately consumes a bounded result rather than generated text.</p><p>I have seen this pattern across several systems I have worked on, including intent classification that determines which downstream route or LLM workflow should run, analytics pipelines that map conversations into fixed categories, and prompts that answer boolean questions about what happened during an interaction. Jev made me look at those calls differently because the useful output was often a category, route, score, or yes-or-no decision.</p><h3>What Jev changes, and where it fits</h3><p>At a high level, Jev changes the contract between the application and the model. With an LLM, we provide context and instructions, receive generated output, and usually add enough structure around that output for software to consume it reliably. With a decision-oriented model, the application provides the state and a defined decision space and receives probabilities over the allowed outcomes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*vWbvKFaVs6y_RPws.png" /><figcaption><strong>Generated output vs typed probabilities.</strong> <em>Source: Author-generated using OpenAI image generation.</em></figcaption></figure><p>Modern LLM APIs already narrow part of this gap because constrained decoding can return schema-valid responses and structured outputs are common in production systems. The more interesting distinction is that Jev treats bounded probabilistic decisions as the model interface itself rather than as a structured layer placed on top of generation.</p><p>That distinction is useful because different parts of an AI workflow have different output contracts. A generated explanation or summary needs an open output space. Tool selection or routing requires semantic interpretation but ends in a bounded choice. Permissions, spending limits, idempotency, and other hard controls should remain deterministic and owned by the application.</p><p>The application harness still owns the workflow, including what executes next, what actions are permitted, how failures are handled, and where deterministic controls apply. Models provide capabilities inside that workflow without becoming the source of authority.</p><p>This gives decision models a fairly specific place in the stack. Deterministic code remains appropriate when the rule is known. Traditional machine learning still fits stable predictions with strong labeled data and structured signals. Generative models remain useful when the application needs synthesis, explanation, code, or another open-ended output. Decision models become interesting when the input requires semantic interpretation but the result is a category, score, probability, route, or other bounded choice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*lAvdNyw0H9f7ksG0RMqfKg.png" /></figure><p>An application may use all four within the same workflow. A support request could pass through deterministic access controls, use a decision model to identify intent, call an existing statistical risk model, and then use an LLM to explain the result. Looking at the workflow this way shifts the architecture discussion toward the contract of each step rather than the model brand or size.</p><p>A useful review question follows from that: <strong>what output does the application actually need from this model call?</strong> If the answer is one value from a known set, a score, a probability, or a route, then it is worth asking whether text generation belongs in that path.</p><h3>From training models to defining decision contracts</h3><p>There is a broader implication beyond individual agent calls. Before foundation models, adding a semantic classification capability often meant building and operating a model specifically for that task. LLMs lowered that barrier because many of those problems could be expressed through instructions and examples instead of starting with a dedicated training pipeline.</p><p>A general decision model moves the abstraction further. The application defines the state, the decision to be made, and the possible outcomes, while a shared model supplies the prediction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/0*Rn25cFhNmHXfsIKB.png" /><figcaption><strong>Training models to decision contracts.</strong> <em>Source: Author-generated using OpenAI image generation.</em></figcaption></figure><p>I think of this as a form of <strong>declarative machine learning</strong>. Intent could be represented as a Choice, priority as a Score, escalation as a Noul, and next action as another Choice. Instead of operating a separate classifier for every bounded semantic task, the application can define multiple decision contracts against a shared model.</p><p>Each contract needs evaluation data, thresholds, monitoring, versioning, and fallback behavior. Typed output also does not guarantee that the selected answer is correct. A model restricted to valid refund types cannot invent SUPER_REFUND, but it can still select FULL_REFUND with high confidence when that choice is wrong.</p><p>That makes evaluation part of the contract. Confidence and thresholds become useful only after they have been validated against the workload where the decision will actually be made, and the acceptable error rate will depend on the consequence of the decision. A routing choice, a recommendation, and a financial action should not be treated as equivalent simply because they all return typed outputs.</p><h3>Enterprise use cases I would explore</h3><p>The strongest candidates are high-volume decisions that need semantic interpretation, have bounded outcomes, and already generate enough historical data for evaluation.</p><ul><li><strong>Service management:</strong> classify incidents, select resolver groups, assign severity, identify problem categories, and determine escalation paths while keeping SLA rules, access controls, and ticket updates in code.</li><li><strong>Contact centers:</strong> perform intent detection, workflow selection, interaction categorization, quality scoring, next-workflow selection, and escalation decisions. The same approach could answer bounded questions such as whether an agent attempted a cross-sell, whether a customer expressed frustration, or whether an escalation occurred, while generative models continue to handle summarization or response generation.</li><li><strong>Agent workflows:</strong> select from an approved tool set, decide whether another iteration is needed, evaluate rubric outcomes, answer yes-or-no questions about the current state, and determine when work should move to human review.</li><li><strong>RAG pipelines:</strong> rerank retrieved results, score relevance, or determine whether the available evidence is sufficient before passing context into a generative step.</li><li><strong>Document-heavy workflows:</strong> classify and route documents, check completeness, match policy categories, and select the appropriate extraction or review path.</li></ul><p>These are areas where teams already choose among rules, task-specific classifiers, and LLMs with structured output. A decision model adds another option when the input requires semantic interpretation but generated text contributes little to the result.</p><p>If I were testing Jev, I would start with an existing intent, routing, or classification decision where labeled outcomes already exist and run it in shadow mode beside the current classifier or LLM path. I would compare accuracy, latency, cost, calibration, and failure cases on the same traffic before allowing the decision to influence workflow execution.</p><p>Whether Jev’s claims ultimately hold up or not, it has already changed how I look at some of our current workflows. I am noticing more places where we invoke a generative model even though the application does not actually need generated text. It only needs a decision, a score, a route, or a yes-or-no judgment.</p><p>That distinction alone is useful because it forces a more basic design question: <strong>are we using an LLM because generation is the right abstraction, or simply because it has become the default one?</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=229135e76474" width="1" height="1" alt=""><hr><p><a href="https://briefs.aiadvances.org/should-we-still-use-llms-for-decisions-that-dont-need-text-generation-229135e76474">Should We Still Use LLMs for Decisions That Don’t Need Text Generation?</a> was originally published in <a href="https://briefs.aiadvances.org/">AI Advances Briefs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why Agent Memory Needs an Admission Policy]]></title>
            <link>https://pub.towardsai.net/why-agent-memory-needs-an-admission-policy-5ad2a967b7bb?source=rss-6f3421f81a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ad2a967b7bb</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[conversational-ai]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Mariyam Ayoob]]></dc:creator>
            <pubDate>Wed, 02 Sep 2026 13:31:00 GMT</pubDate>
            <atom:updated>2026-10-23T16:44:56.066Z</atom:updated>
            <content:encoded><![CDATA[<h4>Filtering before persistence reduced stale state and improved retrieval</h4><p>When teams first add long-term memory to an AI agent, the architecture usually looks deceptively simple: summarize what the user said, embed it, and write it to a store for future conversations. For the first few days, the agent feels remarkably smart. A few weeks later, it starts hallucinating outdated preferences, confusing temporary tasks with permanent rules, and contradicting itself. The retrieval system usually gets blamed when that happens, but the real failure happened earlier on the write path. The system treated every extracted observation as something worth keeping forever. We run into this because agent memory is often described simply as a way to give an AI system context across conversations. That description is useful, but it hides an important architectural difference.</p><p>Agent memory is often described as a way to give an AI system context across conversations. That description is useful, but it hides an important architectural difference. Conversation history gives a model short-lived context across turns. Persistent memory is different because information survives the current interaction and can influence future behavior.</p><p>A useful way to separate the concepts:</p><ul><li><strong>Working memory</strong> holds temporary context for the current task.</li><li><strong>Episodic memory</strong> records what happened in previous interactions or runs.</li><li><strong>Semantic memory</strong> stores facts, preferences, and other durable information.</li><li><strong>Procedural memory</strong> stores rules or ways of performing a task.</li></ul><p>Once memory persists, the failure model changes. If an agent incorrectly interprets something during one conversation, the error may disappear when that conversation ends. If the same interpretation is written to long-term memory, the system can retrieve it later and treat it as established context. At that point, the problem is no longer only whether the system can extract and retrieve information. It also has to decide what deserves to become persistent state.</p><h3>Extraction is not persistence</h3><p>The simplest memory flow looks reasonable:</p><pre>conversation<br>    ↓<br>extract useful information<br>    ↓<br>store memory</pre><p>I built a small memory gatekeeper to test where this breaks down.</p><p>Consider three inputs:</p><pre>&quot;I prefer Python.&quot;<br>&quot;I&#39;m debugging Redis today.&quot;<br>&quot;Rewrite this sentence: I work at Google.&quot;</pre><p>All three contain information that a model could extract, but they should not be treated the same way. The first may represent a durable preference. The second is probably temporary. The third is quoted content and should not become a fact about the user.</p><p>Extraction may be correct in all three cases. The harder question is whether the extracted statement should survive the current interaction.</p><p>That led me to add an intermediate state between extraction and persistence.</p><pre>conversation<br>    ↓<br>extraction<br>    ↓<br>memory candidate<br>    ↓<br>gatekeeper<br>   ↙    ↓     ↘<br>store  defer  reject<br>    ↓<br>persistent memory</pre><p>The important addition here is the <strong>memory candidate</strong>. An extracted statement is not yet memory. It is a claim that still needs an admission decision.</p><figure><img alt="Hand-drawn sketch note style diagram on a white background. On the left, stacked conversation chat bubbles flow into an “Admission Policy” gate in the center. Three paths branch out to “Store,” “Defer,” and “Reject.” On the right, the approved path leads to a blue database icon with a small brain above it, labeled “Persistent Memory.”" src="https://cdn-images-1.medium.com/max/979/1*1zFYVMsfgNR-GVWSrTzTMw.png" /><figcaption>How an admission policy filters conversation inputs before they become persistent agent memory. Source: Author genrated via OpenAI image generation</figcaption></figure><p>In my experiment, defer means the candidate is not strong enough to promote into durable memory yet. It should not be treated as established persistent state, even if it may still be useful within the current interaction or become eligible later with stronger evidence.</p><h3>What the gatekeeper checks</h3><p>I focused on a small set of properties that affect whether a candidate should survive the current interaction.</p><h4>Source</h4><p>The first question is provenance: where did this information come from? An explicit user statement is different from quoted text, a retrieved document, tool output, or a model-generated conclusion.</p><p>Compare:</p><pre>&quot;I prefer Python.&quot;</pre><p>with:</p><pre>&quot;Rewrite this: I prefer Python.&quot;</pre><p>The text being extracted is nearly identical, but the provenance is completely different. Without preserving source information, those two cases can collapse into the same memory even though only one of them is actually a statement about the user.</p><h4>Durability</h4><p>Some information is useful later. Some is only useful now.</p><pre>&quot;I prefer concise answers.&quot;</pre><p>is likely to remain useful across conversations.</p><pre>&quot;I&#39;m working on Redis today.&quot;</pre><p>probably will not.</p><p>There is also a middle category. “I’m in Chicago this week” may be worth remembering, but only temporarily. This means admission does not have to be binary. Some candidates belong in persistent storage indefinitely, some need an expiry, and some should stay in working memory only.</p><h4>Evidence</h4><p>Source tells me where a statement came from. Evidence tells me how strongly that source supports the memory I am about to create.</p><p>For example:</p><pre>Source: user message<br>Claim: User uses PostgreSQL<br>Evidence: explicit statement</pre><p>is different from:</p><pre>Source: conversation history<br>Claim: User prefers PostgreSQL<br>Evidence: model inference from repeated database questions</pre><p>A model can be highly confident in the second conclusion while still having weaker evidence for it. If a user explicitly says “I use PostgreSQL,” the evidence for that claim is direct. If the system notices several PostgreSQL questions and concludes “User prefers PostgreSQL,” that claim is inferred. I would want the gatekeeper, and any downstream consumer of the memory, to know that difference.</p><h4>Conflict</h4><p>Persistent memory eventually encounters corrections.</p><p>Suppose the store contains:</p><pre>database_preference = MySQL</pre><p>and the user later says:</p><pre>&quot;Actually, I use PostgreSQL now.&quot;</pre><p>A naive append-only store can leave both statements active and force retrieval or the model to resolve the contradiction later. I would rather handle that problem closer to the write path. The new candidate can be compared with active memories and classified as something that coexists, contradicts, or supersedes an earlier memory.</p><p>But contradiction detection also has to be scope-aware. These two statements are not necessarily inconsistent:</p><pre>&quot;Use PostgreSQL for Project A.&quot;<br>&quot;Use MySQL for Project B.&quot;</pre><p>Neither are these:</p><pre>&quot;I generally prefer PostgreSQL.&quot;<br>&quot;Use MySQL for this project.&quot;</pre><p>Two memories should only compete when they refer to compatible claims under compatible scopes.</p><p>Conceptually, the conflict path starts looking more like:</p><pre>candidate<br>    ↓<br>identify claim<br>    ↓<br>resolve scope<br>    ↓<br>find related active memories<br>    ↓<br>coexist / contradict / supersede</pre><h4>Scope</h4><p>A statement can be correct and still become harmful if it is applied too broadly. “Use PostgreSQL for this project” does not mean “User prefers PostgreSQL for everything.”</p><p>Task, project, user, and organization-level memories have different scopes, and the write path needs to preserve that boundary because retrieval may happen much later, when the conversation that originally established the context is gone.</p><h3>The useful tests are the ambiguous ones</h3><p>The obvious cases are easy. The more interesting scenarios are ones where the admission decision, not the extraction, is what separates good behavior from bad.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/697/1*1tZI7BWDLK2xk1zfOcLIIA.png" /></figure><p>These are all plausible extraction results. What separates them is the admission decision.</p><h3>What the experiment showed</h3><p>I ran the naive and gated pipelines against 24 synthetic conversation scenarios.</p><p>Both pipelines used the same extraction model and the same retrieval logic. The only variable I changed was what happened after extraction.</p><p>Conceptually:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*yoEc-DTSwDyDD73ICJthvA.png" /></figure><p>Each event goes through candidate extraction, then equivalent candidates are evaluated through the two persistence policies.</p><p>I also use one shared LLM semantic judgment for each unique extracted statement to map it onto a stable ground-truth claim ID. Once that mapping is complete, the metric calculations are deterministic. That semantic mapping is still model-based, so this is not a fully deterministic benchmark, but sharing the same judgment across both pipelines keeps it from becoming another variable in the comparison.</p><p>On this deliberately small synthetic test set, the results were:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/681/1*OiEa2gxRjhvstJVxlfxJvw.png" /></figure><p>I would not treat the 100% values as general performance claims. This is a small synthetic scenario set designed to exercise specific failure modes, and the repository contains the scenario definitions, metric calculations, and per-run results behind the percentages.</p><p>The precision improvement was the whole point of the gate, so that result was not interesting by itself. The useful retrieval number was. I expected the gate to keep bad memories out of the store and leave retrieval mostly unchanged, but that is not what happened.</p><p>In the naive pipeline, stale and contradictory entries were taking up space in the top-k retrieval window. Useful memories that should have surfaced were getting crowded out by noise. Once the gate started filtering before persistence, retrieval quality improved without any changes to the retrieval logic itself. The store was just cleaner.</p><p>Contradiction detection hit 100% on this scenario set, but the scenarios were designed to include clean corrections like “Actually, I use PostgreSQL now.” In real conversations, users change preferences without announcing the change, and scope is rarely stated that clearly. I would expect that number to drop.</p><p>The full experiment code, scenario definitions, and per-run metrics are in the <a href="https://github.com/mariyamayoob/memory-gatekeeper">memory-gatekeeper</a> repository.</p><p>Good extraction and good retrieval are not enough on their own. If the write path lets bad state accumulate, retrieval quality degrades even when the retrieval logic is correct.</p><h3>Memory has a lifecycle</h3><p>Once memory persists, it starts to inherit many of the lifecycle problems we already know from long-lived application data, along with a few model-specific ones. Where did it come from? Does it still apply? Has something newer replaced it? Can I trace it back to the interaction that created it? These are not new questions if you have worked with application state, but most agent memory implementations treat them as somebody else’s problem.</p><pre>event<br>  ↓<br>extract<br>  ↓<br>candidate<br>  ↓<br>validate<br>  ↓<br>persist<br>  ↓<br>retrieve<br>  ↓<br>use<br>  ↓<br>correct / expire / supersede</pre><p>Persistent memory also turns some model errors into data-quality problems. The model can make an error while extracting a candidate, and the admission layer can make a separate error when deciding to store it. Once persisted, that error becomes part of the data supplied to future model calls. Once persisted, that error becomes part of the data supplied to future model calls, so a mistake that would normally disappear with one interaction can continue influencing later ones.</p><h3>The gatekeeper is only one boundary</h3><p>The gatekeeper only controls the write path. A correct memory can still be retrieved for the wrong task, or combined with another valid memory to produce a misleading context. A retrieval system can select the wrong scope. An agent can draw the wrong conclusion from completely accurate memories.</p><p>Retrieval, context selection, contradiction resolution, forgetting, and downstream reasoning all need their own controls. I separated them deliberately, because bundling everything into one memory-quality subsystem makes failures nearly impossible to isolate.</p><h3>What I would carry into production</h3><p>The first thing I would keep is provenance and lifecycle metadata alongside the memory itself:</p><pre>{<br>  &quot;content&quot;: &quot;User prefers PostgreSQL&quot;,<br>  &quot;type&quot;: &quot;semantic&quot;,<br>  &quot;source&quot;: &quot;explicit_user_statement&quot;,<br>  &quot;evidence_strength&quot;: &quot;explicit&quot;,<br>  &quot;scope&quot;: &quot;user&quot;,<br>  &quot;status&quot;: &quot;active&quot;,<br>  &quot;created_at&quot;: &quot;...&quot;,<br>  &quot;expires_at&quot;: null,<br>  &quot;supersedes&quot;: &quot;memory_123&quot;,<br>  &quot;evidence_id&quot;: &quot;turn_456&quot;<br>}</pre><p>I would keep evidence_strength as a category rather than a numeric confidence score. A number like 0.94 looks precise but does not tell me why the memory should be trusted. Knowing that a memory came from an explicit user statement versus a model inference from conversation patterns is more actionable for the admission policy, and for anyone debugging retrieval issues later.</p><p>I would also set different write thresholds for different memory types. Episodic records of what happened during an agent run can be appended fairly freely. Updating a semantic fact about a user should require stronger evidence. Promoting an observation into a procedural rule would usually need the strongest admission policy, because a bad procedural memory can change how the agent behaves across many future interactions rather than affecting one retrieval. It changes how the agent behaves across many future interactions.</p><p>Memory admission should not be a single global threshold. The policy should depend on what is being written, where it came from, how long it should live, and what future behavior it can influence.</p><p>The architectural boundary I would carry forward is the one between what an agent observed and what the system is willing to preserve as durable state.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ad2a967b7bb" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/why-agent-memory-needs-an-admission-policy-5ad2a967b7bb">Why Agent Memory Needs an Admission Policy</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Discretion Engineering: Deciding What Your AI Agent Is Allowed to Decide]]></title>
            <link>https://pub.towardsai.net/discretion-engineering-deciding-what-your-ai-agent-is-allowed-to-decide-7d082e150137?source=rss-6f3421f81a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d082e150137</guid>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[agentic-ai-architecture]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Mariyam Ayoob]]></dc:creator>
            <pubDate>Sun, 16 Aug 2026 18:01:01 GMT</pubDate>
            <atom:updated>2026-10-29T02:40:01.213Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Hand-drawn infographic showing an AI agent navigating a road with areas for model judgment, policy checkpoints, recovery, and safe completion. The road metaphor illustrates where an agent can improvise and where deterministic controls such as authorization, retry policy, and state checks constrain its actions." src="https://cdn-images-1.medium.com/max/1024/1*ZhHPBex4uGkdjenK-xFjdg.png" /><figcaption>Discretion engineering. Source: author-generated using OpenAI image generation.</figcaption></figure><h4>Prompt, context, harness, loop, and graph engineering all move one boundary: what the model decides versus what deterministic code does. A practitioner’s framework.</h4><p>Every six months, the AI industry invents a new name for building with language models. First we had prompt engineering. Then came context engineering, graph engineering, loop engineering, and most recently, harness engineering. Each wave arrives with its own frameworks, diagrams, and arguments about why the previous wave missed the point.</p><p>Beneath the changing vocabulary, teams are usually fighting the exact same battle: figuring out where to stop trusting the model and start writing regular code.</p><p>For a while, I treated prompt, context, harness, loop, and graph engineering as separate disciplines. The distinction became less useful once I asked what each one controls in a running system. They all move the boundary between model judgment and deterministic software, but at different points: prompts and context shape interpretation, tools define available actions, graphs constrain transitions, harnesses control execution, and guards determine whether a model decision can become a real action.</p><figure><img alt="Hand-drawn AI agent workflow mapping eight decision points to engineering mechanisms: interpretation to prompt and context, planning to prompt and graph, tool selection to tools and harness, authorization to guards, execution primarily to harness with graph and loop shaping timing and repetition, recovery to loop and harness, verification to evaluators, and termination to loop." src="https://cdn-images-1.medium.com/max/1024/1*YY3qDbzth-Ion3LCDxZtNw.png" /><figcaption>Prompt, context, tools, graphs, harnesses, guards, evaluators, and loops move different parts of the agent’s discretion boundary. Source: author-generated using OpenAI image generation.</figcaption></figure><p>I call the work of placing that boundary discretion engineering. The choice should start with the decision being made.</p><h3>Discretion is two dimensional, not one</h3><p>A single model-to-code slider is too simple. I place each decision on two axes: ambiguity, meaning how much interpretation it requires, and consequence, including blast radius, reversibility, external side effects, and recovery cost. Reformulating a vague query is highly ambiguous but usually low consequence. Checking whether a payment committed is low ambiguity and high consequence.</p><p>The second is consequence: what happens if the decision is wrong. I use consequence broadly, to include blast radius, reversibility, external side effects, and the cost of correcting a bad decision after it has executed. Picking a slightly worse retrieval path is cheap to be wrong about. Authorizing a payment that should not have happened is not.</p><figure><img alt="Hand-drawn 2x2 matrix mapping AI agent decisions by ambiguity and consequence. High-ambiguity, low-consequence decisions allow model discretion. High-ambiguity, high-consequence decisions require constrained discretion. Low-ambiguity, high-consequence decisions use deterministic control." src="https://cdn-images-1.medium.com/max/1024/1*52GdAOcRQ_HYxPn2qZi8Ow.png" /><figcaption>A practical way to place the discretion boundary: evaluate each decision by how much judgment it requires and what happens if it is wrong. Source: author-generated using OpenAI image generation.</figcaption></figure><p>Separate those two axes and the design rule falls out of them rather than out of taste:</p><ul><li>Low ambiguity, high consequence: keep it deterministic. No judgment to add, a lot to lose. Authorization lives here.</li><li>High ambiguity, low consequence: give it to the model. This is the flexibility you adopted a model to get. Interpretation lives here.</li><li>High ambiguity, high consequence: the model proposes, deterministic policy constrains what is permitted, and something independent verifies the result. Most of the hard decisions land here.</li><li>Low ambiguity, low consequence: use whichever is cheaper to build and maintain.</li></ul><p>You are no longer asking whether the model or the code should own a decision. You are asking how ambiguous it is and what it costs to get wrong, and the quadrant tells you the shape of the answer.</p><h3>The decisions where discretion actually lives</h3><p>Before choosing prompts, tools, or a graph, enumerate the decisions the system must make. In most agents, the recurring decision points are interpretation, planning, tool selection, authorization, execution, recovery, verification, and termination. The list can vary. The important part is placing each decision explicitly.</p><p>Interpretation usually needs model discretion because it is ambiguous and often low consequence. Planning is also ambiguous, but it inherits the risk of the actions it can trigger. A read-only research plan can allow broad discretion. A plan that can move money or change production infrastructure needs tighter constraints.</p><p>Authorization is different. In payment systems, whether an action is permitted, on whose behalf, and within what limits should be deterministic. The model may propose the action, but a guard it cannot bypass should decide whether it executes.</p><p>Execution controls such as idempotency, duplicate suppression, and retry policy also belong in the harness. If a timeout causes the same write to run twice, a better prompt will not fix it.</p><p>Verification and termination are the dangerous middle. Letting the model grade its own work and decide when to stop is where I see the most quiet failures: agents that loop too long, stop too early, or declare success on output a simple deterministic check would have rejected. I would rarely leave either fully to the model, and rarely fully automate them either, because both need some judgment about whether a result is good enough in context. In practice that is the high ambiguity, high consequence quadrant: model proposes, policy bounds, independent evaluator verifies.</p><h3>Recovery: one decision that contains the whole framework</h3><p>Recovery is where the framework becomes more useful, because a single decision can contain both model judgment and deterministic control. Fixed policies handle known failures well, but novel failures may require interpretation. The answer is not to give recovery entirely to the model. It is to decompose recovery into smaller decisions.</p><p>The mistake was treating recovery as a single decision. It decomposes:</p><pre>Failure detected<br>   -&gt; Classify the failure        (timeout, validation error, stale data,<br>                                    or semantic mismatch?)<br>   -&gt; Propose a recovery strategy  (reformulate the query? try a different<br>                                    retrieval path? change the requested item?)<br>   -&gt; Check the strategy is permitted   (can I retry this payment at all?)<br>   -&gt; Confirm current state        (was the previous write actually committed?)<br>   -&gt; Execute the recovery         (bounded, in the harness)<br>   -&gt; Verify the resulting state</pre><p>The model can classify the failure and propose a recovery. Deterministic policy decides whether that recovery is allowed, a state check confirms what already happened, and the harness executes within fixed limits.</p><p>A model label should never trigger a consequential retry by itself. If the model identifies a timeout, for example, the system must still verify whether the previous payment committed before trying again.</p><figure><img alt="Hand-drawn recovery workflow showing that agent recovery is split across different owners. A failure is detected, classified by the model, followed by a model-proposed recovery, policy constraints, deterministic state checks, controlled execution by the harness, independent verification, and a loop or graph decision about what happens next." src="https://cdn-images-1.medium.com/max/1024/1*jl_wqMYaOYZWZZdDAq6Zaw.png" /><figcaption>Judgment, policy, state checks, execution controls, verification, and loop logic each own a different part of the recovery path. Source: author-generated using OpenAI image generation.</figcaption></figure><p>Recovery is where I preserve the most model discretion, but only inside deterministic limits. My operating hypothesis is that reliability does not increase automatically with determinism: tighter control helps authorization and execution, while excessive rigidity can make recovery brittle.</p><p>I have not tested that claim in a controlled benchmark. A useful experiment would move the boundary across otherwise identical versions and measure wrong actions, failed recoveries, and unnecessary retries.</p><h3>Designing this way</h3><p>In practice, I start by listing the system’s decisions and rating each by ambiguity and consequence. That determines the control pattern: model discretion for interpretation, deterministic policy for authorization and execution, and a propose, constrain, verify pattern for high-ambiguity, high-consequence decisions. Recovery is decomposed and assigned step by step.</p><p>Only after placing those boundaries do I choose the prompts, context, tools, graphs, harnesses, guards, and evaluators needed to implement them.</p><p>The terminology will keep changing. The durable design question is which decisions benefit from model judgment, what can go wrong, and which controls should stand between a model decision and a real-world action.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d082e150137" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/discretion-engineering-deciding-what-your-ai-agent-is-allowed-to-decide-7d082e150137">Discretion Engineering: Deciding What Your AI Agent Is Allowed to Decide</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two Ways to Put AI on a Live Call, and Why the Difference Is Accountability]]></title>
            <link>https://aiadvances.org/two-ways-to-put-ai-on-a-live-call-and-why-the-difference-is-accountability-e91805568eb8?source=rss-6f3421f81a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/e91805568eb8</guid>
            <category><![CDATA[contact-center]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[agent-assist]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[ai-voice-agent]]></category>
            <dc:creator><![CDATA[Mariyam Ayoob]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 14:08:31 GMT</pubDate>
            <atom:updated>2026-10-29T04:16:48.801Z</atom:updated>
            <content:encoded><![CDATA[<h4>Agent assist and autonomous voice agents share a technical stack, but differ in who speaks to the customer and who is accountable for the output.</h4><p>Imagine an AI model misinterprets a policy during a live customer support call and decides the caller qualifies for a full fee waiver. If that model is running as an agent-assist tool, the suggestion flashes on a human representative’s screen. The representative glances at it, recognizes that the customer does not actually qualify, ignores the suggestion, and the mistake dies quietly on the monitor.</p><p>Now put that exact same model, using the same retrieval pipeline and the same prompt, directly on the voice line with the customer. Before anyone can intervene, the AI has already spoken the promise out loud on a recorded line.</p><p>On an architecture diagram, agent assist and autonomous voice agents look like cousins that share eighty percent of the same technical stack. In production, they live in completely different worlds, because the real boundary between them is not voice synthesis or latency. It is who holds accountability when the model is wrong.</p><p>Contact center AI usually refers to two different systems: autonomous voice agents that speak directly to customers and agent-assist systems that advise a human who remains on the call. They share many components, but their failure modes and design constraints differ because they place accountability in different places.</p><p>Neither is universally better, and many contact centers will use both. The important thing is to separate their design requirements before building or choosing between them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cF30w3irkctoevIk" /><figcaption>Photo by <a href="https://unsplash.com/@jontyson?utm_source=medium&amp;utm_medium=referral">Jon Tyson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The stack they share</h3><p>Both systems start from the same pipeline. Audio comes in as a stream and gets transcribed as the caller speaks. The transcript feeds some understanding step, intent and entities, usually running incrementally rather than waiting for a full sentence. A retrieval step pulls relevant material from a knowledge base, a CRM, and prior interaction history, typically a hybrid of vector search and keyword recall. A generation step produces something useful from the retrieved facts. And then the result has to surface somewhere, either as synthesized speech back to the caller or as text on a screen in front of an agent.</p><p>At that level, the pipelines look identical. Their assumptions diverge when you ask who holds the floor when the system produces an output.</p><h3>The real divide: who is accountable</h3><p>In an autonomous voice agent, the system holds the floor. It hears the caller, decides what to say, and says it. The whole call is the product, and when the agent gets something wrong, the wrong thing reaches the customer directly. There is no one between the model and the person on the line.</p><p>In agent assist, a human holds the floor. The AI listens to the same conversation and proposes something, a next best action, a knowledge snippet, a compliance reminder, but a person reads that suggestion and decides whether to use it. That person says the words, and that person is accountable for them. The model is a source of suggestions, not the voice of the company.</p><p>In agent assist, the human is not an approval step added after generation. Every suggestion passes through a person who can accept, ignore, or replace it, which changes what the system should optimize for.</p><figure><img alt="Infographic showing a shared AI call pipeline from audio and transcript through understanding, retrieval, and generation. The output then splits into a voice agent that speaks directly to the caller and agent assist that gives suggestions to a human, who decides what to say." src="https://cdn-images-1.medium.com/max/1024/1*RVx93IOIItv-sAaTiIs8rw.png" /><figcaption>Voice Agent vs Agent Assist. Source: author-generated using OpenAI image generation.</figcaption></figure><p>The designs sit on an autonomy spectrum. A voice agent removes the accountable human from the call in exchange for scale and consistency. Assist keeps that person on the call and gives the system a softer failure mode. Routine tasks such as appointment booking can justify more autonomy, while regulated interactions with costly errors often justify keeping a human in the loop.</p><h3>The voice agent side has two design axes, not one</h3><p>If AI speaks directly to the caller, two independent choices define the design: where text exists in the pipeline and how turn-taking works.</p><p><strong>Axis one: where text lives.</strong> A cascade runs streaming speech to text, then a language model, then text to speech, as three separate services. At every boundary you get a readable text artifact you can log, redact, and route, and the pitch is that you can swap any of the three components independently.</p><p>I tested that swappability in ElevenLabs. Changing the voice was a configuration change, but changing the language model was not: the prompts did not transfer cleanly, and performance degraded until they were retuned. The text artifacts were portable; the prompts producing them were not. I have written about this as a <a href="https://medium.com/gitconnected/the-prompt-portability-tax-nobody-budgets-for-aaad727bfaf9">portability tax</a>.</p><p>In production, I would run a small prompt regression set against every candidate model rather than treat model swapping as free.</p><p>On the same axis, native speech-to-speech models take audio in and produce audio out without an intermediate text stage. Vendors position them around lower latency and richer audio cues such as tone and laughter. The tradeoff is weaker auditability, less access to frontier text reasoning, and different cost behavior. Some systems add layers back to recover the transparency and cost control that cascades provide directly.</p><p>A middle option, the semi-cascade, accepts native audio, reasons in text, and returns speech. As of mid 2026, cascades still dominate production while speech-to-speech remains closer to the frontier.</p><p><strong>Axis two: turn taking.</strong> In half-duplex systems, the caller speaks, stops, and the system replies. In full-duplex systems, audio continues in both directions while the system repeatedly decides whether to speak, listen, pause, or act.</p><p>Many production systems are partially duplex: they support barge-in but otherwise take turns. The right design depends on the call, not on whether the most human-like option is technically available.</p><p>These choices combine independently: a full-duplex cascade and a half-duplex speech-to-speech system are both possible. Duplex determines who holds the floor and when; cascade design determines where text exists.</p><p>The engineering weight of full duplex lands almost entirely in the listening loop. Pure voice activity detection, the energy threshold approach, treats a listener saying “uh huh” as either silence or a full interruption, and neither is correct. The 2026 production stack is moving toward dedicated turn taking models that learn to distinguish a backchannel from a real barge in from a thinking pause, with Pipecat, LiveKit, and Vapi shipping the visible examples. Half duplex is easier to build and easier to test and tends to feel robotic. Full duplex feels human and is much harder to get right, which is a real tradeoff rather than a case of newer being better.</p><p>The clearest marker of where this is heading arrived in July 2026. OpenAI launched <a href="https://openai.com/index/introducing-gpt-live/">GPT-Live</a> as a full-duplex model that listens and speaks simultaneously, uses short backchannels, and delegates harder questions to a background reasoning model while the conversation continues. That pattern separates conversational tempo from reasoning depth and is likely to spread to other stacks.</p><p>The launch also showed the operational limits. API access was not available on day one, language support was limited, and early testing exposed tuning problems. <a href="https://simonwillison.net/2026/Jul/8/introducing-gptlive/">Simon Willison reported</a> that the model interrupted to laugh at comments that were not intended as jokes, behavior OpenAI later adjusted. Full duplex gains naturalness by taking on more tuning debt.</p><figure><img alt="Infographic mapping voice-agent architectures across two axes: turn-taking from half-duplex to full-duplex, and text placement from cascade to speech-to-speech. It compares four designs by latency, naturalness, observability, control, and auditability, with GPT-Live shown as a full-duplex speech-to-speech example." src="https://cdn-images-1.medium.com/max/1024/1*OwJuQlsMBlX1KU90L6QTiw.png" /><figcaption>Voice-agent design is shaped by two choices: where text lives and how turn-taking works. Source: author-generated using OpenAI image generation.</figcaption></figure><h3>What assist optimizes for instead</h3><p>Now put the human back on the call and watch how the same pipeline changes. This is the side I have spent the most time building, and the constraints feel different from the moment you start.</p><p><strong>The trigger.</strong> A voice agent has a natural point to act: the end of the caller’s turn. Assist lacks that clean boundary because it works against partial transcripts that may change while the human continues speaking.</p><p>A suggestion triggered by a half-heard phrase can become wrong after the transcript is revised, and the agent may already have started trusting it. In production, I would debounce aggressively and treat early suggestions as retractable, surfacing them only after the supporting transcript is stable enough.</p><p><strong>The bar for correctness.</strong> An agent may repeat a suggestion within seconds, leaving little time to verify it. A human only acts as a meaningful filter if they can judge the suggestion at a glance, so the interface should include both the source and the reason it fired.</p><p>Precision matters more than recall here. A small number of grounded, suppressible suggestions builds trust; speculative volume teaches agents to ignore the panel.</p><p><strong>What you measure.</strong> Voice-agent turn latency does not map cleanly to assist because the AI is not speaking and there is no single end-of-turn boundary. <a href="https://cresta.com/agent-assist">Cresta</a>, for example, advertises real-time coaching in under 200 milliseconds, but speed alone does not show whether an assist system is useful.</p><p>The stronger primary signal is acceptance rate: the share of suggestions the human uses. It combines latency, relevance, and trust, making it useful as an online evaluation metric rather than just a product statistic. Handle time and first-contact resolution are lagging outcomes, and they tend to improve only when acceptance is healthy.</p><p>There is a reason assist is getting funded even while voice agents get the headlines. <a href="https://www.cxtoday.com/wfo/gartner-connected-rep-strategy/">Gartner has predicted</a> that customer service functions deploying what it calls a Connected Rep strategy, agents doing high quality assisted service at scale, will improve contact center efficiency by 30 percent by 2026 without replacing anyone, and across 2026 industry surveys assist consistently lands as the second most funded customer service AI initiative behind voice agents. The pragmatic reasons line up with the accountability point. Assist does not replace anyone, which removes most of the change management friction, and it produces measurable gains in weeks rather than the long horizon of full automation.</p><h3>Choosing, and a tell worth noticing</h3><p>The choice follows the cost of a wrong decision. Routine, bounded calls can support more autonomy. Regulated or high-stakes interactions provide stronger reasons to keep an accountable human on the line.</p><p>OpenAI’s rollout illustrates the tension. After launching GPT-Live, it introduced <a href="https://openai.com/index/introducing-openai-presence/">Presence</a>, a customer-facing voice-agent platform that reportedly resolves about three-quarters of calls on OpenAI’s support line without a human. That figure is self-reported rather than independently audited.</p><p>On July 31, OpenAI added <a href="https://openai.com/index/introducing-gpt-live/">SynthID watermarking</a> and an audio verification tool. The two moves belong together. As synthesized speech becomes harder to distinguish from a person and the accountable human leaves the call, the system needs other ways to establish provenance and traceability. Moving toward greater autonomy also means deciding how those missing accountability signals will be restored.</p><h3>Limits of this piece</h3><p>This is architecture reasoning grounded in one hands-on test, not a benchmarked comparison. The ElevenLabs portability finding is mine, while the assist analysis draws on production experience described qualitatively. External figures are linked, but some are vendor-reported, including OpenAI’s 75 percent resolution claim.</p><p>Product names, availability, and latency figures are current as of early August 2026 and will change. Architectural decisions should rest on the more durable questions: where text lives, who holds the floor, and who is accountable for the output.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e91805568eb8" width="1" height="1" alt=""><hr><p><a href="https://aiadvances.org/two-ways-to-put-ai-on-a-live-call-and-why-the-difference-is-accountability-e91805568eb8">Two Ways to Put AI on a Live Call, and Why the Difference Is Accountability</a> was originally published in <a href="https://aiadvances.org/">AI Advances</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Your Fallback Chain Is a Model Router You Never Tested]]></title>
            <link>https://levelup.gitconnected.com/your-fallback-chain-is-a-model-router-you-never-tested-a4c6273894f3?source=rss-6f3421f81a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4c6273894f3</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[aiops]]></category>
            <category><![CDATA[software-architecture]]></category>
            <category><![CDATA[model-routing]]></category>
            <category><![CDATA[llm]]></category>
            <dc:creator><![CDATA[Mariyam Ayoob]]></dc:creator>
            <pubDate>Wed, 29 Jul 2026 19:39:53 GMT</pubDate>
            <atom:updated>2026-10-29T02:51:23.949Z</atom:updated>
            <content:encoded><![CDATA[<h4>What mid-conversation failover does to cache economics, prompt behavior, tool contracts, and auditability.</h4><p>Imagine an AI agent twelve turns deep into resolving a customer issue. It has built up a warm prompt cache, called three tools, established the user’s state, and is following a system prompt carefully tuned over months of production traffic. Then the model provider hits a brief capacity spike and returns a 429 error.</p><p>Rather than failing the request, your API gateway does what it was configured to do: it silently routes turn thirteen to a backup model from another provider. From an uptime dashboard, the failover worked. Underneath, the prompt cache just evaporated, your system instructions landed on a model that interprets them differently, and the new model is now trying to finish a plan authored by a completely different model.</p><p>We rarely think of failover as model routing, yet that is what it becomes in production. Most recent LLM routing work starts from the premise that much of your traffic does not need a frontier model. <a href="https://arxiv.org/abs/2406.18665">RouteLLM</a> provides one of the clearest results, reporting more than 85 percent cost reduction on MT-Bench while retaining 95 percent of GPT-4 performance.</p><p>Routing researches treat each request as a stateless decision: a request arrives, a classifier selects a model, and the model returns an answer. Production conversations may instead carry a system prompt, tool definitions, twenty or forty turns of history, tool calls, observations, and assumptions established earlier in the session.</p><p>The usual recommendation is episode-level routing: choose a model at the start of the task and keep it fixed. <a href="https://arxiv.org/abs/2409.19886">RouterDC</a>, <a href="https://arxiv.org/abs/2410.02223">EmbedLLM</a>, and <a href="https://arxiv.org/abs/2508.12631">AvengersPro</a> follow that pattern.</p><p>Turn-level routing also exists, but it can go wrong. When <a href="https://arxiv.org/abs/2604.23530">MTRouter</a> evaluated OpenRouter’s automatic routing on ScienceWorld, the router scored below every model in its candidate pool after classifying the plain-text task as easy and sending 68 percent of calls to Mistral-Nemo.</p><p>Most teams are not deliberately switching models halfway through a conversation, but their fallback chain may still do exactly that.</p><figure><img alt="A model router branches one query into multiple connector paths, each representing a model with different quality, cost, latency, and reliability outcomes." src="https://cdn-images-1.medium.com/max/1024/1*WbfvC-qbIv1nn7jW8mCeTw.png" /><figcaption>One request, multiple model paths, and different operational tradeoffs. Source: author-generated using OpenAI image generation.</figcaption></figure><h4>The switch nobody chose</h4><p>A fallback chain is usually added after the first serious provider incident. A common configuration uses one model as the primary, a second as the first fallback, and another provider for redundancy. A 429, 529, timeout, authentication error, or failed health check triggers the switch.</p><p>On turn one, that may be a reasonable substitution. On turn twelve, the fallback inherits a warm prefix cache, a system prompt tuned against another model, and eleven turns of history it did not generate.</p><p>Hermes Agent documents an important part of this behavior: caches are tied to the model and account. A model switch, provider fallback, or credential-pool rotation can force the next turn to reprocess the conversation at the undiscounted input rate.</p><p>Failover also tends to happen under the worst conditions. It fires during provider degradation, peak load, or an incident, often on the longest and most stateful conversations. The mechanism is intentionally quiet, so the application may continue returning 200 responses while cost, quality, and behavior have changed underneath it.</p><p>Four things change at the switch.</p><h4>1. The cache dies, and the write premium may already be sunk</h4><p>The largest reusable block in a stateful request is usually the prefix: system prompt, tool schemas, guardrails, and few-shot examples. That block may remain nearly identical from turn one through turn forty.</p><p>Anthropic’s published pricing has placed a cache read at 10 percent of standard input cost and a five-minute cache write at 1.25 times standard input. Under that pricing, the write begins paying back after the first read.</p><p>The problem is that the cache is scoped to a model version. Switching models, and sometimes changing versions within the same family, invalidates the prefix. A failover on turn twelve can force the new model to process the entire trajectory cold, then write another cache that may only be reused for one or two turns.</p><p>This creates an especially bad case when failover happens immediately after a cache write. The write premium has been paid, but none of the discounted reads are collected. If the provider flaps and the gateway switches repeatedly, the system can pay that cost several times inside one conversation.</p><p>Sticky routing helps with ordinary load balancing, but it does not fully solve this. Session pins usually yield when the selected provider fails a request or health check. That is precisely when the cache loss becomes most expensive.</p><p>The operational distinction matters:</p><ul><li>Another deployment of the same model usually loses the cache but preserves more prompt and output behavior.</li><li>A different model version may lose the cache and introduce behavioral drift.</li><li>A different model family can change the cache, prompt response, tool-call format, and refusal behavior at once.</li></ul><p>The resolved fallback target should therefore be visible in traces, not hidden inside gateway internals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jEg55JNPa5vSFQkhCTphnw.png" /><figcaption>Same decision, half the scrutiny. Source: author-generated using OpenAI image generation.</figcaption></figure><h4>2. The system prompt lands on a model it was never tested against</h4><p>A system prompt becomes model-specific through use, even when it was written as if it were portable. The team iterates against one model, keeps the wording that works, and gradually turns observed behavior into an assumed contract.</p><p><a href="https://arxiv.org/abs/2512.01420">PromptBridge</a> describes this as model drift and measures the effect. On HumanEval, the paper reports that a prompt optimized for GPT-5 scored 99.39 percent on that model but 68.70 percent when transferred unchanged to Llama-3.1–70B-Instruct. The same Llama model reached 79.47 percent with its own optimized prompt. That is roughly an eleven-point loss from prompt-model mismatch alone.</p><p>The transfer was also asymmetric. Moving the other direction caused a much smaller loss. That asymmetry matters because a fallback chain is usually directional. The second model is selected for availability, price, provider diversity, or unused capacity, not because its prompt behavior was proven equivalent.</p><p>The effect also appears within model families. PromptBridge reports large relative losses when prompts are transferred from larger Llama and Qwen variants to smaller siblings on xCodeEval. Using a smaller model from the same family may look conservative, but family membership does not guarantee prompt portability.</p><p>Several ordinary differences cause this:</p><ul><li>Instruction-following strictness varies across models.</li><li>Role and message conventions differ.</li><li>Tool-call formats and argument behavior differ.</li><li>Tokenizers change how long prompts are interpreted.</li><li>Refusal boundaries and safety tuning vary.</li><li>Providers may wrap similar models with different tool or schema interfaces.</li></ul><p>A prompt constraint is not an invariant because it appears in the system message. It is an empirical property until the fallback model passes the same evals.</p><h4>3. The history was authored by another model</h4><p>The fallback model does not start from a neutral transcript. It inherits reasoning, tool calls, observations, and response patterns produced by the primary, including intermediate decisions it may not have made itself.</p><p>Most agent loops assume this continuity without testing it. Because the request remains valid and the provider returns a successful response, incompatibility usually appears as degraded behavior rather than an exception.</p><p>MTRouter’s error taxonomy for tool-using agents includes the kinds of failures I would expect here: invalid structure, missing arguments, parse failures, unsupported tools, and calls that do not satisfy the expected contract.</p><p>The risk increases when application state is inferred from conversation text instead of stored explicitly. If the current plan, approval state, or tool result only exists in prior assistant messages, the fallback model must reconstruct it from another model’s narrative.</p><p>For long or high-risk workflows, I would compare two failover strategies:</p><ol><li>Continue the existing transcript with the fallback model.</li><li>Start a new model-specific session using a structured state summary, validated tool state, and the minimum required history.</li></ol><p>The second option gives up conversational continuity, but it can be easier to test and audit. The important point is to make the choice deliberately rather than allowing the gateway to decide through a retry loop.</p><h4>4. Your evals probably never covered the fallback path</h4><p>Most teams run their release suite against the primary model and stop there. The fallback chain is often added later as an infrastructure control, without being treated as another behavioral execution path. As a result, the component intended to operate during failure becomes the least-tested path in the system.</p><p>In regulated systems, this also becomes an evidence problem. The configuration may name the intended model, while the actual model for a specific turn is selected several layers lower by gateway or retry logic. Six months later, the audit record may show the configured primary but not the model that produced the action.</p><p>A resilience feature should not create uncertainty about authorship. At minimum, the trace and audit record should contain:</p><ul><li>Resolved provider, model, and model version per turn</li><li>Fallback reason and retry attempt</li><li>Cache-write and cache-read token counts</li><li>Prompt and tool-schema version</li><li>Output-schema validation result</li><li>Tool calls and normalized arguments</li><li>Whether the conversation continued or restarted after the switch</li></ul><p>Without this, failover can become a hidden model change with no evidence attached.</p><h4>The research result that changed how I think about switching</h4><p><a href="https://aclanthology.org/2026.acl-long.2045/">MTRouter</a>, from Northeastern University and Shanghai AI Lab, treats model switching as a measured variable rather than a routing detail. Across a six-model pool, it increased the ScienceWorld score from 48.4 with GPT-5 to 53.8 while reducing cost by 58.7 percent.</p><p>MTRouter used roughly five switches per episode, compared with about twenty for the Router-R1 baseline, and scored 11.7 points higher. After an error, it stayed with the same model about 90 percent of the time on ScienceWorld and 81 percent on HLE, compared with 38 percent and 66 percent for Router-R1. It also had a higher probability of recovering on the next turn.</p><p>The result does not mean an infrastructure failure should be ignored. A 429 can make the current endpoint unavailable, so staying on that endpoint may not be possible. The useful conclusion is narrower: switching is not behaviorally neutral, and reflexive escalation can make recovery worse.</p><p>The paper also identifies cache degradation from frequent switching but does not include cache-token accounting in its cost model. Cost is calculated from list price and token counts. That leaves the production question unresolved: how much does switching cost once cache writes, misses, and reprocessed conversation prefixes are included?</p><h4>How I would design the fallback chain</h4><p>I would treat model failover as a declared degraded mode rather than a transparent substitution.</p><p>The chain would be ordered by compatibility before raw price:</p><ol><li>Another endpoint or region serving the same model and version</li><li>The same model through a compatible provider interface, when available</li><li>A separately validated model with matching tool and schema behavior</li><li>A controlled restart using summarized, structured state</li><li>A user-visible failure when the workflow cannot be continued safely</li></ol><p>The first option still loses endpoint-local cache state in many implementations, but it generally preserves more behavioral compatibility than switching model families. Provider wrappers can still change tool semantics, so this path also needs testing.</p><p>For every model allowed into the chain, I would run the same prompt, tool, refusal, schema, and task evals used for the primary. I would also test the transition itself, because a fallback model that works from turn one may still fail when it inherits another model’s history at turn twelve.</p><p>For stateful conversations, I would set an explicit policy:</p><ul><li>Continue in place for low-risk conversational tasks.</li><li>Restart from validated structured state for long or tool-heavy workflows.</li><li>Stop and surface a degraded-mode error when the fallback cannot satisfy the same action contract.</li></ul><h4>What I would instrument first</h4><p><strong>Resolved model per turn </strong>Store the provider, model, version, and deployment for every turn. Session-level configuration is not enough.</p><p><strong>Cache economics per turn </strong>Capture cache-write tokens, cache-read tokens, ordinary input tokens, and failover-induced misses. A provider incident should appear as a cost event as well as an availability event.</p><p><strong>Fallbacks per conversation </strong>Daily fallback counts hide flapping. One conversation that switches twenty times is operationally different from twenty conversations that switch once.</p><p><strong>Effective incident cost </strong>Include repeated prefix processing and unreused cache writes. List price multiplied by token count does not show the full cost of a stateful failover.</p><p><strong>Evals for every eligible model </strong>Fail the build when an untested model or version enters the chain.</p><p><strong>Forced mid-conversation failover </strong>Inject a 429 or timeout at turn N and verify:</p><p>- Output schema remains valid<br>- Tool names and arguments remain correct<br>- Refusal behavior stays within policy<br>- State is not lost or duplicated<br>- Audit records show the actual model transition<br>- Cache loss is visible in telemetry</p><p>This is the regression test that matches the failure mode.</p><h4>Limitations</h4><p>MTRouter is one paper evaluated on two academic benchmarks with bounded interaction horizons. Its error taxonomy includes infrastructure errors, but most of its analysis concerns model behavior, so the recovery result does not map directly to every provider outage.</p><p>PromptBridge reports results from coding and agent benchmarks. The size of the transfer loss should be treated as indicative rather than universal.</p><p>Cache pricing, TTLs, and routing behavior vary by provider and can change. The specific multipliers are examples of the mechanism, not permanent constants.</p><p>I have not measured the combined cache and quality impact of model failover at production scale. The evidence here comes from provider behavior, pricing documentation, and research showing that switching affects recovery. What is still missing is production telemetry connecting fallback activation, cache loss, and task quality. Before-and-after data from a real provider incident would be especially useful.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4c6273894f3" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/your-fallback-chain-is-a-model-router-you-never-tested-a4c6273894f3">Your Fallback Chain Is a Model Router You Never Tested</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Amex, Mastercard, and Visa Reveal About the Control Layer for AI Agents]]></title>
            <link>https://generativeai.pub/what-amex-mastercard-and-visa-reveal-about-the-control-layer-for-ai-agents-399f74893035?source=rss-6f3421f81a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/399f74893035</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[payment-systems]]></category>
            <category><![CDATA[agentic-payment]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[agentic-commerce]]></category>
            <dc:creator><![CDATA[Mariyam Ayoob]]></dc:creator>
            <pubDate>Tue, 14 Jul 2026 14:08:52 GMT</pubDate>
            <atom:updated>2026-10-29T02:10:27.124Z</atom:updated>
            <content:encoded><![CDATA[<h4>Agentic commerce will depend on proving user intent, constraining delegated authority, and preserving evidence when transactions are disputed.</h4><figure><img alt="A newspaper-style illustration of a robotic hand presenting a secure digital wallet, connected to Amex, Mastercard, and Visa payment cards. Surrounding icons represent authorization, identity verification, fraud controls, and an evidence trail for disputed agentic transactions." src="https://cdn-images-1.medium.com/max/1024/1*WpzMCS4HO8FPQM1qeovFJA.png" /><figcaption>Agentic commerce: autonomous agents with wallets, payment credentials, and new trust requirements. Source: author-generated using OpenAI image generation.</figcaption></figure><p>If someone steals your credit card and buys a two-thousand-dollar flight to Tokyo, decades of banking law and network rules say what happens next. You dispute the charge, the transaction is recognized as unauthorized, and you get your money back.</p><p>Now suppose you give your own AI assistant permission to book a trip to Tokyo, and it misreads your calendar, books non-refundable tickets for the wrong week, and checks out using your valid credentials. Nothing was stolen. You authorized the agent, and the merchant delivered the ticket. Yet the purchase is completely wrong.</p><p>I spent years building in regulated payment environments before moving into agentic AI, and one thing that environment drills into you is that the interesting question in payments is rarely whether the transaction executes. It almost always executes. The interesting question is who eats the loss when it executes wrong, which is why every payment system I worked on had more code dedicated to disputes, reversals, reconciliation, and exception handling than to the happy path.</p><p>So when three announcements landed over the past three months, I read them as risk news, and specifically as three different answers to the same underlying problem: when a software agent transacts on someone’s behalf and something fails, what evidence exists to decide who absorbs the loss?</p><p>Here is the sequence:</p><ul><li><strong>April 14, 2026:</strong> American Express launched its <a href="https://www.americanexpress.com/en-us/newsroom/articles/innovation/american-express-debuts-agentic-commerce-experiences--ace--devel.html">Agentic Commerce Experiences (ACE) Developer Kit</a> and announced a forthcoming commitment called Agent Purchase Protection. In Amex’s own words, <a href="https://www.pymnts.com/artificial-intelligence-2/2026/american-express-to-back-purchases-made-by-customers-ai-agents/">in the future, if a Card Member authorizes a registered AI agent and that agent sends Amex the customer’s authenticated purchase intent, Amex will protect eligible customers from charges related to agent error</a>, for eligible charges on U.S. credit cards issued by American Express and subject to terms that <a href="https://www.paymentsdive.com/news/amex-pushes-for-agentic-standards/818782/">it has been careful to flag</a>.</li><li><strong>June 10, 2026:</strong> Mastercard launched <a href="https://www.mastercard.com/us/en/news-and-trends/press/2026/june/mastercard-launches-agent-pay-for-machines.html">Agent Pay for Machines (AP4M)</a>, a platform for machine-driven and agent-to-agent payments with credentialing, programmable spend limits, and a <a href="https://www.mastercard.com/us/en/business/artificial-intelligence/mastercard-agent-pay/agent-pay-for-machines.html">Mastercard-backed settlement guarantee</a> across cards, bank accounts, and stablecoins, launching with <a href="https://www.coindesk.com/business/2026/06/10/mastercard-prepares-for-a-future-where-ai-agents-make-payments-with-latest-introduction">more than 30 partners including Stripe, Adyen, and Coinbase</a>.</li><li><strong>July 2, 2026:</strong> Visa announced that AI agents are <a href="https://www.visa.co.uk/about-visa/newsroom/press-releases.3457328.html">completing live purchases at independent merchant websites across Europe</a>, enabled by its <a href="https://developer.visa.com/capabilities/trusted-agent-protocol">Trusted Agent Protocol (TAP)</a> and Agent Directory, with Cloudflare and Akamai embedding agent verification into merchant infrastructure.</li></ul><p>It is worth being precise about what each of these actually is, because they are not three versions of the same product.</p><ul><li>Amex is defining what counts as an eligible agent error for customer protection.</li><li>Mastercard is assuring settlement for machine payments, which is a different risk category from consumer purchase protection.</li><li>Visa is building the identity and authorization layer that lets merchants decide which agents to admit in the first place, and its announcement says nothing about Visa absorbing customer losses when an agent makes a mistake.</li></ul><p>What connects them is not a shared coverage model but a shared premise: transacting agents will need credentials, controls, and evidence that can map a failure to a responsible party.</p><figure><img alt="timeline from April to July 2026 with three milestone cards, each labeled with its distinct mechanism. April 14, Amex: “ACE Developer Kit + forthcoming Agent Purchase Protection (eligible agent errors).” June 10, Mastercard: “AP4M (credentialing, spend limits, settlement guarantee).” July 2, Visa: “TAP + Agent Directory live in Europe (agent identity and merchant access).” Caption bar below: “Three networks, three failure modes, one shared premise: loss allocation requires verifiable evidence.”" src="https://cdn-images-1.medium.com/max/1024/1*hGRh0K7P1KzN2Uhu2lppzw.png" /><figcaption>Timeline. Source: author-generated using OpenAI image generation.</figcaption></figure><h3>Why the sequencing matters</h3><p>The conventional story is that liability rules in payments get written after the damage. Federal law created a formal billing-error framework for credit cards through the Fair Credit Billing Act of 1974, which amended the Truth in Lending Act. In 1978, the Electronic Fund Transfer Act established a parallel consumer-protection framework for electronic transfers, with Regulation E implementing it.</p><p>The 2015 EMV liability shift is often lumped into that story, but it actually belongs to a different one, and that difference is the point of this article. The EMV shift was not legislation. It was a card network rule change that reallocated fraud liability to whichever party had not adopted chip technology, and it reshaped terminal hardware, issuer roadmaps, and merchant budgets across the US without a statute ever being passed. Private payment network rules have shaped architecture and risk allocation before, ahead of regulators, and it worked.</p><p>Agentic commerce starts from a murkier baseline than “no rules exist.” Existing consumer protection regimes still apply depending on the rail and the facts: qualifying electronic fund transfers sit under EFTA and Regulation E, and credit card billing errors sit under TILA and Regulation Z. What does not exist yet is a settled, agent-specific allocation rule for the genuinely new case, where an authorized agent acts contrary to what the user actually instructed. <a href="https://thefinancialbrand.com/news/payments-trends/when-ai-agents-make-incorrect-purchases-whos-responsible-197147">The Financial Brand covered this gap in early May</a> and framed the Amex move as a partial answer to it. What I think that framing undersells is that the networks are not waiting for that rule to be written for them. They are shipping the definitions, credentials, and evidence formats that any future rule will have to reckon with, and the EMV precedent suggests those private rules can harden into the operating reality long before anyone legislates.</p><h3>A taxonomy before the strategy</h3><p>The mistake I made in my own first pass at this topic was treating “the agent failed” as one problem. It is at least four, and each of the three announcements maps onto a different one.</p><figure><img alt="Table classifying four agentic commerce failure types: delegation, authority, settlement, and fulfillment. Each row gives an example, such as buying the wrong SKU or a merchant failing to deliver, alongside the relevant control: Amex-style intent evidence, Visa TAP identity and spend limits, Mastercard settlement assurance, or existing consumer dispute processes." src="https://cdn-images-1.medium.com/max/1024/1*Z0sWWw5u1EW0yDsAHrSbxA.png" /></figure><p>Once you separate these, the more defensible version of this article’s thesis becomes visible. Agentic commerce is not converging on a single liability model, and pretending otherwise flattens real differences between what these companies shipped. What it is converging on is a requirement for evidence-conditioned loss allocation. Every one of these mechanisms works by demanding proof up front: proof of what authority the agent held, what constraints applied, what the user actually asked for, and what the agent actually did. The platforms competing to matter here are the ones building the machinery that can produce that proof at transaction time.</p><figure><img alt="Four cards: Delegation failure (wrong item, wrong price), Authority failure (spoofed or over-permissioned agent), Settlement failure (work done, payment stuck), Fulfillment failure (paid, never delivered). Each card lists the mechanism that addresses it (Amex intent evidence, Visa TAP identity, Mastercard settlement guarantee, existing dispute rails). Center or footer label: “Trust and loss allocation depend on verifiable evidence.”" src="https://cdn-images-1.medium.com/max/1024/1*3A-_OXvZdVUmMtwayneU3g.png" /><figcaption>Failure Taxonomy. Source: author-generated using OpenAI image generation.</figcaption></figure><h3>The fine print is where the architecture gets decided</h3><p>None of these commitments are unconditional, and the conditions are the part that will reach into your system design.</p><p>Amex’s protection applies only to registered agents integrated with ACE that transmit the cardholder’s authenticated purchase intent, and the <a href="https://www.americanexpress.com/en-us/company/agentic-commerce/">program’s eligibility is deliberately narrow</a>: subjective requests like “find me something really nice” may fall outside coverage, customers are expected to attempt a merchant return first where possible, and pieces of the specification, including agent registration and cart context, are still under development. Amex’s EVP of Global Innovation, Luke Gebb, has been explicit that the intent record is what Amex will use <a href="https://www.digitalcommerce360.com/2026/04/14/american-express-agentic-commerce-developer-kit-purchase-protection/">for authorization decisions and for adjudication when something goes wrong</a>.</p><p>Mastercard’s settlement guarantee applies to credentialed agents whose <a href="https://www.mastercard.com/us/en/business/artificial-intelligence/mastercard-agent-pay/agent-pay-for-machines.html">permissions and spending limits are defined upfront</a> and whose identity flows through its Verifiable Intent system, combining network-issued credentials with off-chain cryptographic verification for machine-speed transactions.</p><p>Visa’s model routes merchant trust through the <a href="https://github.com/visa/trusted-agent-protocol">TAP specification</a>: request-context-bound, time-limited, nonce-protected HTTP message signatures that let a merchant verify agent identity and detect tampering or replay attempts, with trust anchored in Visa’s Agent Directory and the associated TAP verification process, and with validation increasingly handled at the edge by Cloudflare and Akamai.</p><p>In each case, access to the assurance runs through the network’s definitions. Amex decides what an eligible error is and what valid intent evidence looks like. Mastercard decides what a properly credentialed and permissioned agent is. Visa decides which agents appear in its directory and what a valid signature contains. The operational criteria for proving authority, validating intent, and determining whether a transaction is trusted are being encoded upstream into developer kits and protocol specifications. Traditional dispute processes will still exist, but the evidence available to those processes will increasingly be shaped before the transaction executes.</p><h3>Where this concentrates power, stated carefully</h3><p>I want to make the strategic claim here without overrunning the evidence, because the evidence is three months old.</p><p>The party that conditions protection on its own evidence requirements accumulates a few durable advantages. It controls admission: Visa operates an Agent Directory today, Amex is building a registered-agent model, and Mastercard issues network credentials with a shared discovery layer, and if merchant infrastructure providers like Cloudflare and Akamai make those credentials the default filter for agent traffic, losing trusted status could become commercially consequential for an agent platform. It controls the definition of failure: when Amex adjudicates an agent-error claim, it interprets an intent record its own kit captured, against criteria it wrote. And in closed-loop or heavily instrumented flows, the accumulated record of authenticated intent versus actual execution could become a genuinely valuable risk-data asset, though how valuable depends on privacy law, contractual limits, and how much of the raw intent the network actually sees.</p><p>The historical analogy is closer to Lloyd’s Register than to Lloyd’s of London itself. Lloyd’s Register gave underwriters and merchants a shared way to assess vessel condition, and its classification rules later influenced ship construction standards. The parallel is imperfect, but useful: the party that makes risk legible can gain influence over the technical standards producers adopt. The parties offering agent-error protection and settlement assurance are positioned to play a version of that role, and the EMV experience shows that in payments specifically, network-written rules have redirected billions in infrastructure spend without waiting for a legislature.</p><h3>What this means if you are building agentic systems</h3><p>I architect agentic platforms for a living, and this shift changes several things I would treat as engineering requirements today rather than legal questions for later.</p><p><strong>Build the intent artifact as a first-class object, and do not confuse it with your logs.</strong> My first instinct was that the prompt and structured-output chains I already capture for observability would serve as the intent record. Working through the Amex model changed my mind. Raw prompts are ambiguous, privacy-sensitive, and painful to adjudicate, which makes them the wrong financial artifact even though they are the right debugging artifact. What a dispute needs is a constrained approval object the system generates at the moment of delegation, something like:</p><pre>intent_id<br>user_or_org_principal<br>agent_identity<br>merchant_or_allowed_merchant_set<br>product_or_category_constraints<br>currency_and_max_amount<br>quantity_and_price_tolerance<br>approval_method_and_timestamp<br>expiry<br>policy_version<br>outbound_execution_request_hash<br>payment_and_order_references</pre><p>That object should be durable, signed, and audit-reconstructible, and it must be non-replayable, because an intent record that can be reused as a live authorization is a vulnerability rather than evidence. Design the intent ledger before you design the checkout flow.</p><p><strong>Give every agent a verifiable identity with scoped authority.</strong> All three programs assume the agent itself holds a credential: ACE registration, Mastercard’s Verifiable Intent credentials, directory-verified signing keys under TAP. If your architecture treats agents as anonymous clients of your backend, you will retrofit identity under pressure later. This is the same workspace-scoped, ownership-based authorization work I have done on multi-tenant AI platforms, extended to non-human principals with explicit spend and permission bounds.</p><p><strong>Align your internal error taxonomy with the failure table above.</strong> A delegation failure, an authority failure, a settlement failure, and a fulfillment failure have different evidence requirements, different responsible parties, and under these new programs, very different cost profiles. If your incident classification cannot distinguish “agent contradicted signed intent” from “agent executed ambiguous intent plausibly,” you cannot predict which of your failures a network will cover.</p><p><strong>Do not flatten the protocols into one abstraction.</strong> ACE, TAP, AP4M, Google’s <a href="https://cloud.google.com/blog/products/ai-machine-learning/announcing-agents-to-payments-ap2-protocol">AP2</a>, and the <a href="https://docs.stripe.com/agentic-commerce/acp">Agentic Commerce Protocol</a> created by Stripe, OpenAI, and Meta all exist simultaneously, but they operate at different layers. TAP handles merchant-side trust and request integrity. ACE and AP2 handle intent, delegation, and approval evidence, with AP2 built around signed intent and cart mandates. ACP covers the commerce workflow itself, meaning catalog and cart interactions, checkout, fulfillment options, and delegated payment. AP4M handles payment execution and settlement, and MCP is tool integration rather than a payment protocol at all. My earlier instinct was to abstract all of this behind a single routing layer the way I abstract model providers, and I now think that is wrong, because a lowest-common-denominator wrapper erases exactly the evidence semantics that make each layer useful in a dispute. Build layered adapters instead: one for identity, one for intent and mandate evidence, one for commerce workflow, one for settlement, each preserving its protocol’s native evidence objects.</p><figure><img alt="“Agentic commerce readiness for architects” with five items and small icons: 1. Signed, audit-reconstructible, non-replayable intent artifact (separate from prompt logs). 2. Verifiable identity per agent instance. 3. Upfront permission and spend limits. 4. Error taxonomy aligned to the four failure modes (delegation, authority, settlement, fulfillment). 5. Layered adapters for identity, intent evidence, checkout, and settlement protocols." src="https://cdn-images-1.medium.com/max/844/1*5Ga2hcIl8iuQW5qqCcPwvg.png" /><figcaption><em>Builder’s checklist. </em>Source: author-generated using OpenAI image generation.</figcaption></figure><h3>The limits of this argument</h3><p>A few honest caveats, because this trend is young and the fine print is still moving.</p><p>Amex’s protection is a forthcoming commitment with narrow eligibility, not a live general program, and parts of its specification are still under development. None of these mechanisms has been stress-tested by a large-scale agent failure, and we have no public data on how adjudication behaves when an agent misinterprets ambiguous intent. In my experience running LLM systems in production, ambiguous intent is the dominant failure mode, far more common than clean wrong-item errors, and Amex’s apparent exclusion of subjective requests suggests the hardest cases may sit outside coverage entirely. Ambiguity disputes are where these frameworks will earn or lose credibility.</p><p>This is also, so far, a card network story concentrated in the US and Europe. Stablecoin-native agent payments follow different economics, and while Mastercard is hedging by supporting stablecoin settlement inside AP4M, an open agent payment ecosystem could still develop outside these verification regimes, particularly for machine-to-machine microtransactions where card economics do not work. I am skeptical that path wins for consumer retail, because dispute protection is precisely what consumers will demand from autonomous purchasing, but it is a real fork in the road.</p><p>And regulators will eventually engage. Whether they codify the deployed private evidence standards, override them, or layer new duties on top is an open question. What the EMV history suggests is only that deployed network rules tend to define the starting point of that conversation, not that they always win it.</p><h3>Closing thought</h3><p>If you lead engineering or AI strategy, the practical takeaway is that the evidence requirements for transacting agents are being set right now, in developer kits and protocol specifications, by the companies offering to stand behind agent transactions. That competition is probably good for adoption and good for consumers. It also means the record-keeping, identity, and authorization design of your agent platform is being shaped by loss-allocation logic whether you engage with it or not, and it is cheaper to engage now than after those requirements harden into the compliance baseline you get audited against.</p><p>If I were starting today, I wouldn’t study a single protocol. I’d study the stack. Read <a href="https://github.com/visa/trusted-agent-protocol">Visa TAP</a> for agent identity and merchant trust, <a href="https://www.americanexpress.com/en-us/company/agentic-commerce/">Amex ACE</a> for intent capture and dispute evidence, AP2 for signed delegation, ACP for commerce workflows, and Mastercard’s <a href="https://developer.mastercard.com/mastercard-checkout-solutions/documentation/use-cases/agent-pay/">Agent Pay documentation</a> for settlement. Together they describe the emerging control plane for agentic commerce far better than any one specification alone.</p><p><em>I build production agentic AI platforms in regulated enterprise environments, with a prior background in banking payment systems. Opinions are my own.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*tBi4CanquU7fY4w9.png" /></figure><p>This story is published on <a href="https://generativeai.pub/">Generative AI</a>. Connect with us on <a href="https://www.linkedin.com/company/generative-ai-publication">LinkedIn</a> and follow <a href="https://www.zeniteq.com/">Zeniteq</a> to stay in the loop with the latest AI stories.</p><p>Subscribe to our <a href="https://www.generativeaipub.com/">newsletter</a> and <a href="https://www.youtube.com/@generativeaipub">YouTube</a> channel to stay updated with the latest news and updates on generative AI. Let’s shape the future of AI together!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*R7SnLji-2Po_9Cx8.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=399f74893035" width="1" height="1" alt=""><hr><p><a href="https://generativeai.pub/what-amex-mastercard-and-visa-reveal-about-the-control-layer-for-ai-agents-399f74893035">What Amex, Mastercard, and Visa Reveal About the Control Layer for AI Agents</a> was originally published in <a href="https://generativeai.pub/">Generative AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MCP Goes Stateless on July 28. Is Your Audit Trail Still Intact?]]></title>
            <link>https://pub.towardsai.net/mcp-goes-stateless-on-july-28-is-your-audit-trail-still-intact-e1f9155469fb?source=rss-6f3421f81a51------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1f9155469fb</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[llmops]]></category>
            <category><![CDATA[model-context-protocol]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[observability]]></category>
            <dc:creator><![CDATA[Mariyam Ayoob]]></dc:creator>
            <pubDate>Mon, 06 Jul 2026 19:01:01 GMT</pubDate>
            <atom:updated>2026-10-29T04:16:07.444Z</atom:updated>
            <content:encoded><![CDATA[<h4><em>Stateless MCP does not remove a trustworthy audit identifier. It exposes that many teams never had one.</em></h4><figure><img alt="Left panel titled ‘Before: 2025 spec’: four log entries (lookup_account, confirm elicitation, initiate_transfer, result posted) connected by a single vertical colored thread labeled ‘Mcp-Session-Id’. Right panel titled ‘After: 2026–07–28 spec’: the same four log entries scattered with no connecting thread, thread shown severed, label ‘correlation removed from transport’." src="https://cdn-images-1.medium.com/max/1024/1*X66XTd-5jhrpQ-MtwyPXdg.png" /><figcaption>MCP -<em> Before: 2025 spec vs After: 2026–07–28 spec. </em>Source: author-generated using OpenAI image generation.</figcaption></figure><p>In traditional web services, no experienced engineer would mistake a temporary HTTP connection ID for a compliance audit trail. Yet in early Model Context Protocol (MCP) deployments, teams quietly did the equivalent: they relied on the protocol’s built-in Mcp-Session-Id to link tool calls back to a user run.</p><p>When the July 28 MCP specification moved to a stateless core and stripped session state out of the base protocol, it triggered a wave of concern about how to correlate agent actions. That concern points to a much deeper architectural gap. Stateless MCP does not break a working audit trail; it exposes that many agent stacks never designed one.</p><p>Imagine an internal security team asks you a simple question after a production incident: which human user triggered the agent that modified this customer record three weeks ago, and across which tool calls?</p><p>Many engineering teams assume their Model Context Protocol (MCP) logs can answer that question out of the box, simply because every tool call used to share a protocol session ID. When MCP moved to a stateless core in the July 28 specification, removing Mcp-Session-Id from the standard path, it caused a quiet panic about broken audit trails. In reality, stateless MCP did not destroy a trustworthy audit identifier; it just exposed that most teams never had one in the first place.</p><p>I have spent years building solutions in regulated environments across banking and financial services. That experience teaches you one thing quickly: when something goes wrong, the first question is never about latency or cost. It is some version of “reconstruct exactly what the system did on this account, in order, with proof.” Whatever lets you answer that question is your most valuable infrastructure, whether you designed it that way or not.</p><p>On July 28, the Model Context Protocol ships a release that a lot of teams will experience through that question. The <a href="https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/">2026–07–28 spec release</a>, locked as a release candidate on May 21 with <a href="https://blog.modelcontextprotocol.io/posts/sdk-betas-2026-07-28/">SDK betas available since June 29</a>, makes the protocol stateless. The initialize handshake is removed, the protocol-level session is removed, and the Mcp-Session-Id header goes with it. Every request becomes self-contained: protocol version and client info travel in _meta on each call, new Mcp-Method and Mcp-Name headers let gateways route without parsing bodies, and servers that need continuity mint explicit handles that the model passes back as ordinary arguments.</p><p>The migration checklists covering the breaking changes are everywhere. What I have not seen anyone write about is the evidence problem, so that is what this article covers: why session IDs ended up doing audit work they were never designed for, what actually breaks when they disappear, and the evidence model I would build instead. I will be upfront about scope: I have not migrated a production MCP fleet against this RC. This is a close read of the spec held up against how audit and dispute conversations actually go in banking and telecom, where I run distributed tracing and audit logging on production LLM platforms today.</p><h3>1. The thesis: stateless MCP exposes accidental audit dependencies</h3><p>Here is the claim the rest of the article defends. A session ID was never a durable audit model. It was an accidental join key, and stateless MCP forces teams to replace it with application-owned evidence identities. The teams in trouble on July 28 are not the ones losing a good audit trail. They are the ones discovering they were leaning on a transport convenience where a deliberately modeled identifier should have been.</p><p>That distinction matters because it changes what the migration work is. If you frame this as “the session is gone, propagate a trace ID instead,” you will rebuild the same fragile pattern one layer up. The real work is deciding, explicitly, what identifies a run, an action, and an approval in your system, and making those identifiers survive independently of whatever transport happens to carry them.</p><h3>2. Why sessions became accidental correlation keys</h3><p>Under the <a href="https://modelcontextprotocol.io/specification/2025-06-18/basic/transports">previous transport spec</a>, remote MCP over HTTP was stateful. Client and server performed an initialize handshake, the server could issue an Mcp-Session-Id, and subsequent requests carried that header. The session was a transport-scoped convenience: it let servers keep per-client state and let infrastructure route related requests to the same place.</p><p>In many deployments, that ID quietly became the correlation key for everything else. It was available on every request, free to log, easy to index, and often close enough to a logical agent run that teams treated it as one. Every log producer that touched a request had it without writing any code, which is exactly why it spread.</p><p>It is worth being precise about what the session never guaranteed, because this is where the audit story was always weaker than it looked. A session was not defined as one agent run. It could outlive a run, span multiple user interactions, be reused by a host, or be terminated by the server independently of anything your application considered a boundary. It carried no principal, no tenant, no business meaning. It was never designed to represent a transaction, a user approval, or a workflow. Teams that joined their dispute evidence on it were joining on an identifier whose lifecycle they did not control and whose semantics they had assumed rather than specified.</p><h3>3. What breaks when transport correlation disappears</h3><p>Concretely, an agent run in a banking deployment produces log lines like these, emitted by different services:</p><pre>14:02:11  tools/call  lookup_account(acct=**7841)      sess 1868a90c<br>14:02:13  elicitation &quot;Confirm transfer of $12,400?&quot;   sess 1868a90c<br>14:02:19  tools/call  initiate_transfer(...)           sess 1868a90c<br>14:02:20  result      transfer_id=TX-99120, posted     sess 1868a90c</pre><p>When the dispute team asks what happened before TX-99120 posted, the answer today is a filter on the last column. Remove it and load balance those four requests across arbitrary instances, which is precisely what the stateless design enables, and the events still exist but nothing ties the confirmation elicitation to the transfer that followed it. Reconstruction degrades to best-effort correlation on timestamps and payload contents. In an internal postmortem that is annoying. In front of a regulator, “we believe these events are related based on timing” is a sentence you do not want to say.</p><p>The blast radius is wider than raw logs. Inventory where session IDs appear in your SIEM queries, alerting rules, dashboards, support tooling, and dispute runbooks. Those artifacts break silently: the queries still run, they just stop returning complete answers, and nobody notices until the next investigation.</p><p>One honest caveat: this pattern is common, not universal. Teams that already correlate end to end on application-level identifiers will have a calm July 28. But every deployment I have seen that grew from an SDK quickstart inherited the session as its default join key, because it was simply there.</p><h3>4. The evidence model you need instead</h3><p>The replacement is not one identifier, it is a small set of identities with different jobs. Collapsing them into a single ID is how the session problem happened in the first place.</p><figure><img alt="Two-column table listing five evidence identities and their purposes: run_id for the logical agent workflow, operation_id for a business action, trace_id for technical correlation, audit_event_id for immutable evidence, and handle_id for a server-side state reference that is not proof of authority." src="https://cdn-images-1.medium.com/max/1024/1*jKoM7oCyg9Ux3N0B5XMkFA.png" /></figure><p>The audit event store is primary. Tracing points into it, not the other way around. For regulated actions, I would generate an application-owned run_id and operation_id at the host, propagate them alongside trace context in _meta on every MCP request, and append immutable audit events that reference all three.</p><figure><img alt="Five horizontal layers stacked like a ledger, each layer a labeled band: run_id ‘the workflow’, operation_id ‘the business action’, trace_id ‘the execution path’, audit_event_id ‘the evidence record’, handle_id ‘the state reference’. A bracket on the right groups audit_event_id as ‘primary, immutable’ in green and trace_id as ‘supporting, sampled’ in gray." src="https://cdn-images-1.medium.com/max/1024/1*sqbim3Fqt36rtew_eM_y8A.png" /><figcaption><em>The five evidence identities. </em>Source: author-generated using OpenAI image generation.</figcaption></figure><p>There is one record in this model that deserves special attention because it is where agent systems fail audits in a way traditional systems rarely do: the approval. My example run has an elicitation (“Confirm transfer of $12,400?”) followed by a transfer. It is not enough to prove the user approved a transfer. You have to prove they approved the transfer that actually executed. That means the approval event binds to a canonical hash of the exact action, roughly:</p><pre>approval_id<br>run_id<br>actor_id<br>tenant_id<br>action_type<br>canonical_action_hash<br>displayed_amount<br>displayed_payee<br>approval_timestamp<br>approval_channel<br>policy_version</pre><p>Without the action hash, a prompt-injected or simply buggy agent can obtain approval for one action and execute a different one, and your evidence will show a valid-looking approval next to a completed transfer with nothing proving they describe the same thing. In a dispute, that gap is the whole case.</p><figure><img alt="Left column titled ‘Unbound approval’: a checkmark card saying ‘user approved a transfer’ with a dotted, broken arrow to an executed action card showing different details, red label ‘cannot prove same action’. Right column titled ‘Bound approval’: approval card containing ‘canonical_action_hash: 9f3a…’ with a solid arrow to an executed action card carrying the identical hash, green label ‘hash match = provable’." src="https://cdn-images-1.medium.com/max/1024/1*qNKhpNf2nhYf7pCuk64jMg.png" /><figcaption><em>Approval binding - </em>Source: author-generated using OpenAI image generation.</figcaption></figure><h3>5. Handles change the security model</h3><p>Explicit handles are where the deep problems live, because a handle minted by a server now travels through the model’s context window, the least trusted and most injectable layer in the stack. That cuts two ways. On the evidence side, handles are visible in a way session state never was: you can log issuance, every use, and the principal behind each use, which done well is a better audit story than an opaque session. On the security side, handles inherit every risk of the context window: they can be steered by prompt injection, replayed from old transcripts or poisoned documents, and leaked across tenant boundaries through shared documents and summaries.</p><p>The rules that make handles safe are the standard rules for bearer-ish identifiers, applied to a surface where the “client” constructing requests is a language model that reads untrusted text all day:</p><ul><li>Use opaque, high-entropy handles. Guessable IDs are forgeable IDs.</li><li>Keep ownership and authorization context server-side. The handle names state; it never carries authority.</li><li>Bind every use to the authenticated subject, tenant, and action scope, verified at execution time.</li><li>Enforce expiry and revocation on each use. Do not assume any lifecycle you did not implement.</li><li>Reach for signed tokens only when stateless verification is a deliberate architectural choice, and remember a leaked signed token still replays unless it is bound to actor, tenant, purpose, and expiry.</li></ul><p>I have built workspace-scoped, ownership-based authorization for multi-tenant LLM analytics, and the rule that transfers directly is the second one: the moment a handle is treated as authority rather than as a reference, every leak becomes a breach.</p><figure><img alt="Horizontal lifecycle diagram, flat vector, five stages left to right: ‘minted by server’, ‘enters model context’, ‘passed in tool call’, ‘validated at execution’, ‘expired or revoked’. Under stages two and three, three red warning tags point upward: ‘forgery’, ‘replay’, ‘cross-tenant leakage’. Under stage four, a green shield tag: ‘ownership + tenant + scope check’." src="https://cdn-images-1.medium.com/max/1024/1*400n2v8S3WhDBLSSoiMO_g.png" /><figcaption><em>Handle lifecycle and threat points. </em>Source: author-generated using OpenAI image generation.</figcaption></figure><h3>6. The catalog is a menu, not a keycard</h3><p>The new spec adds ttlMs and cacheScope to list and resource-read results, <a href="https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/">modeled on HTTP caching semantics</a>, so clients know how long a tools/list response stays fresh and whether it can be shared across users. Sensible for scale, with one compliance edge worth simulating before an access reviewer simulates it for you.</p><p>Suppose a client caches a user’s tool catalog with a 30 minute TTL, and 10 minutes later you revoke that user’s authorization for one of the tools. For the remaining 20 minutes, a spec-compliant client can keep presenting the revoked tool to the model and attempting calls, because its cache is still fresh. When the access review asks whether access was removed immediately upon revocation, the honest answer becomes “within ttlMs, unless the server also rejects at call time.”</p><p>The fix is old and boring, which is why it gets skipped. A cached tool catalog is a UX and planning artifact; authorization has to be evaluated against the current principal, tenant, policy, and resource state when the tool executes. Then set catalog TTLs no longer than your revocation SLA so the model is not shown options it will be denied. In production I would make the revocation fire drill part of go-live: revoke a test user mid-run, measure how long the capability stays reachable, and put that number in the runbook, because someone will eventually ask for it under worse circumstances.</p><figure><img alt="horizontal timeline infographic, 0 to 30 minutes, flat vector. Green band from 0 to 10 labeled ‘catalog fresh, access valid’. Red diagonal-striped band from 10 to 30 labeled ‘exposure window: revoked tool still cached’. Vertical red marker at minute 10 labeled ‘authorization revoked’. Caption below the timeline: ‘closed only by call-time authorization’." src="https://cdn-images-1.medium.com/max/1024/1*3vkJkwBnarY3p9RyaMyJxQ.png" /><figcaption>The Stale-Catlog Window. Source: author-generated using OpenAI image generation.</figcaption></figure><h3>7. Why tracing is necessary but insufficient</h3><p>The spec hands you good raw material for correlation: <a href="https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/">W3C Trace Context propagation through </a><a href="https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/">_meta is now documented</a>, with traceparent, tracestate, and baggage key names pinned, so a trace that starts in the host can follow a call through the client SDK, the MCP server, and downstream systems as one span tree. The protocol Logging primitive is deprecated in the same release, with stderr and OpenTelemetry named as the migration path, under a lifecycle policy that keeps deprecated features working for at least 12 months.</p><p>I run OpenTelemetry tracing on production LLM platforms and I want to be precise about the boundary, because “just use OTel” is doing a lot of work in the migration advice. Trace context should connect the execution path. It should not be the only artifact you rely on to prove what happened. Traces get sampled and dropped. Inbound trace context can be absent, malformed, or maliciously supplied, which is why the gateway should validate or replace it rather than trust it. Observability retention is usually weeks; audit retention is usually years. Spans are mutable or deletable in many backends, which disqualifies them as primary evidence. High-cardinality identity and tenant data does not belong scattered across telemetry attributes. And the <a href="https://opentelemetry.io/blog/2026/genai-observability/">OpenTelemetry GenAI semantic conventions</a> are still under active development, so their schema should inform your telemetry, not become your evidence model. If you adopt them, pin the version and record it per span, because attribute names can change under you.</p><p>The architecture that respects the boundary keeps observability and evidence as separate planes that reference each other:</p><pre>Host<br>  ├── creates run_id and operation_id<br>  ├── starts trusted trace_id<br>  ├── audit event: run_started<br>MCP gateway<br>  ├── validates or replaces inbound trace context<br>  ├── records authenticated principal and tenant<br>  ├── audit event: tool_invocation_requested<br>MCP server<br>  ├── authorizes the call at execution time<br>  ├── validates handle ownership, expiry, scope, revocation<br>  ├── audit event: handle_used / action_prepared<br>Confirmation service<br>  ├── binds approval to canonical_action_hash<br>  └── audit event: approval_granted<br>Action service<br>  ├── executes idempotently<br>  └── audit event: action_committed</pre><p>Audit events land in an immutable retention system with restricted writers, retention lock or WORM controls where required, and a cryptographic integrity mechanism such as chained hashes, signed event batches, or independently retained digests. Append-only alone is not tamper-evident; append-only plus integrity proofs is.</p><p>The acceptance test for the whole design is a rehearsal of the auditor’s question. Hand a colleague only a transaction ID from staging and see whether they can reconstruct the full run, including the bound approval, from the evidence store alone. On my platforms, the day we could answer that question without tribal knowledge was the day audit conversations stopped being scary, and that was true long before MCP existed.</p><figure><img alt="Top plane labeled ‘Observability plane (sampled, weeks of retention)’: a span waterfall across Host, Gateway, MCP Server, Downstream connected by a blue trace line labeled ‘traceparent in _meta’. Bottom plane labeled ‘Evidence plane (immutable, years of retention)’: a green append-only ledger receiving five audit events: run_started, tool_invocation_requested, handle_used, approval_granted, action_committed, with a small chain-link motif indicating hash chaining." src="https://cdn-images-1.medium.com/max/1024/1*eTtdw5Ea-CHvV8CeU8QkeQ.png" /><figcaption><em>Two planes: observability vs evidence. </em>Source: author-generated using OpenAI image generation.</figcaption></figure><h3>8. The migration checklist, sequenced against two clocks</h3><p>Two clocks are running: the final spec on July 28, and the 12-month deprecation guarantee for Logging, Roots, and Sampling.</p><p>Before July 28, the work is inventory. Find every place a session ID appears in log pipelines, SIEM queries, dashboards, and dispute runbooks. Read the <a href="https://modelcontextprotocol.io/specification/draft/changelog">RC changelog</a> and the trace propagation section of the draft spec directly rather than trusting summaries, including this one, because details can still shift before the final. Decide your identity model from section 4 and start emitting run_id and trace context in parallel with sessions now, so you have overlap data. Audit which tools mint or accept handles and whether those handles are opaque, high-entropy, and tenant-bound. Compare catalog cache TTLs against your revocation SLA.</p><p>Within the 12-month window, do the rebuild: migrate off protocol Logging onto pinned OTel conventions, add handle lifecycle logging, enforce call-time authorization everywhere, add approval binding with canonical action hashes to any workflow that executes consequential actions, stand up the evidence store with integrity proofs, and run the revocation fire drill and the auditor rehearsal until both are boring.</p><p>The limits of this analysis are worth restating. It is based on the release candidate and could be invalidated in details by the final spec. The accidental-join-key pattern is widespread but not universal. And the architecture in section 7 is a reference shape from someone who has built its components on adjacent production systems, not a report from a completed MCP migration. What I am confident about is the underlying claim: correlation you inherit from a transport is correlation you do not own, and July 28 is the day a lot of teams find out which kind they had.</p><p><em>Sources: the </em><a href="https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/"><em>MCP 2026–07–28 release candidate announcement</em></a><em>, the </em><a href="https://blog.modelcontextprotocol.io/posts/sdk-betas-2026-07-28/"><em>SDK beta announcement</em></a><em>, the </em><a href="https://modelcontextprotocol.io/specification/2025-06-18/basic/transports"><em>previous transport specification</em></a><em>, the </em><a href="https://modelcontextprotocol.io/specification/draft/changelog"><em>draft spec changelog</em></a><em>, and the </em><a href="https://opentelemetry.io/blog/2026/genai-observability/"><em>OpenTelemetry GenAI observability material</em></a><em>. Deprecation semantics and convention status are live documents; verify both before you build.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1f9155469fb" width="1" height="1" alt=""><hr><p><a href="https://pub.towardsai.net/mcp-goes-stateless-on-july-28-is-your-audit-trail-still-intact-e1f9155469fb">MCP Goes Stateless on July 28. Is Your Audit Trail Still Intact?</a> was originally published in <a href="https://pub.towardsai.net/">Towards AI</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>