<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Marc Newstead</title>
    <description>The latest articles on DEV Community by Marc Newstead (@icentric).</description>
    <link>https://dev.to/icentric</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3929651%2Ffa7f595b-8a59-45da-b8be-ee66e3feab4d.png</url>
      <title>DEV Community: Marc Newstead</title>
      <link>https://dev.to/icentric</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/icentric"/>
    <language>en</language>
    <item>
      <title>Why Your AI Integration Might Get 10x More Expensive (And What to Do About It)</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 14 Sep 2026 09:04:55 +0000</pubDate>
      <link>https://dev.to/icentric/why-your-ai-integration-might-get-10x-more-expensive-and-what-to-do-about-it-34k3</link>
      <guid>https://dev.to/icentric/why-your-ai-integration-might-get-10x-more-expensive-and-what-to-do-about-it-34k3</guid>
      <description>&lt;h2&gt;
  
  
  The API You're Using Is Losing Money
&lt;/h2&gt;

&lt;p&gt;Let's talk about something most of us aren't thinking about when we integrate OpenAI, Anthropic, or Google's AI APIs into our applications: &lt;strong&gt;the pricing we're paying right now is artificial&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;These companies are selling API access below cost. Intentionally. And whilst that's brilliant for our current sprint budgets, it creates a dependency risk that should be on every technical decision log.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Happens When Subsidies End?
&lt;/h2&gt;

&lt;p&gt;Think about what happened with AWS, Uber, or any other platform that used aggressive pricing to capture market share. The pattern is consistent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Below-cost pricing to build adoption&lt;/li&gt;
&lt;li&gt;Ecosystem lock-in (tooling, workflows, team knowledge)&lt;/li&gt;
&lt;li&gt;Price normalisation once switching costs are high enough&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;OpenAI isn't a charity. Neither is Anthropic. They're venture-backed companies burning capital to acquire users. &lt;a href="https://www.icentricagency.com/insights/the-ai-subsidy-trap-what-happens-when-the-losses-stop" rel="noopener noreferrer"&gt;When the losses stop&lt;/a&gt;, pricing will shift to reflect actual costs plus margin.&lt;/p&gt;

&lt;p&gt;The question isn't &lt;em&gt;if&lt;/em&gt; prices go up. It's &lt;em&gt;when&lt;/em&gt;, and whether your architecture can handle it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Lock-In Actually Hurts
&lt;/h2&gt;

&lt;p&gt;It's rarely the API contract itself that traps you. It's everything else:&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompt Engineering Investment
&lt;/h3&gt;

&lt;p&gt;You've spent weeks tuning prompts for GPT-4's specific behaviour. Those prompts won't necessarily work the same way with Claude, Gemini, or Llama. Each model has different:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Response formats and consistency&lt;/li&gt;
&lt;li&gt;Instruction-following characteristics
&lt;/li&gt;
&lt;li&gt;Context window handling&lt;/li&gt;
&lt;li&gt;Rate limit behaviours&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's technical debt you probably haven't budgeted for.&lt;/p&gt;

&lt;h3&gt;
  
  
  Data Pipelines and Tooling
&lt;/h3&gt;

&lt;p&gt;How tightly coupled is your code to OpenAI's SDK?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="c1"&gt;# This is coupled
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ChatCompletion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gpt-4&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.7&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;choices&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;

&lt;span class="c1"&gt;# This is better
&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;llm_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;complete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;temperature&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.7&lt;/span&gt;  
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;content&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you're calling provider-specific methods throughout your codebase, switching providers means a refactor, not a config change.&lt;/p&gt;

&lt;h3&gt;
  
  
  Team Knowledge and Momentum
&lt;/h3&gt;

&lt;p&gt;Your team has learned one provider's quirks, pricing tiers, and API patterns. They've built monitoring dashboards around specific error codes. Your runbooks assume certain rate limits and failure modes.&lt;/p&gt;

&lt;p&gt;Switching isn't just technical—it's organisational friction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building for Portability (Practically)
&lt;/h2&gt;

&lt;p&gt;You don't need to build an abstraction layer over every possible LLM provider. That's over-engineering. But you can make deliberate choices that reduce switching costs:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Abstract the Provider Interface
&lt;/h3&gt;

&lt;p&gt;Create a thin adapter layer. Even if you only support one provider today, &lt;strong&gt;the interface shouldn't assume provider-specific features&lt;/strong&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LLMClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ABC&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="nd"&gt;@abstractmethod&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;complete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;List&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;Message&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Response&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;pass&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OpenAIClient&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LLMClient&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;complete&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt;&lt;span class="n"&gt;kwargs&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# OpenAI-specific implementation
&lt;/span&gt;        &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When pricing changes, you can implement &lt;code&gt;AnthropicClient&lt;/code&gt; without touching application logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Make Prompts Configurable
&lt;/h3&gt;

&lt;p&gt;Don't hardcode prompts in application code. Store them as versioned configs or in a database. When you need to adapt prompts for a different model, you're editing data, not deploying code.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Monitor Cost Per Operation
&lt;/h3&gt;

&lt;p&gt;Track cost at the feature level, not just the invoice level:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cost per user query&lt;/li&gt;
&lt;li&gt;Cost per document processed
&lt;/li&gt;
&lt;li&gt;Cost per API route&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When prices shift, you'll immediately know which features become uneconomical.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Keep Open-Source Options Viable
&lt;/h3&gt;

&lt;p&gt;Periodically test whether your use case works with open models (Llama, Mistral, etc.). You don't need to run them in production, but if you &lt;strong&gt;can't&lt;/strong&gt; make them work, you've got zero negotiating leverage when your current provider reprices.&lt;/p&gt;

&lt;p&gt;If you're building AI-driven products and want to avoid these traps at the architecture level, companies specialising in &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt; can help design for resilience from day one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Practical Takeaway
&lt;/h2&gt;

&lt;p&gt;You don't need to panic or rip out your OpenAI integration tomorrow. But you should:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Treat current pricing as temporary&lt;/strong&gt; in your financial models
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Abstract provider dependencies&lt;/strong&gt; even if you're only using one today&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version and externalise prompts&lt;/strong&gt; so they're easy to adapt&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Track unit economics&lt;/strong&gt; so you know when pricing becomes a problem&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The AI API market is in land-grab mode. That's great for us right now. Just don't mistake a growth strategy for a permanent price point.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>devops</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Should You Trust Cloud Provider AI Safety Controls in Production?</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 14 Sep 2026 09:02:02 +0000</pubDate>
      <link>https://dev.to/icentric/should-you-trust-cloud-provider-ai-safety-controls-in-production-2oi1</link>
      <guid>https://dev.to/icentric/should-you-trust-cloud-provider-ai-safety-controls-in-production-2oi1</guid>
      <description>&lt;h2&gt;
  
  
  Should You Trust Cloud Provider AI Safety Controls in Production?
&lt;/h2&gt;

&lt;p&gt;If you're building anything with LLMs in production, you've probably hit the moment where someone asks: "How are we handling hallucinations, PII leaks, and toxic outputs?" The instinct is often to reach for a custom solution—build your own content filters, regex patterns for PII, and hardcoded blocklists. But AWS Bedrock Guardrails, Azure AI Content Safety, and Google's safety filters have matured significantly in the past year. So here's the question: can we finally trust &lt;a href="https://www.icentricagency.com/insights/secure-ai-platforms-is-it-time-to-trust-native-safety-controls" rel="noopener noreferrer"&gt;native safety controls&lt;/a&gt; enough to skip the custom layer?&lt;/p&gt;

&lt;p&gt;Let's walk through what these platforms actually offer now, where they still fall short, and how to make the call for your stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Actually Get Out of the Box
&lt;/h2&gt;

&lt;p&gt;All three major cloud providers now offer built-in guardrails that go beyond simple keyword filtering:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Content classification&lt;/strong&gt;: Detect hate speech, violence, sexual content, self-harm prompts—configurable by severity threshold&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PII redaction&lt;/strong&gt;: Automatically strip email addresses, credit card numbers, national insurance numbers, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompt injection detection&lt;/strong&gt;: Flag attempts to manipulate the system prompt (though effectiveness varies)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Grounding checks&lt;/strong&gt;: Validate that responses align with your retrieved context (RAG scenarios)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Topic denial&lt;/strong&gt;: Block entire subject areas you don't want the model engaging with&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Bedrock Guardrails, for example, lets you configure these as pre- and post-inference filters with a simple API call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;bedrock_runtime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;invoke_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;modelId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;anthropic.claude-v2&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;prompt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;user_input&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;max_tokens&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;512&lt;/span&gt;
    &lt;span class="p"&gt;}),&lt;/span&gt;
    &lt;span class="n"&gt;guardrailIdentifier&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;your-guardrail-id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;guardrailVersion&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The guardrail runs transparently, logs violations, and can either block or redact problematic content. No need to build your own detection pipeline.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where They Still Let You Down
&lt;/h2&gt;

&lt;p&gt;Here's the reality: these native controls are designed for &lt;strong&gt;breadth&lt;/strong&gt;, not &lt;strong&gt;depth&lt;/strong&gt;. They handle common patterns well but struggle with edge cases that matter for your specific domain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Domain-specific jargon gets flagged incorrectly.&lt;/strong&gt; If you're building tools for healthcare, legal, or financial services, expect false positives. Clinical terminology can trigger violence filters. Legal language around contracts might hit PII detectors.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Context-aware moderation is weak.&lt;/strong&gt; Native filters don't understand the difference between a user asking "how do I secure my database?" versus "how do I break into a database?" They pattern-match rather than reason about intent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transparency is limited.&lt;/strong&gt; You often don't know &lt;em&gt;why&lt;/em&gt; something was flagged. Was it a specific phrase? A topic? A combination? Debugging production issues becomes guesswork.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Customisation has a ceiling.&lt;/strong&gt; You can tweak sensitivity thresholds and add custom word lists, but you can't fundamentally change how classification works. If the provider's model doesn't recognise your niche risk patterns, you're stuck.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Framework: Foundation vs. Entirety
&lt;/h2&gt;

&lt;p&gt;The useful mental model isn't "native vs. custom"—it's &lt;strong&gt;native as foundation vs. native as entirety&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For most internal tooling, customer support bots, or low-risk workflows, native controls are probably enough. You get decent coverage, managed infrastructure, and automatic updates when new attack patterns emerge.&lt;/p&gt;

&lt;p&gt;But if you're in a regulated industry, handling sensitive data, or exposing LLMs to untrusted users at scale, you need a layered approach:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Native guardrails&lt;/strong&gt; catch the obvious stuff (PII, hate speech, prompt injection attempts)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Custom filters&lt;/strong&gt; handle your domain-specific rules (proprietary data patterns, context-aware blocking)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Runtime monitoring&lt;/strong&gt; logs everything for audit and continuous improvement&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human review queues&lt;/strong&gt; for edge cases that automation can't resolve&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This isn't overkill—it's acknowledging that no single layer is foolproof.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making the Call for Your Stack
&lt;/h2&gt;

&lt;p&gt;Before you commit to going all-in on native controls, ask yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;What's our actual risk profile?&lt;/strong&gt; Internal Q&amp;amp;A tool for devs? Probably fine with native. Customer-facing financial advice bot? Not a chance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;How much control do we need over false positives?&lt;/strong&gt; If blocking legitimate user queries costs you conversions, you need tighter customisation than native tools allow.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Can we afford vendor lock-in?&lt;/strong&gt; Guardrail implementations aren't portable. Bedrock guardrails don't work on Azure OpenAI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Do we have compliance requirements?&lt;/strong&gt; GDPR, SOC 2, or industry-specific regulations might demand explainability and auditability that native tools don't provide.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're working with an agency that specialises in &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt;, they can help map these considerations to architecture decisions—but ultimately, you're the one who knows your risk tolerance and domain edge cases.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Practical Takeaway
&lt;/h2&gt;

&lt;p&gt;Native AI safety controls are no longer toys. They're production-ready for a wide range of use cases. But "production-ready" doesn't mean "sufficient for all contexts." Start with native guardrails as your baseline, monitor real-world performance closely, and add custom layers only where you've proven they're necessary.&lt;/p&gt;

&lt;p&gt;The goal isn't to build the most sophisticated safety system possible—it's to build the &lt;strong&gt;least complex system that meets your actual risk requirements&lt;/strong&gt;. That might be entirely native. It might be hybrid. But it definitely shouldn't be a custom solution built because you didn't trust the platforms to have caught up yet.&lt;/p&gt;

&lt;p&gt;They have. Now it's on us to evaluate honestly whether they've caught up &lt;em&gt;enough&lt;/em&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>cloudcomputing</category>
      <category>devops</category>
    </item>
    <item>
      <title>Building for AI Agents: What Developers Need to Know About Agentic Commerce</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 07 Sep 2026 09:04:40 +0000</pubDate>
      <link>https://dev.to/icentric/building-for-ai-agents-what-developers-need-to-know-about-agentic-commerce-10jl</link>
      <guid>https://dev.to/icentric/building-for-ai-agents-what-developers-need-to-know-about-agentic-commerce-10jl</guid>
      <description>&lt;h2&gt;
  
  
  Building for AI Agents: What Developers Need to Know About Agentic Commerce
&lt;/h2&gt;

&lt;p&gt;If you're building ecommerce platforms, here's something that should be on your radar: AI agents are starting to make purchases on behalf of users. Not just recommending products or chatting—actually completing transactions autonomously.&lt;/p&gt;

&lt;p&gt;This isn't some distant future scenario. ChatGPT can browse the web. Google's experimenting with Shopping Graph agents. Perplexity is testing checkout flows. The &lt;a href="https://www.icentricagency.com/insights/agentic-commerce-how-ai-shopping-agents-are-reshaping-ecommerce" rel="noopener noreferrer"&gt;AI shopping agents&lt;/a&gt; paradigm is already here, and it breaks a lot of assumptions we've baked into our ecommerce stacks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Does This Mean for Your Codebase?
&lt;/h2&gt;

&lt;p&gt;Traditional ecommerce development optimises for human behaviour: visual hierarchy, persuasive copy, A/B tested CTAs. But AI agents don't care about your hero banner or that cleverly worded urgency message. They parse structured data, evaluate explicit attributes, and move on fast if information is missing or ambiguous.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The implications:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your product data model needs to be machine-first, not just human-friendly&lt;/li&gt;
&lt;li&gt;API responses become the primary product interface&lt;/li&gt;
&lt;li&gt;Schema.org markup goes from "nice to have" to critical infrastructure&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Structured Data Is Now a First-Class Concern
&lt;/h2&gt;

&lt;p&gt;You probably already emit some JSON-LD for SEO. Time to treat it like a proper API contract.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@context"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://schema.org/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Product"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Wireless Headphones"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"brand"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Brand"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AudioCo"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"offers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Offer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"79.99"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"priceCurrency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"GBP"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"availability"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://schema.org/InStock"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"shippingDetails"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"OfferShippingDetails"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"deliveryTime"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"ShippingDeliveryTime"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"businessDays"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"OpeningHoursSpecification"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"dayOfWeek"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"http://schema.org/Monday"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"aggregateRating"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AggregateRating"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ratingValue"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"4.5"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"reviewCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"287"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Agents will prioritise vendors who provide complete, unambiguous data. Missing fields mean you're invisible to the agent, even if your product is perfect for the user's needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What to prioritise:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Full Schema.org Product markup (not just the bare minimum)&lt;/li&gt;
&lt;li&gt;Explicit shipping costs, lead times, return policies&lt;/li&gt;
&lt;li&gt;Structured specification data (dimensions, compatibility, materials)&lt;/li&gt;
&lt;li&gt;Machine-readable availability and stock levels&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  APIs Over HTML
&lt;/h2&gt;

&lt;p&gt;Some agents will scrape your HTML. Better ones will prefer proper APIs. If you're not exposing product catalogues via REST or GraphQL endpoints, now's the time.&lt;/p&gt;

&lt;p&gt;Consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Dedicated agent endpoints&lt;/strong&gt; with richer data than your public-facing site might display&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limiting strategies&lt;/strong&gt; that don't punish legitimate agent traffic&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API keys or authentication&lt;/strong&gt; for verified agents (think partnerships with OpenAI, Google, etc.)
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Example: Agent-optimised product endpoint&lt;/span&gt;
&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/api/v1/products/:id/agent&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;authenticateAgent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;product&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getProductById&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;structured_specs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;specifications&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Fully normalised&lt;/span&gt;
    &lt;span class="na"&gt;compatibility&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;compatibleWith&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Explicit relationships&lt;/span&gt;
    &lt;span class="na"&gt;environmental_impact&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;sustainability&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// Emerging agent priorities&lt;/span&gt;
    &lt;span class="na"&gt;agent_metadata&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;last_updated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;updatedAt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;data_confidence&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;high&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Rethinking Affiliate Tracking
&lt;/h2&gt;

&lt;p&gt;Traditional affiliate tracking relies on cookies and click-through attribution. Agents don't click banners. They evaluate options programmatically and transact directly.&lt;/p&gt;

&lt;p&gt;You'll need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Server-side attribution models&lt;/strong&gt; that accept agent-provided referral tokens&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;API-native commission tracking&lt;/strong&gt; (think affiliate IDs passed in headers or request params)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New integration points&lt;/strong&gt; with agent platforms themselves&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is still emerging territory. Businesses focused on &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt; are already exploring agent partnership models that look more like B2B integrations than traditional affiliate marketing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Build Right Now
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Audit your product data completeness.&lt;/strong&gt; Run your catalogue through a schema validator. Fix missing fields.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expose a proper product API.&lt;/strong&gt; Even a read-only REST endpoint is a start.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor agent traffic.&lt;/strong&gt; Check your logs for non-browser user agents. Understand how they're interacting with your site.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Test with existing agents.&lt;/strong&gt; Ask ChatGPT or Perplexity to find and compare your products. See what they surface (or don't).&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;Agents are becoming a meaningful traffic source, and they behave fundamentally differently from human users. The good news? This is solvable with better data architecture and thoughtful API design—skills developers already have.&lt;/p&gt;

&lt;p&gt;The platforms that win in agentic commerce will be the ones that treat machine readability as a feature, not an afterthought.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ecommerce</category>
      <category>api</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Your API Isn't Ready for AI Agents (And Why That Matters Now)</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 07 Sep 2026 09:02:01 +0000</pubDate>
      <link>https://dev.to/icentric/your-api-isnt-ready-for-ai-agents-and-why-that-matters-now-49gh</link>
      <guid>https://dev.to/icentric/your-api-isnt-ready-for-ai-agents-and-why-that-matters-now-49gh</guid>
      <description>&lt;h2&gt;
  
  
  Your API Isn't Ready for AI Agents (And Why That Matters Now)
&lt;/h2&gt;

&lt;p&gt;We've spent years building APIs for mobile apps, SPAs, and internal services. Now there's a new client knocking: AI agents that want to browse your catalogue, compare prices, and complete purchases—autonomously.&lt;/p&gt;

&lt;p&gt;If you're running an ecommerce platform, this isn't science fiction. It's happening now, and your existing REST endpoints probably aren't cut out for it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: APIs Built for Humans, Not Agents
&lt;/h2&gt;

&lt;p&gt;Most ecommerce APIs assume a human is driving. Pagination works one way. Search expects user-typed queries. Checkout flows require session cookies and CSRF tokens tied to browser contexts.&lt;/p&gt;

&lt;p&gt;AI agents don't work like that. They:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Need machine-readable schemas, not just JSON responses&lt;/li&gt;
&lt;li&gt;Want structured discovery mechanisms ("what can I do here?")&lt;/li&gt;
&lt;li&gt;Expect stateful sessions that persist across model context windows&lt;/li&gt;
&lt;li&gt;Require authentication that works outside cookie-based flows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your perfectly functional API might be completely opaque to an agent trying to make a purchase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter MCP: The Protocol You Should Know About
&lt;/h2&gt;

&lt;p&gt;Anthropic's Model Context Protocol (MCP) is becoming the de facto standard for LLMs to interact with external services. Think of it as a handshake protocol that lets AI models discover and call your API methods in a structured way.&lt;/p&gt;

&lt;p&gt;Here's what matters from a developer perspective:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Tool Definitions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You expose your API capabilities as "tools" with explicit schemas:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"search_products"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"description"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Search product catalogue by query"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"inputSchema"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"object"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"properties"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"category"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"string"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"optional"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"maxPrice"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"number"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"optional"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Stateful Sessions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;MCP supports session state, so an agent can add items to a basket and complete checkout across multiple interactions—critical for anything beyond simple queries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Authentication That Works&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Token-based auth schemes that agents can actually use, not cookie flows that assume a browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  The llms.txt Convention
&lt;/h2&gt;

&lt;p&gt;Alongside MCP, you'll want an &lt;code&gt;llms.txt&lt;/code&gt; file at your domain root. It's the &lt;code&gt;robots.txt&lt;/code&gt; for AI—a simple, human-readable file that tells agents what your site offers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Product Catalogue API&lt;/span&gt;
Base URL: https://api.yourstore.com/v2
MCP Endpoint: https://api.yourstore.com/mcp
Capabilities: product_search, price_check, inventory_status, checkout
Auth: Bearer token required
Rate limits: 100 req/min
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's not a standard yet, but it's emerging as convention. Add one now.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Actually Needs Doing
&lt;/h2&gt;

&lt;p&gt;If you maintain an ecommerce API, here's the practical checklist:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Audit Your Catalogue Endpoints
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Is every SKU accessible via a queryable API?&lt;/li&gt;
&lt;li&gt;Are product attributes structured and consistently typed?&lt;/li&gt;
&lt;li&gt;Can you filter by price, availability, category programmatically?&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Make Pricing and Inventory Real-Time
&lt;/h3&gt;

&lt;p&gt;Agents won't scrape your frontend. They'll call your API. If your product endpoint returns stale pricing or "call for quote", you're out of the game.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Rethink Checkout Flows
&lt;/h3&gt;

&lt;p&gt;Multi-step checkout with CSRF tokens and session cookies doesn't work for agents. You need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Stateless or token-based basket management&lt;/li&gt;
&lt;li&gt;Programmatic address validation&lt;/li&gt;
&lt;li&gt;Payment flows that support server-to-server tokens (Stripe Payment Intents, not Checkout.js)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  4. Add Machine-Readable Schemas
&lt;/h3&gt;

&lt;p&gt;OpenAPI specs are a start, but MCP tool definitions are better. Describe what your endpoints &lt;em&gt;do&lt;/em&gt; and what they return, in terms an LLM can reason about.&lt;/p&gt;

&lt;h2&gt;
  
  
  B2B Is Where This Gets Real
&lt;/h2&gt;

&lt;p&gt;If you're in B2C, agentic commerce is interesting. If you're B2B—especially procurement, trade supply, wholesale—it's urgent.&lt;/p&gt;

&lt;p&gt;Procurement teams are &lt;em&gt;already&lt;/em&gt; using AI assistants to research suppliers and compare quotes. The first supplier whose API an agent can actually navigate and purchase from wins the order. The one still requiring a phone call loses.&lt;/p&gt;

&lt;p&gt;Agencies specialising in &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt; are seeing this demand spike, particularly from wholesale and manufacturing clients.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start Small, But Start Now
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add an &lt;code&gt;llms.txt&lt;/code&gt; file this week&lt;/li&gt;
&lt;li&gt;Audit your top 10 API endpoints—are they agent-friendly?&lt;/li&gt;
&lt;li&gt;Pick one flow (search? add to basket?) and write an MCP tool definition for it&lt;/li&gt;
&lt;li&gt;Test it with Claude or another MCP-aware model&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The competitive window is open now. In 12 months, agentic commerce will be table stakes.&lt;/p&gt;

&lt;p&gt;If you want to dig deeper into the strategic implications, the article &lt;a href="https://www.icentricagency.com/insights/agentic-commerce-is-your-website-ready-to-sell-to-ai" rel="noopener noreferrer"&gt;ready to sell to AI&lt;/a&gt; covers the broader ecommerce landscape and where the urgency really lies.&lt;/p&gt;

&lt;p&gt;But from a dev perspective? The work is concrete, achievable, and needs doing now. Your API is about to get a lot more clients—and they won't be human.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>api</category>
      <category>ecommerce</category>
    </item>
    <item>
      <title>Building for AI Agents That Actually Buy Stuff: A Developer's Guide</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 31 Aug 2026 09:04:48 +0000</pubDate>
      <link>https://dev.to/icentric/building-for-ai-agents-that-actually-buy-stuff-a-developers-guide-263k</link>
      <guid>https://dev.to/icentric/building-for-ai-agents-that-actually-buy-stuff-a-developers-guide-263k</guid>
      <description>&lt;h2&gt;
  
  
  Building for AI Agents That Actually Buy Stuff: A Developer's Guide
&lt;/h2&gt;

&lt;p&gt;Visa and Mastercard are now allowing AI agents to hold tokenised payment credentials and complete purchases autonomously. This isn't a demo or a proof of concept—it's happening in production right now. If you're building ecommerce platforms, payment integrations, or anything adjacent, this changes your technical requirements in ways that aren't immediately obvious.&lt;/p&gt;

&lt;p&gt;Let's talk through what actually matters from a developer perspective.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Request Signature Problem
&lt;/h2&gt;

&lt;p&gt;Traditional ecommerce APIs assume a human is somewhere in the loop. Your rate limiting, session management, and fraud detection are all tuned for browser-based sessions or mobile apps with recognisable user-agent strings.&lt;/p&gt;

&lt;p&gt;AI agents don't behave like browsers. They don't click through three product pages before converting. They don't abandon carts. They make decisions in milliseconds based on structured data, then execute.&lt;/p&gt;

&lt;p&gt;Your existing fraud rules will flag this as suspicious:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// What your fraud detection sees&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;session_duration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// seconds&lt;/span&gt;
  &lt;span class="nx"&gt;pages_viewed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;user_agent&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;CustomAgentClient/2.1&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;conversion_rate&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;repeat_purchase_interval&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;exactly 30 days&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's not a fraudster—that's an AI agent buying cat food on behalf of a user who set up a recurring purchase rule. But your existing heuristics can't tell the difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rethinking Your API Design
&lt;/h2&gt;

&lt;p&gt;If agents are first-class customers, your API needs to support them explicitly. This means:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Agent authentication flows&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You need a distinct auth mechanism for agent credentials. OAuth2 client credentials flow is a starting point, but you'll want additional metadata:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"client_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"agent_xyz"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"client_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"autonomous_agent"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"acting_on_behalf_of"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"user_12345"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"authorised_actions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"purchase"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"reorder"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"spending_limits"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"per_transaction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;50.00&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"per_month"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mf"&gt;200.00&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2. Structured product data endpoints&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Agents don't scrape your HTML. They need machine-readable product catalogues with pricing, availability, and specifications. If you're not already exposing this via GraphQL or a robust REST API, you're making agents work harder than they should.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Webhook-first order updates&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Agents don't poll. They subscribe. Make sure your order status changes, shipping updates, and inventory alerts are available via webhooks, not just GET endpoints.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Attribution Mess
&lt;/h2&gt;

&lt;p&gt;Here's where it gets commercially messy: &lt;a href="https://www.icentricagency.com/insights/agentic-commerce-how-ai-agents-are-reshaping-the-purchase-journey" rel="noopener noreferrer"&gt;Agentic Commerce&lt;/a&gt; breaks traditional affiliate tracking.&lt;/p&gt;

&lt;p&gt;An agent doesn't click a referral link. It evaluates options programmatically, possibly across dozens of vendors simultaneously, and chooses based on price, availability, and user preferences. Your &lt;code&gt;?ref=affiliate123&lt;/code&gt; query parameter never enters the equation.&lt;/p&gt;

&lt;p&gt;From a technical perspective, you need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent declaration headers&lt;/strong&gt;: Let agents identify which service or user initiated the request&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Alternative attribution models&lt;/strong&gt;: Consider tagging agents themselves as referral sources&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transparent logging&lt;/strong&gt;: Agents should be able to query why a particular product or vendor was recommended
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Agent making a purchase request&lt;/span&gt;
&lt;span class="nx"&gt;POST&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;api&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;orders&lt;/span&gt;
&lt;span class="nx"&gt;Headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="nx"&gt;X&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Agent&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;ID&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;perplexity_assistant_v2&lt;/span&gt;
  &lt;span class="nx"&gt;X&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Acting&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;For&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;User&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;user_12345&lt;/span&gt;
  &lt;span class="nx"&gt;X&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;Initiated&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nx"&gt;By&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;perplexity_shopping_context&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Fraud Detection Needs Retraining
&lt;/h2&gt;

&lt;p&gt;Your ML-based fraud models are trained on human behaviour. Agents will look like anomalies until you explicitly account for them.&lt;/p&gt;

&lt;p&gt;Consider adding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent reputation scores&lt;/strong&gt;: Track which agents behave predictably vs. which show suspicious patterns&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Velocity limits per agent&lt;/strong&gt;: An agent making 50 purchases/minute across different users might be legitimate—or it might be compromised&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Credential binding&lt;/strong&gt;: Ensure agent tokens are bound to specific users and can't be reused across accounts&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What to Build Now
&lt;/h2&gt;

&lt;p&gt;If you're working on payment infrastructure, ecommerce platforms, or integration layers, here's what to prioritise:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Implement agent-specific auth flows&lt;/strong&gt; before your fraud system starts blocking legitimate agent purchases&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Expose structured product data APIs&lt;/strong&gt; if you haven't already—Schema.org markup isn't enough&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Log and monitor agent behaviour separately&lt;/strong&gt; from human traffic so you can tune your systems&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Design spending controls&lt;/strong&gt; that let users authorise agents with granular permissions&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This isn't speculative. Payment networks are enabling this now. The companies that treat agent commerce as a first-class integration concern—rather than a weird edge case—will have a significant advantage.&lt;/p&gt;

&lt;p&gt;If you're building in this space and need technical guidance on &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt;, the architecture decisions you make in the next six months will define whether your platform is agent-friendly or agent-hostile.&lt;/p&gt;

&lt;p&gt;The agents are coming. Make sure your API is ready.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ecommerce</category>
      <category>api</category>
      <category>payments</category>
    </item>
    <item>
      <title>Building Your Ecommerce Stack for AI Agents: A Dev's Guide</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 31 Aug 2026 09:02:06 +0000</pubDate>
      <link>https://dev.to/icentric/building-your-ecommerce-stack-for-ai-agents-a-devs-guide-gdc</link>
      <guid>https://dev.to/icentric/building-your-ecommerce-stack-for-ai-agents-a-devs-guide-gdc</guid>
      <description>&lt;h2&gt;
  
  
  Building Your Ecommerce Stack for AI Agents: A Dev's Guide
&lt;/h2&gt;

&lt;p&gt;AI shopping agents are coming. Not in some distant future—they're being tested now by companies like Anthropic, OpenAI, and Perplexity. These agents will browse, compare, and purchase products autonomously on behalf of users.&lt;/p&gt;

&lt;p&gt;The question isn't whether this traffic will arrive, but whether your site will be their first choice or an afterthought. Here's what you need to know as a developer to get ahead of this shift.&lt;/p&gt;

&lt;h2&gt;
  
  
  The MCP Problem: Agents Need Structured Access
&lt;/h2&gt;

&lt;p&gt;Right now, most sites are optimised for humans with browsers. AI agents &lt;em&gt;can&lt;/em&gt; scrape HTML, but it's inefficient and fragile. Enter the &lt;strong&gt;Model Context Protocol (MCP)&lt;/strong&gt;—an open standard that defines how AI models connect to external data sources.&lt;/p&gt;

&lt;p&gt;Think of MCP as GraphQL for AI agents. Instead of parsing your rendered HTML, agents query structured endpoints that return exactly what they need: product catalogues, availability, pricing, checkout flows.&lt;/p&gt;

&lt;h3&gt;
  
  
  What This Means for Your Stack
&lt;/h3&gt;

&lt;p&gt;If you're already running a headless commerce setup, you're halfway there. Your product API probably exposes the right data—it just needs to be packaged for agent consumption.&lt;/p&gt;

&lt;p&gt;Key endpoints to consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;/mcp/products&lt;/code&gt; — searchable, filterable product catalogue&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/mcp/inventory&lt;/code&gt; — real-time stock levels&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;/mcp/checkout&lt;/code&gt; — programmatic purchase flow with auth&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Your responses should be deterministic and well-typed. JSON Schema validation is your friend here. Agents don't handle ambiguity well—"out of stock" and "temporarily unavailable" need to map to distinct states.&lt;/p&gt;

&lt;h2&gt;
  
  
  The llms.txt Convention
&lt;/h2&gt;

&lt;p&gt;Before an agent queries your MCP endpoints, it needs to discover them. This is where &lt;code&gt;llms.txt&lt;/code&gt; comes in—a dead-simple convention inspired by &lt;code&gt;robots.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Place it at your domain root and tell agents what you offer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# llms.txt
MCP-Endpoint: https://yoursite.com/mcp
Product-Feed: https://yoursite.com/products.json
Docs: https://yoursite.com/api/docs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No XML sitemaps, no scraping your footer for API links. Just a plain text file that says "here's how to talk to me programmatically."&lt;/p&gt;

&lt;p&gt;If you're unsure where to start with &lt;a href="https://www.icentricagency.com/insights/agentic-commerce-preparing-your-website-for-ai-shopping-agents-1" rel="noopener noreferrer"&gt;preparing your website&lt;/a&gt; for agentic traffic, this file is your minimum viable step.&lt;/p&gt;

&lt;h2&gt;
  
  
  Product Data Quality: The Unsexy Foundation
&lt;/h2&gt;

&lt;p&gt;Here's the uncomfortable truth: if your product data is inconsistent, agents will skip you.&lt;/p&gt;

&lt;p&gt;Humans are forgiving. They'll tolerate missing dimensions, vague descriptions, or inconsistent categorisation. AI agents won't. They're optimising across dozens of sites simultaneously, and poor data quality is a ranking signal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Audit Your Schema
&lt;/h3&gt;

&lt;p&gt;Run this mental checklist:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Attributes&lt;/strong&gt;: Are size, colour, material fields consistently populated?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Descriptions&lt;/strong&gt;: Do they contain actual product details or just marketing fluff?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Categories&lt;/strong&gt;: Is your taxonomy machine-readable (standardised IDs) or human-only ("Summer Favourites")?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pricing&lt;/strong&gt;: Are sale prices, VAT, and shipping costs programmatically accessible?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're using Shopify, WooCommerce, or a similar platform, you likely have gaps. Custom taxonomies and metafields are often inconsistently applied. Now's the time to clean that up.&lt;/p&gt;

&lt;h2&gt;
  
  
  Authentication and Trust
&lt;/h2&gt;

&lt;p&gt;When an agent places an order on behalf of a user, trust becomes critical. You need to verify:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The agent is acting with user consent&lt;/li&gt;
&lt;li&gt;The user's payment method is authenticated&lt;/li&gt;
&lt;li&gt;The transaction is auditable&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;OAuth 2.0 flows work here, but you'll need to think about agent-specific scopes. Does the agent have permission to purchase, or only browse? Can it access order history?&lt;/p&gt;

&lt;p&gt;Consider issuing agent-specific API keys with rate limits and usage tracking. You want observability into this traffic as it grows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters Now
&lt;/h2&gt;

&lt;p&gt;Agents aren't theoretical. Claude can already browse the web and interact with sites. ChatGPT's browsing mode is live. Perplexity is testing shopping features.&lt;/p&gt;

&lt;p&gt;The first wave of agentic traffic will be small—measurable in single-digit percentage points. But it will grow fast, and early movers will set the patterns. Sites that are agent-friendly now will capture disproportionate share as this behaviour scales.&lt;/p&gt;

&lt;p&gt;If you're working in ecommerce infrastructure, partner with agencies experienced in &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt; to audit your readiness. The window to prepare is open, but it won't stay that way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next Steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Create your &lt;code&gt;llms.txt&lt;/code&gt; file&lt;/strong&gt; — describe your site's capabilities in plain text&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit your product API&lt;/strong&gt; — ensure it's consistent, complete, and well-documented&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prototype an MCP endpoint&lt;/strong&gt; — start with read-only product queries&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Monitor agent traffic&lt;/strong&gt; — watch your logs for non-browser user agents&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The shift to agentic commerce is infrastructural, not cosmetic. It's not about adding a chatbot to your site—it's about making your entire stack legible to autonomous systems.&lt;/p&gt;

&lt;p&gt;Get ahead of it now, while it's still a competitive advantage rather than table stakes.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ecommerce</category>
      <category>webdev</category>
      <category>api</category>
    </item>
    <item>
      <title>Why Your E-commerce API Needs an llms.txt File (Before Your Competitors Add One)</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 24 Aug 2026 09:04:55 +0000</pubDate>
      <link>https://dev.to/icentric/why-your-e-commerce-api-needs-an-llmstxt-file-before-your-competitors-add-one-24ee</link>
      <guid>https://dev.to/icentric/why-your-e-commerce-api-needs-an-llmstxt-file-before-your-competitors-add-one-24ee</guid>
      <description>&lt;h2&gt;
  
  
  Why Your E-commerce API Needs an llms.txt File (Before Your Competitors Add One)
&lt;/h2&gt;

&lt;p&gt;Last week, a client asked me why their product pages weren't showing up in ChatGPT's shopping recommendations. My first question: "Do you have an llms.txt file?" Blank stare.&lt;/p&gt;

&lt;p&gt;If you're building or maintaining an e-commerce platform, AI agents are about to become your most important traffic source—and they don't browse like humans do.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: AI Agents Don't Click Around
&lt;/h2&gt;

&lt;p&gt;When a user asks Claude or ChatGPT to "find me the best wireless headphones under £150," the agent doesn't open Chrome and click through your navigation. It queries structured data sources, calls APIs, and follows machine-readable conventions.&lt;/p&gt;

&lt;p&gt;Your beautifully designed product pages? Invisible.&lt;/p&gt;

&lt;p&gt;Your carefully crafted category descriptions? Wasted.&lt;/p&gt;

&lt;p&gt;Unless you expose your catalogue in a way LLMs can actually consume, you're not in the game.&lt;/p&gt;

&lt;h2&gt;
  
  
  Enter llms.txt: The New Robots.txt
&lt;/h2&gt;

&lt;p&gt;Remember when &lt;code&gt;robots.txt&lt;/code&gt; was optional? Then suddenly every site needed one to control crawler behaviour. We're at that inflection point again.&lt;/p&gt;

&lt;p&gt;An &lt;code&gt;llms.txt&lt;/code&gt; file (typically served at &lt;code&gt;https://yoursite.com/llms.txt&lt;/code&gt;) tells AI agents:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What your site does&lt;/li&gt;
&lt;li&gt;Where to find structured data&lt;/li&gt;
&lt;li&gt;Which endpoints support agent queries&lt;/li&gt;
&lt;li&gt;Authentication requirements&lt;/li&gt;
&lt;li&gt;Rate limits and usage policies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's a minimal example for an e-commerce site:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# llms.txt for MyShop

## Purpose
E-commerce site selling consumer electronics

## Structured Data Endpoints
- Product catalogue: /api/v1/products (JSON-LD)
- Search: /api/v1/search?q={query}
- Product detail: /api/v1/products/{id}

## Authentication
API key required: docs at /api/docs

## Rate Limits
100 requests/minute per key

## Contact
api-support@myshop.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Simple, machine-readable, and it takes 15 minutes to implement.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Agents Actually Need From Your API
&lt;/h2&gt;

&lt;p&gt;Beyond the &lt;code&gt;llms.txt&lt;/code&gt; file, make sure your endpoints return:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. &lt;strong&gt;Clean JSON or JSON-LD&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;No HTML scraping. Agents want structured product data:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@context"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://schema.org"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Product"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Wireless Headphones Pro"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"price"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"129.99"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"priceCurrency"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"GBP"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"availability"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"InStock"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"aggregateRating"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"@type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"AggregateRating"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"ratingValue"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"4.5"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"reviewCount"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"287"&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. &lt;strong&gt;Real-time Stock and Pricing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Agents won't recommend out-of-stock items. Your API should return current availability, not cached values from three days ago.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. &lt;strong&gt;Clear Return and Shipping Policies&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Include machine-readable policy data. Agents compare these when making recommendations.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. &lt;strong&gt;Secure, Documented Checkout Flows&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;If you want agents to complete purchases, your checkout API needs OAuth2 support and clear documentation. The agent needs to act on behalf of an authenticated user.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Matters Right Now
&lt;/h2&gt;

&lt;p&gt;Early movers in SEO built link equity that competitors couldn't touch for years. &lt;a href="https://www.icentricagency.com/insights/agentic-commerce-preparing-your-website-for-ai-shopping-agents" rel="noopener noreferrer"&gt;Agentic commerce&lt;/a&gt; creates a similar first-mover advantage.&lt;/p&gt;

&lt;p&gt;Once an AI agent successfully transacts with your site, that interaction becomes training data. The agent learns your inventory structure, pricing patterns, and reliability. Competitors entering later face an uphill battle.&lt;/p&gt;

&lt;p&gt;Plus, LLM providers are actively building partnerships with early adopters. OpenAI's plugin marketplace prioritised sites with clean APIs and good documentation. The same dynamic will play out with shopping agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started This Week
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Monday:&lt;/strong&gt; Audit your existing APIs. Do you expose product data in structured JSON? Is your search endpoint agent-friendly?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tuesday:&lt;/strong&gt; Create an &lt;code&gt;llms.txt&lt;/code&gt; file. Use the template above. Deploy it to your root domain.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Wednesday:&lt;/strong&gt; Add JSON-LD markup to your product pages if you haven't already. Use Schema.org's Product type.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Thursday:&lt;/strong&gt; Document your API. OpenAPI specs are ideal. Host the docs at a stable URL and reference them in your &lt;code&gt;llms.txt&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Friday:&lt;/strong&gt; Test it. Ask ChatGPT or Claude to search your catalogue. See what happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bigger Picture
&lt;/h2&gt;

&lt;p&gt;This isn't just about being "AI-ready." It's about building APIs that are actually useful—to agents, to mobile apps, to your own frontend team. The discipline of making your data machine-readable pays dividends everywhere.&lt;/p&gt;

&lt;p&gt;If you're working on a larger digital transformation around &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt;, treating your e-commerce platform as an API-first system positions you well for whatever interface comes next—whether that's voice assistants, AR shopping, or something we haven't imagined yet.&lt;/p&gt;

&lt;p&gt;The web is shifting from pages to protocols. Your competitors are already noticing. Make sure you're not left behind.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ecommerce</category>
      <category>webdev</category>
      <category>api</category>
    </item>
    <item>
      <title>Building for Agentic Commerce: What Devs Need to Know Before It's Too Late</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 24 Aug 2026 09:02:18 +0000</pubDate>
      <link>https://dev.to/icentric/building-for-agentic-commerce-what-devs-need-to-know-before-its-too-late-6ej</link>
      <guid>https://dev.to/icentric/building-for-agentic-commerce-what-devs-need-to-know-before-its-too-late-6ej</guid>
      <description>&lt;h2&gt;
  
  
  Building for Agentic Commerce: What Devs Need to Know Before It's Too Late
&lt;/h2&gt;

&lt;p&gt;If you're building ecommerce systems right now, here's something worth thinking about: what happens when your customers aren't humans anymore?&lt;/p&gt;

&lt;p&gt;I don't mean this in a sci-fi dystopia way. I mean practically, architecturally — what changes when an AI agent, not a person clicking through your checkout flow, becomes a first-class user of your system?&lt;/p&gt;

&lt;h2&gt;
  
  
  The Technical Shift That's Coming
&lt;/h2&gt;

&lt;p&gt;Agentic commerce isn't about chatbots that help you find products. It's about delegation at the transaction level. A user says "keep me stocked on coffee beans, optimise for price and delivery" and an agent — with its own credentials, budget, and decision-making logic — handles the rest.&lt;/p&gt;

&lt;p&gt;From a dev perspective, this creates some genuinely new problems:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Authentication that isn't human-centric&lt;/strong&gt;: OAuth flows assume a person clicking buttons. What does auth look like when the client is an autonomous process making purchasing decisions across dozens of merchants?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate limiting and bot detection&lt;/strong&gt;: Your current bot protection is designed to &lt;em&gt;block&lt;/em&gt; automated purchasing. Now you need to &lt;em&gt;enable&lt;/em&gt; it, but only for legitimate agents.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Transaction context&lt;/strong&gt;: When a purchase goes wrong, you can't just email the customer. The agent made the call. Who do you notify? What's the rollback protocol?&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Who Sits Between the Agent and Your API?
&lt;/h2&gt;

&lt;p&gt;Here's where it gets commercially interesting, and why I think this matters to you even if you're just shipping features today.&lt;/p&gt;

&lt;p&gt;When humans shop, trust infrastructure is invisible: HTTPS, payment card networks, browser security models. We built all of that over decades.&lt;/p&gt;

&lt;p&gt;With agents, that &lt;a href="https://www.icentricagency.com/insights/agentic-commerce-why-the-trust-layer-is-the-new-battleground" rel="noopener noreferrer"&gt;trust layer&lt;/a&gt; doesn't exist yet — and whoever builds it will control a &lt;em&gt;lot&lt;/em&gt;. Think about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Agent registries&lt;/strong&gt;: Who certifies that an agent is acting on behalf of a real user with real funds?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Merchant discovery protocols&lt;/strong&gt;: How does an agent even find your API? Is there an agent-readable product feed spec we all converge on?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dispute resolution&lt;/strong&gt;: When an agent makes a mistake, who mediates? The agent provider? The payment network? A new intermediary?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn't theoretical. If you're building &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt; systems, you're already adjacent to this problem space.&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Can Do Right Now
&lt;/h2&gt;

&lt;p&gt;You don't need to rebuild your entire stack, but there are some practical steps worth considering:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Make your API agent-friendly
&lt;/h3&gt;

&lt;p&gt;If your ecommerce API is designed exclusively for SPAs and mobile apps, it's going to struggle with agents.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Instead of requiring session cookies:&lt;/span&gt;
&lt;span class="nx"&gt;GET&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;products&lt;/span&gt;&lt;span class="p"&gt;?&lt;/span&gt;&lt;span class="nx"&gt;category&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;coffee&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nx"&gt;sort&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;price&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="nx"&gt;delivery_speed&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nx"&gt;fast&lt;/span&gt;
&lt;span class="nx"&gt;Authorization&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;Bearer&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;agent_token&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c1"&gt;// Return structured, parseable data&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;products&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[...],&lt;/span&gt;
  &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;_meta&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;agent_hints&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;reorder_eligible&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;subscription_available&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Instrument for non-human transaction patterns
&lt;/h3&gt;

&lt;p&gt;Your monitoring and analytics probably assume human behaviour: sessions, cart abandonment, browsing patterns.&lt;/p&gt;

&lt;p&gt;Start logging and flagging agent-initiated transactions separately. You'll want to understand:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Purchase frequency and timing patterns&lt;/li&gt;
&lt;li&gt;Decision speed (agents won't browse for 10 minutes)&lt;/li&gt;
&lt;li&gt;Price sensitivity and optimisation behaviour&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Design for delegation, not impersonation
&lt;/h3&gt;

&lt;p&gt;When an agent acts, it's not &lt;em&gt;pretending&lt;/em&gt; to be the user. It's acting &lt;em&gt;on behalf of&lt;/em&gt; the user. That's a meaningful distinction.&lt;/p&gt;

&lt;p&gt;Your data models should capture:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="n"&gt;UUID&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;user_id&lt;/span&gt; &lt;span class="n"&gt;UUID&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;placed_by_agent_id&lt;/span&gt; &lt;span class="n"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;-- null if human&lt;/span&gt;
  &lt;span class="n"&gt;agent_authority_token&lt;/span&gt; &lt;span class="nb"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;-- verifiable delegation proof&lt;/span&gt;
  &lt;span class="p"&gt;...&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The Bit No One's Solved Yet
&lt;/h2&gt;

&lt;p&gt;Liability and regulation are still wide open. If an agent makes an unauthorised purchase, who's responsible? If it violates terms of service, do you ban the agent? The user? Both?&lt;/p&gt;

&lt;p&gt;There's no case law. There's barely any industry consensus. But these questions will land on &lt;em&gt;your&lt;/em&gt; backlog when your product manager asks you to support agent-driven purchasing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bottom Line for Devs
&lt;/h2&gt;

&lt;p&gt;Agentic commerce isn't a 2030 problem. If you're in ecommerce, marketplace, or API platform engineering, this is a &lt;strong&gt;2025–2026 problem&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;You don't need to solve it all today, but you &lt;em&gt;do&lt;/em&gt; need to be thinking about:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How your API will authenticate and rate-limit non-human clients&lt;/li&gt;
&lt;li&gt;What your transaction model looks like when the purchaser isn't clicking buttons&lt;/li&gt;
&lt;li&gt;Who you're architecturally betting on to provide the trust layer&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Because once that trust layer solidifies, migrating will be expensive. Better to have a point of view now.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ecommerce</category>
      <category>api</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Stop Building AI Agents Like Scripts: A Loop Architecture Primer for Devs</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 17 Aug 2026 09:04:54 +0000</pubDate>
      <link>https://dev.to/icentric/stop-building-ai-agents-like-scripts-a-loop-architecture-primer-for-devs-1cg7</link>
      <guid>https://dev.to/icentric/stop-building-ai-agents-like-scripts-a-loop-architecture-primer-for-devs-1cg7</guid>
      <description>&lt;h2&gt;
  
  
  The Problem With Most AI Agent Code
&lt;/h2&gt;

&lt;p&gt;If you've shipped an AI agent recently, there's a decent chance it's basically a fancy script. You send a prompt, get a response, maybe chain a few calls together, log the output, done. That works fine for demos. But the moment you need that agent to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Decide whether its own output is good enough to proceed&lt;/li&gt;
&lt;li&gt;Spawn sub-agents to handle specific tasks&lt;/li&gt;
&lt;li&gt;Recover from API errors or hallucinated nonsense&lt;/li&gt;
&lt;li&gt;Explain &lt;em&gt;why&lt;/em&gt; it made a decision three steps ago&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;...your script falls apart.&lt;/p&gt;

&lt;p&gt;What you're missing is &lt;strong&gt;loop architecture&lt;/strong&gt; — the control structure that governs how agents reason, act, evaluate, and decide what to do next. Most teams treat this as an afterthought. It shouldn't be.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Loop Architecture Actually Looks Like
&lt;/h2&gt;

&lt;p&gt;Think of a loop architecture as the runtime for your agent. It's not the model, and it's not the prompt. It's the scaffolding that wraps around both and enforces:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;State management&lt;/strong&gt;: What has the agent done? What does it know?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Evaluation logic&lt;/strong&gt;: Did that action succeed? Should we retry, delegate, or stop?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Control flow&lt;/strong&gt;: What happens next? Do we loop again, call a different agent, or return to the user?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here's a toy example in pseudocode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;AgentLoop&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;max_iterations&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;steps&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;running&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_iterations&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;max_iterations&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;iteration&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
        &lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;running&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;iteration&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_iterations&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;action&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;iteration&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# LLM call: "given state, what should I do next?"
&lt;/span&gt;        &lt;span class="k"&gt;pass&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# Actually do the thing (API call, DB query, spawn sub-agent)
&lt;/span&gt;        &lt;span class="k"&gt;pass&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="c1"&gt;# LLM or deterministic check: did it work? update state accordingly
&lt;/span&gt;        &lt;span class="k"&gt;pass&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the loop isn't endless. It has a budget. It checks its own output. It maintains state across iterations. That's the foundation.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Failure Modes You'll Hit
&lt;/h2&gt;

&lt;p&gt;Once you start building loops, you'll encounter these failure modes fast:&lt;/p&gt;

&lt;h3&gt;
  
  
  Runaway Spawning
&lt;/h3&gt;

&lt;p&gt;Your orchestrator agent decides every subtask needs its own agent. Suddenly you've got 47 LLM calls in parallel, your API quota is toast, and you have no idea which one caused the failure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Hard limits on spawn depth and breadth. Track the agent tree explicitly.&lt;/p&gt;

&lt;h3&gt;
  
  
  State Amnesia
&lt;/h3&gt;

&lt;p&gt;The agent forgets what it did two steps ago because you're not persisting state between calls. It repeats work, contradicts itself, or loops forever.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Structured state (JSON, not vibes). Log every state transition. Make it queryable.&lt;/p&gt;

&lt;h3&gt;
  
  
  No Exit Strategy
&lt;/h3&gt;

&lt;p&gt;Your loop has no clear success or failure condition. It just… keeps going until it times out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fix&lt;/strong&gt;: Explicit halt conditions. "Task complete", "unrecoverable error", "max budget exceeded". Treat these as first-class citizens in your control flow.&lt;/p&gt;

&lt;h2&gt;
  
  
  Governance Isn't Optional (Especially in the UK)
&lt;/h2&gt;

&lt;p&gt;If you're building agents for finance, healthcare, legal, or public sector, you can't punt on governance. Loop architecture is where you enforce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Audit trails&lt;/strong&gt;: every decision, every action, every state change&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human-in-the-loop gates&lt;/strong&gt;: certain actions require approval before execution&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rollback and replay&lt;/strong&gt;: if something breaks, you can rewind and debug&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn't theoretical. If your agent makes a decision that costs money or affects people, you need to be able to explain &lt;em&gt;why&lt;/em&gt; it did that. That explanation lives in your loop architecture, not in a vibe check of your prompt history.&lt;/p&gt;

&lt;p&gt;For a deeper dive into how loop architecture intersects with governance and enterprise constraints, the original piece on &lt;a href="https://www.icentricagency.com/insights/ai-loop-architecture-the-engineering-discipline-most-teams-are-missing" rel="noopener noreferrer"&gt;engineering discipline&lt;/a&gt; is worth reading.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical Next Steps
&lt;/h2&gt;

&lt;p&gt;If you're refactoring an existing agent or starting fresh:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Make state explicit&lt;/strong&gt;. Use a schema. Version it. Persist it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Define halt conditions upfront&lt;/strong&gt;. Success, failure, budget exhaustion.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Instrument everything&lt;/strong&gt;. Log state transitions, decisions, and evaluations. You'll need this when things break.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Set hard limits&lt;/strong&gt;. Max iterations, max spawn depth, max cost per loop.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build eval into the loop&lt;/strong&gt;. Don't wait until prod to discover your agent hallucinates half the time.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you're working with teams who need to scale this across regulated environments, agencies focused on &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt; often have reusable loop patterns and governance templates baked in.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Takeaway
&lt;/h2&gt;

&lt;p&gt;Loop architecture is the difference between a prototype that impresses in a demo and a system you can actually trust in production. Most teams skip this step because it's not as exciting as fine-tuning models or crafting clever prompts. But it's the scaffolding that makes everything else work.&lt;/p&gt;

&lt;p&gt;Treat your agent runtime like you'd treat any other critical system component: with discipline, observability, and respect for failure modes. Your future on-call self will thank you.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>agents</category>
      <category>devops</category>
    </item>
    <item>
      <title>Your API Just Got Rolled Back: Building Resilience When AI Models Disappear</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 17 Aug 2026 09:02:14 +0000</pubDate>
      <link>https://dev.to/icentric/your-api-just-got-rolled-back-building-resilience-when-ai-models-disappear-5bag</link>
      <guid>https://dev.to/icentric/your-api-just-got-rolled-back-building-resilience-when-ai-models-disappear-5bag</guid>
      <description>&lt;h2&gt;
  
  
  Your API Just Got Rolled Back: Building Resilience When AI Models Disappear
&lt;/h2&gt;

&lt;p&gt;You wake up to Slack alerts. Your product's AI-powered feature is returning gibberish. You check the vendor's status page: "Model gpt-4-turbo-2024-04-09 deprecated effective immediately. Please migrate to gpt-4-turbo-2024-05-13."&lt;/p&gt;

&lt;p&gt;Sound familiar? If you're integrating third-party AI models into production systems, this isn't a hypothetical anymore. It's Tuesday.&lt;/p&gt;

&lt;p&gt;AI vendors have normalised something that would be unthinkable in traditional software: pulling products with little notice and treating it as routine maintenance. For developers building on these platforms, this changes everything about how we architect integrations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why This Isn't Like Other Dependencies
&lt;/h2&gt;

&lt;p&gt;When you pin &lt;code&gt;lodash@4.17.21&lt;/code&gt; in your &lt;code&gt;package.json&lt;/code&gt;, you're done. That version behaves identically today, next month, and five years from now. The contract is simple: you control when you upgrade.&lt;/p&gt;

&lt;p&gt;AI model APIs break this contract fundamentally:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Model versions can vanish&lt;/strong&gt; with 30–90 days notice (sometimes less)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Behaviour drifts&lt;/strong&gt; even within the same version identifier&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rollbacks happen&lt;/strong&gt; when vendors discover post-deployment issues&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pricing changes&lt;/strong&gt; mid-lifecycle, making your current integration uneconomical&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn't a technical problem—it's a business model problem. When OpenAI serves 100 million users across thousands of products, they optimise for their platform economics, not your deployment schedule.&lt;/p&gt;

&lt;p&gt;Agencies working in &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt; have seen this pattern accelerate over the past 18 months. The vendors aren't being malicious; they're treating model deprecation as product hygiene.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Developer's Dilemma
&lt;/h2&gt;

&lt;p&gt;Let's make this concrete. You've built a feature that summarises support tickets using GPT-4. Your product manager loves it. Customers love it. Then the model gets pulled.&lt;/p&gt;

&lt;p&gt;Your options:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Migrate immediately&lt;/strong&gt; to the replacement model (which might behave differently, breaking your prompts)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Disable the feature&lt;/strong&gt; until you can properly test and migrate&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switch vendors&lt;/strong&gt; entirely (requiring weeks of reintegration work)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these are good. All of them create technical debt, user-facing issues, or both.&lt;/p&gt;

&lt;h2&gt;
  
  
  Defensive Architecture Patterns
&lt;/h2&gt;

&lt;p&gt;Here's what actually works when building on unstable AI foundations:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Abstract the Model Layer
&lt;/h3&gt;

&lt;p&gt;Don't scatter OpenAI calls throughout your codebase:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Bad: tightly coupled&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;summary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;gpt-4-turbo&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;messages&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Better: abstraction layer&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;summary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;aiService&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;summarise&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ModelVersion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;CURRENT_SUMMARY&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This lets you swap implementations, A/B test models, or fall back to alternatives without touching business logic.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Version Your Prompts and Outputs
&lt;/h3&gt;

&lt;p&gt;Track which model version generated which output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kr"&gt;interface&lt;/span&gt; &lt;span class="nx"&gt;AISummary&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;modelVersion&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;generatedAt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;tokensUsed&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When behaviour changes, you can identify which historical outputs might be affected.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Build Kill Switches
&lt;/h3&gt;

&lt;p&gt;Feature flags aren't optional—they're critical infrastructure:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;featureFlags&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isEnabled&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai-summarisation&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;fallbackSummarisation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;content&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You need the ability to disable AI features instantly without deploying code.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Monitor Model Behaviour, Not Just Uptime
&lt;/h3&gt;

&lt;p&gt;Traditional API monitoring (latency, error rates) isn't enough. You need to detect &lt;em&gt;behavioural&lt;/em&gt; drift:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Track output length distributions&lt;/li&gt;
&lt;li&gt;Sample outputs for quality checks&lt;/li&gt;
&lt;li&gt;Monitor user feedback signals (edits, deletions, complaints)&lt;/li&gt;
&lt;li&gt;Set up alerts for statistical anomalies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If the new model suddenly produces 40% longer summaries, you want to know before your UI breaks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to Demand in SLAs
&lt;/h2&gt;

&lt;p&gt;Developers don't usually negotiate contracts, but you should be feeding requirements to whoever does. Push for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minimum notice periods&lt;/strong&gt; for deprecations (90+ days)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Explicit version stability guarantees&lt;/strong&gt; (or lack thereof)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rollback notification requirements&lt;/strong&gt; with severity definitions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Testing access&lt;/strong&gt; to replacement models before forced migration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The standard SLA template treats AI like SASS. It isn't. If your procurement team doesn't understand this, point them to resources that explain why &lt;a href="https://www.icentricagency.com/insights/ai-retractions-are-now-routine-is-your-sla-ready" rel="noopener noreferrer"&gt;SLAs need updating&lt;/a&gt; for AI integration.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Uncomfortable Truth
&lt;/h2&gt;

&lt;p&gt;No amount of defensive coding eliminates the fundamental risk: you're building on infrastructure you don't control, with stability guarantees that wouldn't be acceptable for any other dependency.&lt;/p&gt;

&lt;p&gt;That doesn't mean you shouldn't use AI APIs. It means you need to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Architect for failure&lt;/strong&gt; as a first-class concern&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never make AI critical path&lt;/strong&gt; without a fallback&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Budget time&lt;/strong&gt; for unexpected migrations&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Document assumptions&lt;/strong&gt; about model behaviour&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treat AI model integrations like you'd treat a startup's beta API: powerful, useful, and potentially unreliable. Build accordingly.&lt;/p&gt;

&lt;p&gt;The vendors have made their position clear through their actions. Now it's on us to build systems that can survive their product decisions.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>devops</category>
      <category>api</category>
    </item>
    <item>
      <title>Why Your Multi-Agent AI System Is Probably a Ticking Time Bomb</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 10 Aug 2026 09:04:53 +0000</pubDate>
      <link>https://dev.to/icentric/why-your-multi-agent-ai-system-is-probably-a-ticking-time-bomb-3efc</link>
      <guid>https://dev.to/icentric/why-your-multi-agent-ai-system-is-probably-a-ticking-time-bomb-3efc</guid>
      <description>&lt;h2&gt;
  
  
  Why Your Multi-Agent AI System Is Probably a Ticking Time Bomb
&lt;/h2&gt;

&lt;p&gt;You've built a multi-agent AI system. Maybe it's a research assistant that spawns specialist agents, or a customer service orchestrator that delegates to domain experts. It works brilliantly in demos. Then you put it in production and watch your API costs explode, your logs fill with circular reasoning, and your agents start hallucinating confidently at scale.&lt;/p&gt;

&lt;p&gt;Sound familiar?&lt;/p&gt;

&lt;p&gt;The problem isn't your prompt engineering. It's that you're treating agent orchestration like a script when you should be treating it like distributed systems design.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Loop Is the System
&lt;/h2&gt;

&lt;p&gt;When you chain LLM calls together with the ability to spawn sub-tasks, you're not building a prompt anymore — you're building a control flow system with non-deterministic nodes. Each decision point is a potential branch. Each agent spawn is a potential infinite regress.&lt;/p&gt;

&lt;p&gt;Consider this pseudocode:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;orchestrator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;subtasks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;decompose&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;subtask&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;subtasks&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nf"&gt;is_complex&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subtask&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;orchestrator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subtask&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;  &lt;span class="c1"&gt;# Recursive call
&lt;/span&gt;        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;specialist_agent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;subtask&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;synthesize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Looks reasonable, right? Now ask yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What stops infinite recursion if &lt;code&gt;is_complex()&lt;/code&gt; is LLM-based?&lt;/li&gt;
&lt;li&gt;How do you handle when a subtask legitimately requires 47 specialist calls?&lt;/li&gt;
&lt;li&gt;What's your budget ceiling before you cut off mid-execution?&lt;/li&gt;
&lt;li&gt;How do you debug why the orchestrator chose to spawn 12 agents instead of 3?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren't prompt problems. They're &lt;strong&gt;architectural&lt;/strong&gt; problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three Things You Need to Design Explicitly
&lt;/h2&gt;

&lt;p&gt;If you're serious about production multi-agent systems, you need to treat loop design as a first-class engineering concern. That means explicitly designing:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Spawning Logic
&lt;/h3&gt;

&lt;p&gt;Your orchestrator needs clear, testable rules for when to delegate. "Let the LLM decide" isn't good enough. You need guard rails:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SpawnPolicy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;max_depth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
    &lt;span class="n"&gt;max_children_per_node&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;int&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;
    &lt;span class="n"&gt;cost_ceiling_per_branch&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;float&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;0.50&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;should_spawn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;TaskContext&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;Decision&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;depth&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;max_depth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Decision&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;EXECUTE_INLINE&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;current_cost&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;estimated_cost&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cost_ceiling&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Decision&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SIMPLIFY&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;Decision&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;DELEGATE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isn't about limiting capability — it's about &lt;strong&gt;predictable resource consumption&lt;/strong&gt;. Your spawning logic should be as observable and testable as any other system boundary.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. State Management
&lt;/h3&gt;

&lt;p&gt;When agents spawn agents, who owns the context? How do you avoid passing the entire conversation history to every spawned agent? What gets synthesised back up the chain?&lt;/p&gt;

&lt;p&gt;You need explicit state boundaries:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What context each agent receives&lt;/li&gt;
&lt;li&gt;What artifacts persist between calls&lt;/li&gt;
&lt;li&gt;How results get aggregated back to the orchestrator&lt;/li&gt;
&lt;li&gt;When to prune context to stay under token limits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treat your agent interactions like microservices. Define clear contracts.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Termination Conditions
&lt;/h3&gt;

&lt;p&gt;Your loop needs to know when to stop. Not just "when the task is done" (the LLM will &lt;em&gt;always&lt;/em&gt; think it can do more), but hard limits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maximum depth of delegation&lt;/li&gt;
&lt;li&gt;Token budget exhaustion&lt;/li&gt;
&lt;li&gt;Wall-clock timeout&lt;/li&gt;
&lt;li&gt;Confidence thresholds that trigger escalation to humans&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These should be baked into your architecture, not bolted on as an afterthought.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Production Reality Check
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://www.icentricagency.com/insights/agentic-loop-engineering-the-ai-discipline-teams-are-missing" rel="noopener noreferrer"&gt;discipline teams are missing&lt;/a&gt; isn't about better prompts. It's about treating agentic loops with the same rigour you'd apply to any distributed system.&lt;/p&gt;

&lt;p&gt;That means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Structured logging&lt;/strong&gt; at every spawn decision&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Distributed tracing&lt;/strong&gt; to visualise agent call trees&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Circuit breakers&lt;/strong&gt; to prevent runaway costs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Regression tests&lt;/strong&gt; that validate spawn behaviour against known scenarios&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost attribution&lt;/strong&gt; per logical task, not just per API call&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're building &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt; capabilities into your product, these aren't nice-to-haves. They're survival basics.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start Small, Instrument Everything
&lt;/h2&gt;

&lt;p&gt;You don't need to solve all of this on day one. But you do need to acknowledge that &lt;strong&gt;the loop is your architecture&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Start by making spawning decisions observable. Log every delegation. Visualise your call trees. Set hard cost ceilings. Build dashboards that show you &lt;em&gt;why&lt;/em&gt; an agent spawned five children instead of two.&lt;/p&gt;

&lt;p&gt;Then iterate. Because the alternative — hoping your multi-agent system behaves itself in production — is how you end up with surprise AWS bills and a very awkward Slack message to your CTO.&lt;/p&gt;

&lt;p&gt;Treat your loops like the distributed systems they are, and your future self will thank you.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>devops</category>
      <category>bestpractices</category>
    </item>
    <item>
      <title>Your AI Provider Just Yanked Their Best Model. Now What?</title>
      <dc:creator>Marc Newstead</dc:creator>
      <pubDate>Mon, 10 Aug 2026 09:02:15 +0000</pubDate>
      <link>https://dev.to/icentric/your-ai-provider-just-yanked-their-best-model-now-what-2lpf</link>
      <guid>https://dev.to/icentric/your-ai-provider-just-yanked-their-best-model-now-what-2lpf</guid>
      <description>&lt;h2&gt;
  
  
  Your AI Provider Just Yanked Their Best Model. Now What?
&lt;/h2&gt;

&lt;p&gt;Last month, you integrated GPT-4 Turbo into your product. Your users loved it. Then OpenAI quietly rolled it back, swapped the model weights, and your output quality tanked. Sound familiar?&lt;/p&gt;

&lt;p&gt;This isn't hypothetical. Major AI labs are making silent model retractions a regular occurrence, and most dev teams are building on foundations that can shift overnight. If you're calling AI APIs without a plan for this, you're one undocumented rollback away from a very bad sprint.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem: API Stability Is a Polite Fiction
&lt;/h2&gt;

&lt;p&gt;We're used to semantic versioning. Breaking changes come with major version bumps. Deprecation warnings give us months to migrate. The social contract of stable APIs is deeply embedded in how we build software.&lt;/p&gt;

&lt;p&gt;AI providers don't play by these rules.&lt;/p&gt;

&lt;p&gt;A model version like &lt;code&gt;gpt-4-turbo&lt;/code&gt; isn't a semantic version—it's a moving target. The weights behind that endpoint can change without warning. Performance characteristics shift. Output formats drift. What worked in your integration tests last Tuesday might fail differently on Friday.&lt;/p&gt;

&lt;p&gt;The incentive structure is clear: labs are in a race for benchmarks, talent, and investment. Shipping fast matters more than stability. If a model has issues post-launch, the path of least resistance is a quiet rollback and a vague status page update.&lt;/p&gt;

&lt;p&gt;For a deeper look at why this pattern is becoming normalised, see &lt;a href="https://www.icentricagency.com/insights/ai-retractions-why-launch-fast-retract-quietly-is-a-business-risk" rel="noopener noreferrer"&gt;launch fast, retract quietly&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Your TOS Actually Says (Spoiler: Not Much)
&lt;/h2&gt;

&lt;p&gt;Most of us click through AI API terms without reading them. When you do read them, the language is blunt:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No uptime guarantees&lt;/strong&gt; beyond vague "commercially reasonable efforts"&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unilateral modification rights&lt;/strong&gt; for models, pricing, and availability&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Termination clauses&lt;/strong&gt; that give the provider an exit with minimal notice&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No liability&lt;/strong&gt; for consequential damages (i.e., your product breaking)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You're building critical features on infrastructure that has fewer contractual protections than your email service.&lt;/p&gt;

&lt;p&gt;If you're in a regulated industry or handling enterprise SLAs, this gap isn't just annoying—it's a compliance and commercial risk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build for Instability: The Abstraction Layer You Actually Need
&lt;/h2&gt;

&lt;p&gt;The correct response isn't to avoid AI. It's to architect for vendor instability from day one.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Abstract the AI boundary
&lt;/h3&gt;

&lt;p&gt;Don't let &lt;code&gt;openai.ChatCompletion.create()&lt;/code&gt; calls sprawl across your codebase. Wrap all AI calls behind an internal interface:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;LLMService&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# Your internal contract
&lt;/span&gt;        &lt;span class="k"&gt;pass&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;OpenAIProvider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;LLMService&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;generate_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;prompt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# OpenAI-specific implementation
&lt;/span&gt;        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ChatCompletion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(...)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isn't over-engineering. It's basic dependency inversion. When (not if) you need to swap providers, you're changing one class, not grepping through 47 files.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Version your prompts and expected behaviours
&lt;/h3&gt;

&lt;p&gt;Treat prompts like database migrations. Version them. Test them. Track which version is active in production.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;PROMPT_V3&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
You are a customer service assistant.
Always respond in JSON format: {&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;answer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: str, &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;confidence&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;: float}
&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;test_prompt_v3_format&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;generate_response&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PROMPT_V3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;test_context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;is_valid_json&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;answer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When model behaviour drifts, you'll spot it in CI, not in production.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Log inputs, outputs, and model versions
&lt;/h3&gt;

&lt;p&gt;You can't debug what you can't see. Log every AI interaction with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Model name and version&lt;/li&gt;
&lt;li&gt;Full prompt (sanitised if needed)&lt;/li&gt;
&lt;li&gt;Raw response&lt;/li&gt;
&lt;li&gt;Timestamp&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When output quality silently degrades, you need data to prove it wasn't your code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi-Vendor Isn't Paranoia—It's Risk Management
&lt;/h2&gt;

&lt;p&gt;Running multiple AI providers in parallel sounds expensive and complex. It is. But so is having your product break when your single provider retracts a model or raises prices 3x.&lt;/p&gt;

&lt;p&gt;You don't need full redundancy. You need &lt;strong&gt;viable fallback options&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Keep integration code for 2-3 providers behind your abstraction layer&lt;/li&gt;
&lt;li&gt;Run periodic tests against backup providers to ensure they still work&lt;/li&gt;
&lt;li&gt;Have a decision matrix: which provider for which use case, and what's the fallback?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn't about tolerating complexity for its own sake. It's about not having your commercial roadmap held hostage by a vendor's internal politics.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bottom Line
&lt;/h2&gt;

&lt;p&gt;AI capabilities are transformative. The commercial terms and stability guarantees surrounding them are not.&lt;/p&gt;

&lt;p&gt;If you're building AI features into production systems, architect as if your provider will change the rules mid-game. Because they will.&lt;/p&gt;

&lt;p&gt;Abstraction layers, versioned prompts, structured logging, and multi-vendor optionality aren't gold-plating. They're the minimum due diligence for infrastructure you don't control.&lt;/p&gt;

&lt;p&gt;If your organisation is navigating these tradeoffs at scale, working with specialists in &lt;a href="https://www.icentricagency.com" rel="noopener noreferrer"&gt;AI automation and software development&lt;/a&gt; can help you get the architecture right before the next retraction hits.&lt;/p&gt;

&lt;p&gt;Now go wrap those API calls.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>api</category>
      <category>risk</category>
    </item>
  </channel>
</rss>
