<?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: llm</title>
    <description>The latest articles tagged 'llm' on DEV Community.</description>
    <link>https://dev.to/t/llm</link>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tag/llm"/>
    <language>en</language>
    <item>
      <title>The sparse-reward excuse is an authoring problem</title>
      <dc:creator>Aamer Mihaysi</dc:creator>
      <pubDate>Wed, 14 Oct 2026 14:37:48 +0000</pubDate>
      <link>https://dev.to/o96a/the-sparse-reward-excuse-is-an-authoring-problem-3f3g</link>
      <guid>https://dev.to/o96a/the-sparse-reward-excuse-is-an-authoring-problem-3f3g</guid>
      <description>&lt;p&gt;Every eval conversation I've had this year hits the same wall. Someone wants to measure an agent on a long-horizon task — 40, 60, 100 steps — and someone else says you can't score that densely. Grading every step means a human or a judge model reading the whole trajectory, and that's expensive, slow, and noisy. So you run the task, check the final assertion, and get one bit back. Pass or fail.&lt;/p&gt;

&lt;p&gt;I've built evals that way. They're cheap and they're nearly useless. When the agent fails at step 47, you have a terminal error and a transcript, and you spend the afternoon reading it like a detective. The signal you needed was at step 12, and you didn't collect it because collecting it looked expensive.&lt;/p&gt;

&lt;p&gt;Here's what I've started to believe: dense scoring was never the expensive part. Authoring was. We've been blaming the wrong cost.&lt;/p&gt;

&lt;p&gt;Think about what dense reward actually requires. To say "step 14 was progress," something has to know what progress means at step 14. If all you have is a task prompt and a final assertion, nothing knows that. So you hand the trajectory to a judge model and ask it to guess. That's expensive, and it's guessing, because the judge has no ground truth either. It's reading the same transcript you are, with the same missing information, and charging you per token for the privilege.&lt;/p&gt;

&lt;p&gt;Tev makes the other move, and it's the one I keep coming back to. Instead of scoring the trajectory after the fact, you write the hidden ground-truth world spec first — the actual state of the world, the preconditions, the milestones, the terminal conditions — and then you render the environment from that spec. The environment isn't hand-built and then described in a doc that drifts. The spec is the source, and the environment is a projection of it. Once that's true, progress at any step is a function of the spec. You don't judge it. You compute it. Dense per-step rewards fall out as a byproduct, because you already wrote down what "closer" means.&lt;/p&gt;

&lt;p&gt;Paper's here if you want the actual method: &lt;a href="https://arxiv.org/abs/2610.18868v1" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2610.18868v1&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The reason this lands for me isn't the benchmark numbers. It's that it's the same discipline I keep failing to apply in production. I run long-lived agents. They make tool calls, they hold state, they run for minutes at a time. When one goes sideways, my instrumentation tells me it errored. It does not tell me it was drifting at step 9 and unrecoverable by step 20. I've got logs, I've got traces, and I've got no notion of expected state to compare against, so all of it is description, not diagnosis. I can tell you exactly what the agent did. I can't tell you where it went wrong.&lt;/p&gt;

&lt;p&gt;The fix isn't a smarter judge model watching the agent in real time. I tried that. It's slow, it costs per step, and it's confidently wrong in exactly the places I need it to be right — the ambiguous middle, where the agent is doing something plausible but off-spec. The fix is writing down the world spec: what the state should look like, which invariants should hold, what a milestone looks like. Then checking observed state against it. That check is cheap. It's a comparison, not an inference. And it gives me a progress trace instead of a postmortem.&lt;/p&gt;

&lt;p&gt;So the myth I want to bust is this: dense agent evals are too expensive to run. They're not. They're too expensive to &lt;em&gt;improvise&lt;/em&gt;. If you don't have a spec, every step is a judgment call, and judgment calls don't scale — not in money, and not in consistency. If you do have a spec, every step is a lookup.&lt;/p&gt;

&lt;p&gt;What I'd steal from Tev, concretely:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Write the world spec before the task prompt.&lt;/strong&gt; State, invariants, milestones, terminal conditions. If you can't write it, you don't understand the task well enough to eval it, and no amount of judge model will fix that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Render the environment from the spec.&lt;/strong&gt; One source of truth. Hand-built environments drift from their descriptions, and then your rewards are scoring a world that doesn't exist.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Emit progress as a byproduct, not a second pass.&lt;/strong&gt; If scoring is a separate pipeline, it rots the moment the environment changes. If it's a projection of the spec, it stays in sync for free.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;In prod, make the same spec your instrumentation contract.&lt;/strong&gt; Every tool call gets checked against expected state. You get a curve, not a vibe.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Where I'm skeptical: rendering from a spec is only as good as the spec. Under-specify it and you get dense rewards that are confidently wrong, and an agent that optimizes straight into the gap between your spec and reality. That's worse than sparse, because sparse failure is at least honest — it doesn't tell you you're winning. Also, spec authoring is real work. You've moved the cost, not deleted it. But moving it from per-run scoring to one-time authoring is the right trade, because the spec is reusable, reviewable, and versionable. A wrong spec is a bug you can fix. A noisy judge is fog you can't.&lt;/p&gt;

&lt;p&gt;The other thing dense rewards buy you is debuggability. Sparse gives you pass/fail and a feeling. Dense gives you a curve, and the curve tells you where the agent stalls. That's the actual product. Not the score — the shape.&lt;/p&gt;

&lt;p&gt;Next time someone tells you long-horizon agent evals have to be sparse because dense scoring is too expensive, ask them for the world spec. If they don't have one, that's the cost they're actually paying. They just haven't itemized it.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
    </item>
    <item>
      <title>AI Reasoning Breakthroughs: DeepSeek-R1 and OpenAI's Path to Logic</title>
      <dc:creator>trillioniar s</dc:creator>
      <pubDate>Wed, 14 Oct 2026 14:34:37 +0000</pubDate>
      <link>https://dev.to/trillioniar_s_14a3c313e14/ai-reasoning-breakthroughs-deepseek-r1-and-openais-path-to-logic-256o</link>
      <guid>https://dev.to/trillioniar_s_14a3c313e14/ai-reasoning-breakthroughs-deepseek-r1-and-openais-path-to-logic-256o</guid>
      <description>&lt;p&gt;Today's AI landscape is shifting from probabilistic word prediction to structured logical reasoning. New models are utilizing reinforcement learning to "think" before they speak, drastically improving performance in math and coding.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Rise of Reasoning Models
&lt;/h2&gt;

&lt;h3&gt;
  
  
  OpenAI's Learning to Reason
&lt;/h3&gt;

&lt;p&gt;OpenAI has introduced new methodologies for LLMs to reason through complex problems. By integrating chain-of-thought processing, models can now self-correct and explore multiple paths to a solution. This reduces hallucinations in technical domains.&lt;br&gt;
Source: &lt;a href="https://openai.com/index/learning-to-reason-with-llms/" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  DeepSeek-R1 and RL
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Incentivizing Logic via Reinforcement Learning
&lt;/h3&gt;

&lt;p&gt;DeepSeek-R1 demonstrates that reasoning capabilities can be incentivized through specialized RL. The model shows a marked improvement in mathematical reasoning by rewarding the process of derivation rather than just the final answer.&lt;br&gt;
Source: &lt;a href="https://arxiv.org/abs/2501.12948" rel="noopener noreferrer"&gt;arXiv&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Philosophical Shift
&lt;/h2&gt;

&lt;h3&gt;
  
  
  LLM Inevitabilism
&lt;/h3&gt;

&lt;p&gt;The concept of "LLM Inevitabilism" suggests that the integration of these models into every layer of software is unavoidable. As reasoning capabilities stabilize, LLMs move from being "chatbots" to becoming the core operating system for digital tasks.&lt;br&gt;
Source: &lt;a href="https://tomrenner.com/posts/llm-inevitabilism/" rel="noopener noreferrer"&gt;Tom Renner&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Open Source and Accessibility
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Meta's Open Source Push
&lt;/h3&gt;

&lt;p&gt;Meta continues to advocate for open-source AI as the only viable path to prevent corporate monopolies. By releasing high-performance weights, they enable a global ecosystem of fine-tuning and safety research.&lt;br&gt;
Source: &lt;a href="https://about.fb.com/news/2024/07/open-source-ai-is-the-path-forward/" rel="noopener noreferrer"&gt;Meta&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Infrastructure for Scale
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Google DeepMind's Gemini Evolution
&lt;/h3&gt;

&lt;p&gt;Gemini continues to iterate on multi-modal reasoning, integrating native audio and video processing into the reasoning loop. This allows the model to reason about physical space and temporal events more accurately.&lt;br&gt;
Source: &lt;a href="https://deepmind.google/technologies/gemini/" rel="noopener noreferrer"&gt;Google DeepMind&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is Chain-of-Thought processing?
&lt;/h3&gt;

&lt;p&gt;It is a technique where the model generates intermediate reasoning steps before providing the final answer.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does DeepSeek-R1 differ from standard LLMs?
&lt;/h3&gt;

&lt;p&gt;DeepSeek-R1 uses reinforcement learning to specifically reward the reasoning process, not just the output.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why is open-source AI important for reasoning?
&lt;/h3&gt;

&lt;p&gt;Open weights allow researchers to inspect the "hidden" reasoning chains to ensure safety and transparency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Will reasoning models replace traditional coding?
&lt;/h3&gt;

&lt;p&gt;They will likely augment coding by handling architectural logic, while humans focus on high-level design.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do these models reduce hallucinations?
&lt;/h3&gt;

&lt;p&gt;By verifying internal steps of a logic chain, models can spot contradictions before finalizing a response.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>coding</category>
      <category>openai</category>
    </item>
    <item>
      <title>One Key, a Dozen-Plus Models: Switching LLMs in VS Code Chat with Modelflare</title>
      <dc:creator>Magnus</dc:creator>
      <pubDate>Wed, 14 Oct 2026 14:32:00 +0000</pubDate>
      <link>https://dev.to/modelflare_dev/one-key-a-dozen-plus-models-switching-llms-in-vs-code-chat-with-modelflare-4pi1</link>
      <guid>https://dev.to/modelflare_dev/one-key-a-dozen-plus-models-switching-llms-in-vs-code-chat-with-modelflare-4pi1</guid>
      <description>&lt;p&gt;How to use the Modelflare VS Code extension to put every text model your account can reach into the VS Code chat model picker, behind a single Smart API Key.&lt;/p&gt;

&lt;p&gt;Most developers no longer use one model. A fast, cheap model is fine for "rename this variable everywhere." A frontier model earns its price on a gnarly refactor. A third model is the one you trust for reviewing a migration. The problem is that each of those usually lives behind its own extension, its own account, and its own key.&lt;/p&gt;

&lt;p&gt;That setup has real costs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Configuration sprawl.&lt;/strong&gt; Three providers means three keys in three places, three billing dashboards, and three sets of rate limits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Switching is slow.&lt;/strong&gt; If changing models means changing extensions, you stop doing it, and you end up paying frontier prices for trivial edits.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;New models lag.&lt;/strong&gt; Every release means waiting for a provider extension update or editing config by hand.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Outages are your problem.&lt;/strong&gt; When one provider has a bad hour, the chat panel just errors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;VS Code already has the right UI for this: the chat model picker. What it needs is one provider that can fill that picker with models from many vendors. That is what the Modelflare extension does.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the extension does
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://marketplace.visualstudio.com/items?itemName=modelflare.modelflare-vscode" rel="noopener noreferrer"&gt;Modelflare for VS Code&lt;/a&gt; registers Modelflare as a language model provider for VS Code chat. According to its &lt;a href="https://github.com/castaly-ai/modelflare-vscode" rel="noopener noreferrer"&gt;README&lt;/a&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text models available to your key are loaded from &lt;code&gt;GET /v1/models&lt;/code&gt;, so new models appear without editing the key.&lt;/li&gt;
&lt;li&gt;Responses stream, and tool calling works for agent mode.&lt;/li&gt;
&lt;li&gt;Routing across groups, fallback and the routing strategy are handled server-side by the Smart API Key.&lt;/li&gt;
&lt;li&gt;The key lives in VS Code's secret storage, never in &lt;code&gt;settings.json&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It is bring-your-own-key: no Copilot subscription is required for BYOK models.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The extension ID is &lt;code&gt;modelflare.modelflare-vscode&lt;/code&gt;, and it requires VS Code 1.104 or newer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Create a Smart API Key
&lt;/h2&gt;

&lt;p&gt;This is the piece that makes "one key" true. An ordinary Modelflare key is bound to a single routing group and can only call that group's models. A &lt;a href="https://docs.modelflare.dev/guides/features/smart-api-key/" rel="noopener noreferrer"&gt;Smart API Key&lt;/a&gt; is bound to &lt;code&gt;auto&lt;/code&gt;. On every request Modelflare:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;collects every routing group your account may use,&lt;/li&gt;
&lt;li&gt;keeps only the groups that currently have a channel for the model you asked for,&lt;/li&gt;
&lt;li&gt;orders them by the key's strategy, and&lt;/li&gt;
&lt;li&gt;sends to the first candidate, moving to the next group if that one runs out of usable channels.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So a model that only one group serves still works, and a group that is momentarily unusable is skipped instead of failing your chat.&lt;/p&gt;

&lt;p&gt;To create one:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;a href="https://modelflare.dev/sign-up?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=vscode-one-key" rel="noopener noreferrer"&gt;Sign up&lt;/a&gt; or open the console.&lt;/li&gt;
&lt;li&gt;Go to &lt;a href="https://modelflare.dev/keys" rel="noopener noreferrer"&gt;API Keys&lt;/a&gt; â†’ &lt;strong&gt;Create Smart API Key&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Pick a routing strategy:&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Strategy&lt;/th&gt;
&lt;th&gt;Order of candidate groups&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Balanced (default)&lt;/td&gt;
&lt;td&gt;Starts in the middle of the price range, works up to the most expensive candidate, then back down through the cheaper ones&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stability first&lt;/td&gt;
&lt;td&gt;Highest group multiplier first&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Low price first&lt;/td&gt;
&lt;td&gt;Lowest group multiplier first&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You can change the strategy on the existing key at any time; the next request uses the new order. Quota, expiry date and IP allowlist work as on any other key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Install the extension
&lt;/h2&gt;

&lt;p&gt;From the VS Code Marketplace, search for &lt;strong&gt;Modelflare&lt;/strong&gt; in the Extensions view, or install from the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;code &lt;span class="nt"&gt;--install-extension&lt;/span&gt; modelflare.modelflare-vscode
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same extension is also published on Open VSX, the registry used by VS Code-compatible builds such as VSCodium: &lt;a href="https://open-vsx.org/extension/modelflare/modelflare-vscode" rel="noopener noreferrer"&gt;open-vsx.org/extension/modelflare/modelflare-vscode&lt;/a&gt;. It needs a build based on VS Code 1.104 or newer, the release line with the chat model provider API the extension uses.&lt;/p&gt;

&lt;p&gt;A note for early adopters: version 0.1.0 shipped under the ID &lt;code&gt;modelflare.modelflare&lt;/code&gt;. From 0.1.1 the ID is &lt;code&gt;modelflare.modelflare-vscode&lt;/code&gt;, because the shorter name is taken on the VS Code Marketplace. Commands and settings are unchanged, but VS Code keeps secrets per extension ID, so if you installed 0.1.0, run &lt;strong&gt;Manage Modelflare API Key&lt;/strong&gt; once after updating.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Add your key
&lt;/h2&gt;

&lt;p&gt;Either:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open the chat model picker â†’ &lt;strong&gt;Manage Models&lt;/strong&gt; â†’ &lt;strong&gt;Modelflare&lt;/strong&gt;, or&lt;/li&gt;
&lt;li&gt;run &lt;strong&gt;Modelflare: Manage Modelflare API Key&lt;/strong&gt; from the Command Palette.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Paste the Smart API Key. It goes into VS Code's secret storage. Then open the model picker again and choose a Modelflare model.&lt;/p&gt;

&lt;p&gt;The extension has exactly one setting:&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;"modelflare.baseUrl"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"global"&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;code&gt;global&lt;/code&gt; (the default) points at &lt;code&gt;https://modelflare.dev/v1&lt;/code&gt;; &lt;code&gt;china&lt;/code&gt; points at &lt;code&gt;https://origin.modelflare.dev/v1&lt;/code&gt;; you can also give a custom URL. Most readers never need to touch it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Worked example: three models, one task
&lt;/h2&gt;

&lt;p&gt;To show why switching matters, here is a realistic loop on a small TypeScript service. All three models were picked from the same dropdown, on the same key, without leaving the chat panel.&lt;/p&gt;

&lt;p&gt;The model IDs below are real entries in the &lt;a href="https://modelflare.dev/pricing" rel="noopener noreferrer"&gt;Modelflare catalog&lt;/a&gt;. Each one was also returned by &lt;code&gt;GET /v1/models&lt;/code&gt; for a Smart API Key on the day we wrote this, and that is the same list the extension loads. Which ones appear in your picker depends on what your account can reach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Explore with a fast model.&lt;/strong&gt; Pick &lt;code&gt;gemini-3.5-flash&lt;/code&gt; and ask:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Summarize what src/billing/ does and list every place we compute a rounded price.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cheap, quick, and good enough to map a folder.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Refactor with a frontier model in agent mode.&lt;/strong&gt; Switch the picker to &lt;code&gt;claude-opus-5-5&lt;/code&gt;, switch the chat to agent mode, and ask:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Extract the rounding logic you found into src/billing/round.ts, update every caller, and add unit tests.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is where streaming plus tool calling matters: the model reads files, proposes edits, and runs through the change set the way agent mode normally does.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Get a second opinion.&lt;/strong&gt; Switch to &lt;code&gt;gpt-6.1-sol&lt;/code&gt; and ask:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Review the diff in this workspace. Look for behavior changes in rounding at .5 boundaries.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A different model family reviewing another one's work catches a surprising number of edge cases.&lt;/p&gt;

&lt;p&gt;Three vendors, one key, one bill. Every request shows up in the &lt;a href="https://modelflare.dev/usage-logs" rel="noopener noreferrer"&gt;usage logs&lt;/a&gt;, billed with the multiplier of the group that actually served it, and the log records the resolved group and strategy (&lt;a href="https://docs.modelflare.dev/guides/usage-and-cost/" rel="noopener noreferrer"&gt;Usage and cost&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;For reference, here are a dozen-plus text model IDs that were both in the live catalog and in a Smart API Key's &lt;code&gt;GET /v1/models&lt;/code&gt; response on the day we wrote this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Family&lt;/th&gt;
&lt;th&gt;Example IDs&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;OpenAI GPT&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;gpt-6.1-sol&lt;/code&gt;, &lt;code&gt;gpt-6-sol&lt;/code&gt;, &lt;code&gt;gpt-5.5&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Anthropic Claude&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;claude-opus-5-5&lt;/code&gt;, &lt;code&gt;claude-sonnet-5-5&lt;/code&gt;, &lt;code&gt;claude-haiku-5-5&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Gemini&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;gemini-3.8-flash&lt;/code&gt;, &lt;code&gt;gemini-3.5-flash&lt;/code&gt;, &lt;code&gt;gemini-3.1-pro-preview&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;xAI Grok&lt;/td&gt;
&lt;td&gt;&lt;code&gt;grok-4.7&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;deepseek-v4-pro&lt;/code&gt;, &lt;code&gt;deepseek-v4-flash&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Others&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;kimi-k3&lt;/code&gt;, &lt;code&gt;glm-5.3&lt;/code&gt;, &lt;code&gt;qwen3.8-max&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Treat this as a snapshot. The picker is the source of truth for your account, and &lt;a href="https://modelflare.dev/pricing" rel="noopener noreferrer"&gt;Models &amp;amp; Pricing&lt;/a&gt; is the source of truth for prices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tips
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Refresh after a release.&lt;/strong&gt; When a new model lands, run &lt;strong&gt;Modelflare: Refresh Modelflare Models&lt;/strong&gt;. The key itself needs no edit: a Smart API Key has no per-model allowlist and always follows your account's current access.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use the strategy, not a second key.&lt;/strong&gt; If you want cheaper defaults for a side project and maximum stability for work, change the strategy, or create two Smart API Keys with different strategies. You do not need provider-specific keys.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do not build your own fallback list.&lt;/strong&gt; A Smart API Key already walks every group your account can use. Ordered fallback chains are for ordinary keys; see &lt;a href="https://docs.modelflare.dev/guides/features/group-failover/" rel="noopener noreferrer"&gt;Group failover&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pick the model per task, not per day.&lt;/strong&gt; The cost difference between a flash-class model and a frontier model is large. Defaulting to a fast model and switching up only for the hard step is the habit this setup makes cheap.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Read errors literally.&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;401&lt;/code&gt;: the key is missing or invalid. Create a Smart API Key at &lt;a href="https://modelflare.dev/keys" rel="noopener noreferrer"&gt;modelflare.dev/keys&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;model_not_found&lt;/code&gt;: a regular key only calls its own group's models. If you already use a Smart API Key, that model is not available to your account right now.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;403 insufficient_user_quota&lt;/code&gt;: top up at &lt;a href="https://modelflare.dev/billing" rel="noopener noreferrer"&gt;modelflare.dev/billing&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Slow model list from mainland China?&lt;/strong&gt; Set &lt;code&gt;modelflare.baseUrl&lt;/code&gt; to &lt;code&gt;china&lt;/code&gt;. Since 0.1.2, the extension's public catalog request times out after 8 seconds and falls back to the key's own model list, so the picker no longer hangs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Want images and video too?&lt;/strong&gt; The VS Code extension covers text models. For media generation in an agent, see the &lt;a href="https://docs.modelflare.dev/guides/clients/media-skill/" rel="noopener noreferrer"&gt;Media Skill&lt;/a&gt; or the &lt;a href="https://www.npmjs.com/package/@modelflare/mcp-server" rel="noopener noreferrer"&gt;&lt;code&gt;@modelflare/mcp-server&lt;/code&gt;&lt;/a&gt; package.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to go next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Install: &lt;a href="https://marketplace.visualstudio.com/items?itemName=modelflare.modelflare-vscode" rel="noopener noreferrer"&gt;VS Code Marketplace&lt;/a&gt; Â· &lt;a href="https://open-vsx.org/extension/modelflare/modelflare-vscode" rel="noopener noreferrer"&gt;Open VSX&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source and changelog: &lt;a href="https://github.com/castaly-ai/modelflare-vscode" rel="noopener noreferrer"&gt;github.com/castaly-ai/modelflare-vscode&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Smart API Key: &lt;a href="https://docs.modelflare.dev/guides/features/smart-api-key/" rel="noopener noreferrer"&gt;docs.modelflare.dev/guides/features/smart-api-key&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Models and groups: &lt;a href="https://docs.modelflare.dev/guides/models-and-groups/" rel="noopener noreferrer"&gt;docs.modelflare.dev/guides/models-and-groups&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Text models: &lt;a href="https://docs.modelflare.dev/models/text/" rel="noopener noreferrer"&gt;docs.modelflare.dev/models/text&lt;/a&gt; Â· Live catalog: &lt;a href="https://modelflare.dev/pricing" rel="noopener noreferrer"&gt;modelflare.dev/pricing&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Platform features: &lt;a href="https://docs.modelflare.dev/guides/features/" rel="noopener noreferrer"&gt;docs.modelflare.dev/guides/features&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The model picker was always the right place to choose a model. With one key behind it, choosing is finally cheap enough to do on every task.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Disclosure: I'm part of the Modelflare team, which builds the AI API gateway mentioned in this article.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>vscode</category>
      <category>ai</category>
      <category>llm</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Claude vs Gemini vs GPT: What a 2026 Study of 26 AI Models Reveals About Long Context</title>
      <dc:creator>Egor</dc:creator>
      <pubDate>Wed, 14 Oct 2026 14:28:14 +0000</pubDate>
      <link>https://dev.to/coffee1337/claude-vs-gemini-vs-gpt-what-a-2026-study-of-26-ai-models-reveals-about-long-context-57i</link>
      <guid>https://dev.to/coffee1337/claude-vs-gemini-vs-gpt-what-a-2026-study-of-26-ai-models-reveals-about-long-context-57i</guid>
      <description>&lt;p&gt;&lt;em&gt;26 AI models. 6,438 evaluation instances. Contexts up to 1 million tokens. The results challenge how we compare modern language models.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Imagine giving an AI assistant an entire software repository.&lt;/p&gt;

&lt;p&gt;Thousands of files. Hundreds of modules. API documentation, database schemas, and years of development history.&lt;/p&gt;

&lt;p&gt;The model accepts everything without complaining.&lt;/p&gt;

&lt;p&gt;You ask it to identify a subtle architectural problem.&lt;/p&gt;

&lt;p&gt;It confidently provides an answer.&lt;/p&gt;

&lt;p&gt;But is that answer actually reliable?&lt;/p&gt;

&lt;p&gt;In 2026, the question is no longer simply whether a language model can accept a million tokens.&lt;/p&gt;

&lt;p&gt;The more interesting question is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much of that context can the model actually use correctly?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A recent research paper, &lt;em&gt;ATLAS: All-round Testing of Long-context Abilities across Scales&lt;/em&gt;, provides some surprising answers.&lt;/p&gt;

&lt;p&gt;The researchers evaluated 26 models on 6,438 instances across eight capability dimensions, considering input lengths from 8K to 1M tokens.&lt;/p&gt;

&lt;p&gt;One finding stands out:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Gemini 3.1 Pro Preview led at 128K, but Claude Opus 4.6 led at 1M.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The best model depends on how you measure it.&lt;/p&gt;

&lt;p&gt;Let's examine what the researchers tested, what their results actually mean, and why these findings matter for developers building real AI systems.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Research note: This article analyzes published 2026 research. It is not an independent benchmark, and it does not claim that the author personally tested all 26 models.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  1. The Problem With AI Benchmarks
&lt;/h2&gt;

&lt;p&gt;When comparing language models, we often see a familiar table:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Context window&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Model A&lt;/td&gt;
&lt;td&gt;128K&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model B&lt;/td&gt;
&lt;td&gt;256K&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Model C&lt;/td&gt;
&lt;td&gt;1M&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The implication seems obvious.&lt;/p&gt;

&lt;p&gt;Model C can process more information, so it must be better at large-document tasks.&lt;/p&gt;

&lt;p&gt;But this reasoning contains a hidden assumption:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That accepting more information means using that information effectively.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Consider two different tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task A: Simple retrieval&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A document contains the sentence:&lt;/p&gt;

&lt;p&gt;"The deployment identifier is QZ-7194."&lt;/p&gt;

&lt;p&gt;The model is asked to retrieve that identifier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task B: Complex reasoning&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A repository contains dozens of service definitions, configuration files, and dependency relationships.&lt;/p&gt;

&lt;p&gt;The model must identify which changes could introduce a security regression.&lt;/p&gt;

&lt;p&gt;The second task requires much more than finding one string.&lt;/p&gt;

&lt;p&gt;It may involve combining evidence from many locations, resolving contradictions, and understanding dependencies.&lt;/p&gt;

&lt;p&gt;A model that performs well on Task A might struggle on Task B.&lt;/p&gt;

&lt;p&gt;That's exactly why evaluating long-context AI requires more than a single benchmark number.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. ATLAS: A Different Way to Measure Long-Context Intelligence
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Research:&lt;/strong&gt; &lt;em&gt;ATLAS: All-round Testing of Long-context Abilities across Scales&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Deli Huang and colleagues&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Published:&lt;/strong&gt; May 27, 2026&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paper:&lt;/strong&gt; &lt;a href="https://arxiv.org/abs/2605.28079" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2605.28079&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The ATLAS researchers investigated two major weaknesses in traditional long-context evaluation.&lt;/p&gt;

&lt;p&gt;First, model performance can deteriorate as input length increases.&lt;/p&gt;

&lt;p&gt;Second, success on foundational tasks such as retrieval does not necessarily transfer to more complex application workloads.&lt;/p&gt;

&lt;p&gt;Their framework introduces several methodological improvements.&lt;/p&gt;

&lt;h3&gt;
  
  
  Evaluating across context lengths
&lt;/h3&gt;

&lt;p&gt;Instead of measuring performance at only one input size, ATLAS considers scores across a predefined context-length grid, from 8K to 1M tokens.&lt;/p&gt;

&lt;p&gt;This makes it possible to analyze how performance changes as more information enters the prompt.&lt;/p&gt;

&lt;p&gt;A model that performs exceptionally well at 128K may deteriorate more sharply than another model at longer lengths.&lt;/p&gt;

&lt;h3&gt;
  
  
  Separating foundational abilities from applications
&lt;/h3&gt;

&lt;p&gt;ATLAS distinguishes foundational operations from downstream workloads.&lt;/p&gt;

&lt;p&gt;This matters because retrieving information and applying it correctly are different capabilities.&lt;/p&gt;

&lt;p&gt;For instance, a model may identify relevant functions in a repository without understanding how they interact.&lt;/p&gt;

&lt;h3&gt;
  
  
  Measuring balanced performance
&lt;/h3&gt;

&lt;p&gt;The researchers introduce ATLAScore, a harmonic-mean-based aggregate across capability categories.&lt;/p&gt;

&lt;p&gt;This is intended to penalize highly imbalanced capability profiles.&lt;/p&gt;

&lt;p&gt;A model that dominates one task but struggles on others should not automatically receive the strongest overall evaluation.&lt;/p&gt;

&lt;p&gt;The framework also includes uncertainty propagation when computing its final aggregate scores.&lt;/p&gt;

&lt;p&gt;Together, these changes provide a more nuanced picture than a single retrieval accuracy number.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. The Result: The Leader Changes at 1 Million Tokens
&lt;/h2&gt;

&lt;p&gt;One of the most interesting findings concerns model rankings.&lt;/p&gt;

&lt;p&gt;According to the ATLAS paper:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Evaluation scope&lt;/th&gt;
&lt;th&gt;Leading model&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Up to 128K tokens&lt;/td&gt;
&lt;td&gt;Gemini 3.1 Pro Preview&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Up to 1M tokens&lt;/td&gt;
&lt;td&gt;Claude Opus 4.6&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7130pcshtryuxn2a7cjh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F7130pcshtryuxn2a7cjh.png" alt="ATLAS 2026: Claude vs Gemini long-context benchmark" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This does not mean Claude is universally better than Gemini.&lt;/p&gt;

&lt;p&gt;Nor does it mean Gemini is inherently unreliable.&lt;/p&gt;

&lt;p&gt;It means the relative ranking changes under the specific evaluation conditions used by ATLAS.&lt;/p&gt;

&lt;p&gt;The researchers also reported that &lt;strong&gt;seven models changed position by at least two ranking places&lt;/strong&gt; when the evaluation expanded from the 8K–128K range to the 8K–1M range.&lt;/p&gt;

&lt;p&gt;That's important.&lt;/p&gt;

&lt;p&gt;Imagine selecting a model for your application after reviewing results obtained only at 128K.&lt;/p&gt;

&lt;p&gt;Your production workload, however, frequently processes 600K-token documents.&lt;/p&gt;

&lt;p&gt;The benchmark you used may not reflect your actual operating conditions.&lt;/p&gt;

&lt;p&gt;And if models deteriorate at different rates, their relative performance at 600K may differ from their relative performance at 128K.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The key insight: model quality is not independent of context length.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A useful benchmark should measure the range your application actually uses.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Why Context Length Changes the Difficulty
&lt;/h2&gt;

&lt;p&gt;Let's examine a simplified example.&lt;/p&gt;

&lt;p&gt;Imagine this information appears inside a long repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;service_a.py:
Service A sends requests to Service B.

service_b.py:
Service B uses Database C.

config.yaml:
Database C has public network access enabled.

security_policy.md:
Production databases must not expose public access.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now ask:&lt;/p&gt;

&lt;p&gt;"Does Service A indirectly depend on a database with a potentially unsafe network configuration?"&lt;/p&gt;

&lt;p&gt;Answering correctly requires several steps.&lt;/p&gt;

&lt;p&gt;First, identify the dependency between Service A and Service B.&lt;/p&gt;

&lt;p&gt;Second, identify Service B's database.&lt;/p&gt;

&lt;p&gt;Third, find Database C's configuration.&lt;/p&gt;

&lt;p&gt;Finally, compare that configuration with the security policy.&lt;/p&gt;

&lt;p&gt;No single sentence contains the entire answer.&lt;/p&gt;

&lt;p&gt;As the context grows, the model must identify relevant information among more irrelevant material while preserving the connections between different pieces of evidence.&lt;/p&gt;

&lt;p&gt;This creates distinct possible failure modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Missing one of the necessary pieces of evidence&lt;/li&gt;
&lt;li&gt;Retrieving a similar but incorrect detail&lt;/li&gt;
&lt;li&gt;Correctly retrieving the evidence but connecting it incorrectly&lt;/li&gt;
&lt;li&gt;Producing a plausible conclusion unsupported by the source material&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The example is illustrative, not an ATLAS test case.&lt;/p&gt;

&lt;p&gt;But it demonstrates why longer context can increase difficulty even when every relevant document fits into the model's advertised context window.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Another 2026 Study Reveals a Deeper Problem
&lt;/h2&gt;

&lt;p&gt;ATLAS evaluates long-context capabilities across models and scales.&lt;/p&gt;

&lt;p&gt;A separate 2026 study, &lt;em&gt;CorpusQA: A 10 Million Token Benchmark for Corpus-Level Analysis and Reasoning&lt;/em&gt;, investigates a different question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can AI systems analyze entire collections of documents when the evidence is distributed throughout the collection?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authors:&lt;/strong&gt; Zhiyuan Lu and colleagues&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Originally published:&lt;/strong&gt; January 21, 2026&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Revised:&lt;/strong&gt; April 25, 2026&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Paper:&lt;/strong&gt; &lt;a href="https://arxiv.org/abs/2601.14952" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2601.14952&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;CorpusQA includes tasks involving financial, educational, and real-estate documents.&lt;/p&gt;

&lt;p&gt;Some questions require aggregating numerical information from many documents.&lt;/p&gt;

&lt;p&gt;For example, imagine analyzing hundreds of financial reports to identify every company satisfying several accounting conditions.&lt;/p&gt;

&lt;p&gt;A traditional retrieval system might find a few relevant documents.&lt;/p&gt;

&lt;p&gt;But if answering the question requires analyzing every company, retrieving only five documents is insufficient.&lt;/p&gt;

&lt;p&gt;This is a fundamentally different problem from finding one answer-bearing passage.&lt;/p&gt;

&lt;h3&gt;
  
  
  The published results
&lt;/h3&gt;

&lt;p&gt;CorpusQA evaluated several models at different context lengths.&lt;/p&gt;

&lt;p&gt;For Gemini 2.5 Pro, the authors reported:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Context length&lt;/th&gt;
&lt;th&gt;Overall accuracy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;128K&lt;/td&gt;
&lt;td&gt;80.19%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1M&lt;/td&gt;
&lt;td&gt;50.73%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5z0yyj2ny1jxtfw2x5tq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F5z0yyj2ny1jxtfw2x5tq.png" alt="CorpusQA 2026: Gemini 2.5 Pro accuracy decline from 128K to 1M tokens" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These results show a decline of 29.46 percentage points under the study's conditions.&lt;/p&gt;

&lt;p&gt;Importantly, CorpusQA evaluated Gemini 2.5 Pro, not Gemini 3.1 Pro.&lt;/p&gt;

&lt;p&gt;Its results cannot be directly substituted for the newer model's performance.&lt;/p&gt;

&lt;p&gt;But they illustrate how difficult corpus-level analysis can remain, even when a model supports very long inputs.&lt;/p&gt;

&lt;p&gt;The study also found that conventional retrieval-augmented generation performed poorly on tasks requiring globally distributed evidence.&lt;/p&gt;

&lt;p&gt;The lesson isn't that RAG is useless.&lt;/p&gt;

&lt;p&gt;It's that &lt;strong&gt;retrieving a handful of relevant chunks is not the same as analyzing an entire document collection.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Why Traditional RAG Can Fail on Global Questions
&lt;/h2&gt;

&lt;p&gt;A typical RAG pipeline looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User question
      |
      v
Vector search
      |
      v
Top-K relevant chunks
      |
      v
LLM
      |
      v
Generated answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works well when a question can be answered using a relatively small number of relevant passages.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;"What is the API rate limit?"&lt;/p&gt;

&lt;p&gt;A good retrieval system can locate the appropriate documentation paragraph and pass it to the model.&lt;/p&gt;

&lt;p&gt;Now consider another question:&lt;/p&gt;

&lt;p&gt;"Across all customer reports from the last year, which failure category increased the most?"&lt;/p&gt;

&lt;p&gt;The answer requires a global aggregation.&lt;/p&gt;

&lt;p&gt;Retrieving only the most semantically similar documents may exclude a large part of the dataset.&lt;/p&gt;

&lt;p&gt;No matter how capable the LLM is, it cannot correctly aggregate information it never receives.&lt;/p&gt;

&lt;p&gt;This is an information-coverage problem, not merely a language-model problem.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft0ymoxqlhpeclumpzyu0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ft0ymoxqlhpeclumpzyu0.png" alt="CorpusQA 2026: RAG vs Memory Agent performance at 1M tokens" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the CorpusQA evaluation at 1M tokens, standard RAG achieved 17.38% accuracy, compared with 44.95% for the Memory Agent approach using Gemini 2.5 Pro.&lt;/p&gt;

&lt;p&gt;This illustrates how different approaches to managing large document collections can significantly affect performance.&lt;/p&gt;

&lt;h3&gt;
  
  
  A better architecture for some analytical tasks
&lt;/h3&gt;

&lt;p&gt;For questions requiring exact aggregation, a structured processing pipeline may be more appropriate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Document collection
        |
        v
Information extraction
        |
        v
Structured records
        |
        v
SQL / analytical computation
        |
        v
Evidence verification
        |
        v
LLM-generated explanation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This design separates factual computation from language generation.&lt;/p&gt;

&lt;p&gt;The LLM can interpret the user's question and explain the result, while deterministic code handles calculations.&lt;/p&gt;

&lt;p&gt;Of course, the approach has its own limitations.&lt;/p&gt;

&lt;p&gt;Extraction errors, incomplete schemas, and stale data can still produce incorrect answers.&lt;/p&gt;

&lt;p&gt;But it creates opportunities to validate individual steps instead of relying entirely on one enormous prompt.&lt;/p&gt;




&lt;h2&gt;
  
  
  7. What About Vendor Benchmarks?
&lt;/h2&gt;

&lt;p&gt;Independent research is only one source of evidence.&lt;/p&gt;

&lt;p&gt;Model developers also publish technical evaluations.&lt;/p&gt;

&lt;p&gt;For example, Anthropic's &lt;em&gt;Claude Opus 4.6 System Card&lt;/em&gt; discusses long-context benchmarks such as MRCR and GraphWalks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Source:&lt;/strong&gt; &lt;a href="https://www.anthropic.com/system-cards" rel="noopener noreferrer"&gt;https://www.anthropic.com/system-cards&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;MRCR evaluates the ability to locate and distinguish between similar pieces of information across long inputs.&lt;/p&gt;

&lt;p&gt;GraphWalks examines structured reasoning over graph-like information represented within the context.&lt;/p&gt;

&lt;p&gt;These evaluations are useful because they test capabilities beyond ordinary question answering.&lt;/p&gt;

&lt;p&gt;However, developer-published benchmark results need careful interpretation.&lt;/p&gt;

&lt;p&gt;Providers may use different inference settings, reasoning budgets, input limits, filtering rules, or evaluation configurations.&lt;/p&gt;

&lt;p&gt;A benchmark score obtained under one provider's setup should not automatically be treated as directly comparable with an independent benchmark.&lt;/p&gt;

&lt;p&gt;In particular, the ability to answer a question using a long prompt depends on more than the model checkpoint.&lt;/p&gt;

&lt;p&gt;It can also depend on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reasoning budget&lt;/li&gt;
&lt;li&gt;Tool usage&lt;/li&gt;
&lt;li&gt;Prompt construction&lt;/li&gt;
&lt;li&gt;Context truncation&lt;/li&gt;
&lt;li&gt;Sampling configuration&lt;/li&gt;
&lt;li&gt;Dataset filtering&lt;/li&gt;
&lt;li&gt;Evaluation metrics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These differences can materially affect observed results.&lt;/p&gt;

&lt;p&gt;That's one reason ATLAS is interesting: its evaluation explicitly attempts to compare long-context capabilities across multiple tasks and lengths.&lt;/p&gt;




&lt;h2&gt;
  
  
  8. What This Means for AI Coding Assistants
&lt;/h2&gt;

&lt;p&gt;Consider an AI coding assistant with access to a large repository.&lt;/p&gt;

&lt;p&gt;There are two possible designs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Approach A: Put everything in the prompt
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Entire repository
       |
       v
Large context window
       |
       v
LLM response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is conceptually simple.&lt;/p&gt;

&lt;p&gt;But it can be expensive and may introduce large amounts of irrelevant information.&lt;/p&gt;

&lt;p&gt;It also doesn't guarantee that the model will correctly connect all important details.&lt;/p&gt;

&lt;h3&gt;
  
  
  Approach B: Search, inspect, and verify
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User question
      |
      v
Repository search
      |
      v
Relevant files
      |
      v
Dependency analysis
      |
      v
LLM reasoning
      |
      v
Tool-based verification
      |
      v
Final answer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This approach can use search tools, static analysis, tests, and targeted context retrieval.&lt;/p&gt;

&lt;p&gt;For some software engineering tasks, those tools may provide more reliable evidence than simply expanding the prompt.&lt;/p&gt;

&lt;p&gt;For instance, when checking whether a function is actually called, repository search can identify references.&lt;/p&gt;

&lt;p&gt;When checking whether a proposed patch works, an automated test can provide execution evidence.&lt;/p&gt;

&lt;p&gt;An LLM can assist with interpretation, but it doesn't have to perform every operation internally.&lt;/p&gt;

&lt;p&gt;The broader principle is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use the context window as one resource in an engineering system, not as a replacement for the system itself.&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  9. How I Would Benchmark Modern AI Models
&lt;/h2&gt;

&lt;p&gt;The published results suggest a practical evaluation protocol for comparing models on real development workflows.&lt;/p&gt;

&lt;p&gt;I would test each model across four dimensions.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test A: Context length
&lt;/h3&gt;

&lt;p&gt;Evaluate the same task family at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;8K
32K
128K
256K
512K
1M
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only include lengths genuinely supported by each tested model and API configuration.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test B: Evidence position
&lt;/h3&gt;

&lt;p&gt;Place answer-relevant information near the beginning, middle, and end of the input.&lt;/p&gt;

&lt;p&gt;Measure whether accuracy changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test C: Reasoning complexity
&lt;/h3&gt;

&lt;p&gt;Use several difficulty levels:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Level 1:&lt;/strong&gt; Retrieve one explicitly stated fact.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Level 2:&lt;/strong&gt; Connect information from two files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Level 3:&lt;/strong&gt; Combine evidence from several documents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Level 4:&lt;/strong&gt; Perform global analysis across an entire corpus.&lt;/p&gt;

&lt;h3&gt;
  
  
  Test D: Tool-assisted reasoning
&lt;/h3&gt;

&lt;p&gt;Compare direct long-context prompting against workflows using retrieval, code execution, or other verification tools.&lt;/p&gt;

&lt;p&gt;For every experiment, record:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Metric&lt;/th&gt;
&lt;th&gt;Why it matters&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Answer accuracy&lt;/td&gt;
&lt;td&gt;Measures correctness&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context length&lt;/td&gt;
&lt;td&gt;Reveals scale sensitivity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input/output tokens&lt;/td&gt;
&lt;td&gt;Measures resource usage&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Latency&lt;/td&gt;
&lt;td&gt;Measures responsiveness&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cost&lt;/td&gt;
&lt;td&gt;Measures practical efficiency&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Evidence completeness&lt;/td&gt;
&lt;td&gt;Checks whether necessary information was found&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Model versions and inference settings should be fixed and documented.&lt;/p&gt;

&lt;p&gt;Tasks should be repeated using multiple independent examples, with uncertainty estimates reported alongside aggregate scores.&lt;/p&gt;

&lt;p&gt;This is a proposed experimental design, not a claim that these tests have already been run for this article.&lt;/p&gt;




&lt;h2&gt;
  
  
  10. Limitations and Research Caveats
&lt;/h2&gt;

&lt;p&gt;There are several reasons to interpret these findings carefully.&lt;/p&gt;

&lt;p&gt;First, &lt;strong&gt;ATLAS is a May 2026 preprint&lt;/strong&gt;. Its results are useful research evidence, but they should not be mistaken for a universally accepted model ranking.&lt;/p&gt;

&lt;p&gt;Second, the comparison covers a specific collection of 26 models and evaluation settings. It does not establish the performance of every model released later in 2026.&lt;/p&gt;

&lt;p&gt;Third, CorpusQA evaluates a different set of models and tasks. Its numerical results cannot be directly compared with ATLAS scores.&lt;/p&gt;

&lt;p&gt;Fourth, performance at 1M tokens may involve implementation-specific constraints, including inference settings and context handling.&lt;/p&gt;

&lt;p&gt;Finally, benchmark results do not automatically predict real-world performance.&lt;/p&gt;

&lt;p&gt;An AI system answering legal questions, writing code, analyzing scientific papers, or processing financial records may require very different capabilities.&lt;/p&gt;

&lt;p&gt;The correct model and architecture should be selected through task-specific evaluation.&lt;/p&gt;




&lt;h2&gt;
  
  
  Conclusion: We Need Better Questions Than "How Many Tokens?"
&lt;/h2&gt;

&lt;p&gt;The rapid growth of context windows is an important technological achievement.&lt;/p&gt;

&lt;p&gt;But the 2026 research tells a more complicated story.&lt;/p&gt;

&lt;p&gt;The ATLAS study found that model rankings change when evaluation extends toward one million tokens.&lt;/p&gt;

&lt;p&gt;CorpusQA demonstrated the difficulty of analyzing large document collections when relevant evidence is dispersed across many sources.&lt;/p&gt;

&lt;p&gt;Together, these studies suggest that increasing context capacity alone is not enough to guarantee reliable information processing.&lt;/p&gt;

&lt;p&gt;For developers, the practical implications are straightforward:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't select an LLM based only on advertised context size.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Evaluate it at the lengths your application actually uses.&lt;/p&gt;

&lt;p&gt;Test retrieval and reasoning separately.&lt;/p&gt;

&lt;p&gt;Measure the quality of evidence, not only the fluency of the generated answer.&lt;/p&gt;

&lt;p&gt;And consider whether structured tools, retrieval systems, or deterministic computation can make your application more reliable.&lt;/p&gt;

&lt;p&gt;The future of long-context AI may not be about putting everything into one prompt.&lt;/p&gt;

&lt;p&gt;It may be about building systems that know &lt;strong&gt;what to retrieve, what to remember, what to compute, and what to verify.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A million-token context window is a capability.&lt;/p&gt;

&lt;p&gt;Reliable reasoning over a million tokens is a different achievement.&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;[1] ATLAS — All-round Testing of Long-context Abilities across Scales (2026)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Deli Huang et al.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://arxiv.org/abs/2605.28079" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2605.28079&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[2] CorpusQA — A 10 Million Token Benchmark for Corpus-Level Analysis and Reasoning (2026)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Zhiyuan Lu et al.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://arxiv.org/abs/2601.14952" rel="noopener noreferrer"&gt;https://arxiv.org/abs/2601.14952&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[3] Claude Opus 4.6 System Card (2026)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Anthropic.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.anthropic.com/system-cards" rel="noopener noreferrer"&gt;https://www.anthropic.com/system-cards&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Discussion
&lt;/h2&gt;

&lt;p&gt;Do you think future AI systems will rely primarily on larger context windows, or will retrieval, memory, and tool-assisted reasoning become more important?&lt;/p&gt;

&lt;p&gt;And have you encountered cases where an LLM missed important information even though it was present in the prompt?&lt;/p&gt;

&lt;p&gt;I'd be interested in hearing about real-world experiences.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/coffee1337" rel="noopener noreferrer"&gt;https://github.com/coffee1337&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Portfolio:&lt;/strong&gt; &lt;a href="https://coffee1337.github.io/" rel="noopener noreferrer"&gt;https://coffee1337.github.io/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>openai</category>
    </item>
    <item>
      <title>Agentes LLM: diseña una señal de email confiable</title>
      <dc:creator>Silviu Technology</dc:creator>
      <pubDate>Wed, 14 Oct 2026 14:24:51 +0000</pubDate>
      <link>https://dev.to/silviutech/agentes-llm-disena-una-senal-de-email-confiable-4ip8</link>
      <guid>https://dev.to/silviutech/agentes-llm-disena-una-senal-de-email-confiable-4ip8</guid>
      <description>&lt;p&gt;Un agente LLM puede registrarse, pedir un código y responder “hecho” aunque la verificación no haya terminado. Tal vez leyó un mensaje viejo, interpretó un &lt;code&gt;200 OK&lt;/code&gt; como entrega confirmada o cerró la tarea después de un error. El texto final suena convincente, pero no es evidencia.&lt;/p&gt;

&lt;p&gt;En los flujos de email, la señal de finalización debe venir de eventos observables. Este patrón propone separar tres cosas: la intención del agente, la entrega del mensaje y la prueba de que el mensaje correcto fue consumido. Es especialmente útil al combinar modelos LLM con un fake emails generator o con un buzón temporal para pruebas.&lt;/p&gt;

&lt;h2&gt;
  
  
  El problema: el agente puede acertar por casualidad
&lt;/h2&gt;

&lt;p&gt;Imagina esta secuencia:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;El agente crea una cuenta de prueba.&lt;/li&gt;
&lt;li&gt;La aplicación solicita el envío de un enlace.&lt;/li&gt;
&lt;li&gt;El agente consulta el inbox.&lt;/li&gt;
&lt;li&gt;Extrae un token y lo usa.&lt;/li&gt;
&lt;li&gt;El evaluador mira la respuesta final.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;El paso cinco no debería depender solo de lo que el modelo dice. Si el buzón se comparte entre ejecuciones, un correo atrasado puede hacer que una prueba pase. Si el endpoint responde antes de que la cola entregue el mensaje, el agente puede reintentar una acción que en realidad ya se realizó.&lt;/p&gt;

&lt;p&gt;También conviene manejar con cuidado búsquedas ambiguas como &lt;code&gt;tamp mail com&lt;/code&gt;. Ese texto puede aparecer en una consulta, pero nunca debe convertirse en configuración, dirección de prueba o criterio para aceptar un mensaje.&lt;/p&gt;

&lt;h2&gt;
  
  
  Define una señal de finalización observable
&lt;/h2&gt;

&lt;p&gt;Una señal útil combina varios hechos pequeños:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;existe una ejecución con un &lt;code&gt;run_id&lt;/code&gt; único;&lt;/li&gt;
&lt;li&gt;el mensaje llegó al buzón asignado a esa ejecución;&lt;/li&gt;
&lt;li&gt;el asunto, destinatario y tipo de evento coinciden con lo esperado;&lt;/li&gt;
&lt;li&gt;el token fue usado una sola vez;&lt;/li&gt;
&lt;li&gt;la aplicación confirmó el estado final;&lt;/li&gt;
&lt;li&gt;el buzón se cerró o expiró con una razón registrada.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;En forma de diagrama de palabras:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;intención del agente
        ↓
acción de aplicación → evento de entrega → mensaje coincidente
        ↓                                      ↓
respuesta de API ← estado verificado ← consumo del token
        ↓
recibo de ejecución
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Diseña el contrato de la herramienta
&lt;/h2&gt;

&lt;p&gt;El agente necesita una interfaz pequeña y predecible:&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;"create_inbox"&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;"run_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;"eval-1842"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nl"&gt;"ttl_seconds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;900&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"list_messages"&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;"after"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2026-10-14T14:00:00Z"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"read_message"&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;"message_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;"msg-73"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"close_inbox"&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;"reason"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"verified"&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;Cada acción debería devolver un estado explícito. &lt;code&gt;message_not_found&lt;/code&gt;, &lt;code&gt;inbox_expired&lt;/code&gt; y &lt;code&gt;rate_limited&lt;/code&gt; tienen consecuencias diferentes; un &lt;code&gt;false&lt;/code&gt; genérico empuja al modelo a improvisar.&lt;/p&gt;

&lt;p&gt;El contrato también debe declarar qué campos son confiables. El asunto normalizado, el &lt;code&gt;message_id&lt;/code&gt;, el &lt;code&gt;received_at&lt;/code&gt; y el &lt;code&gt;run_id&lt;/code&gt; sirven para correlacionar. El cuerpo del email puede contener instrucciones no confiables, así que no debería poder cambiar las reglas de la evaluación.&lt;/p&gt;

&lt;p&gt;Para la capa de interfaz, vale la pena estudiar &lt;a href="https://dev.to/silviutech/react-ayuda-de-email-que-no-roba-foco-422k"&gt;una ayuda de email que no roba el foco&lt;/a&gt;: el mismo principio de estados explícitos ayuda a que una UI no presente como éxito algo que aún está esperando.&lt;/p&gt;

&lt;h2&gt;
  
  
  Aísla el buzón y limita los reintentos
&lt;/h2&gt;

&lt;p&gt;El aislamiento debe ser por ejecución, no por modelo. Dos agentes usando el mismo prompt siguen necesitando buzones separados porque sus tiempos de entrega no serán idénticos.&lt;/p&gt;

&lt;p&gt;Asigna un TTL desde fuera del agente y un presupuesto de lecturas. Por ejemplo, permitir seis consultas en tres minutos es más fácil de razonar que “espera hasta que aparezca algo”. Un reintento puede ser válido ante un error de red; no lo es necesariamente ante un asunto que no coincide.&lt;/p&gt;

&lt;p&gt;Registra cada intento de lectura con su motivo:&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;"run_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;"eval-1842"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"attempt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"result"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"message_not_found"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"next_action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"retry_after_backoff"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"remaining_seconds"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;96&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;Si la entrega no sucede a tiempo, termina con &lt;code&gt;delivery_timeout&lt;/code&gt;. No conviertas el silencio en una respuesta inventada. Para probar el lado asíncrono sin depender siempre de un proveedor real, las &lt;a href="https://dev.to/oliviachen7/fastapi-fixtures-de-email-para-tests-reproducibles-3nop"&gt;fixtures de email reproducibles en FastAPI&lt;/a&gt; ofrecen una referencia práctica para separar datos, estados y limpieza.&lt;/p&gt;

&lt;h2&gt;
  
  
  Un flujo mínimo con recibo de ejecución
&lt;/h2&gt;

&lt;p&gt;El orquestador puede implementar este recorrido:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Crear &lt;code&gt;run_id&lt;/code&gt; y buzón con TTL.&lt;/li&gt;
&lt;li&gt;Ejecutar al agente con la herramienta limitada.&lt;/li&gt;
&lt;li&gt;Validar el evento de entrega y el mensaje esperado.&lt;/li&gt;
&lt;li&gt;Consumir el token y confirmar el estado en la aplicación.&lt;/li&gt;
&lt;li&gt;Escribir un recibo con éxito o causa de fallo.&lt;/li&gt;
&lt;li&gt;Cerrar el buzón, incluso si el agente fue cancelado.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Un recibo pequeño sería suficiente:&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;"run_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;"eval-1842"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"agent_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"checkout-agent-12"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"message_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;"msg-73"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"verification"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"passed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"tool_errors"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"closed_reason"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"verified"&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;No guardes el cuerpo completo por defecto. Un hash, el asunto y los identificadores de correlación suelen bastar para depurar. Si necesitas conservar contenido, redáctalo antes de enviarlo a los logs y define cuándo se elimina; la retención indefinida se vuelve un problema muy pronto.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tradeoffs y puntos de comprobación
&lt;/h2&gt;

&lt;p&gt;Un buzón real prueba más integración, pero cuesta más tiempo y añade fallos externos. Un servidor simulado es rápido y determinista, pero puede esconder problemas de entrega. Usa simulación para contratos y un buzón aislado para algunas pruebas de integración.&lt;/p&gt;

&lt;p&gt;Antes de evaluar el modelo completo, comprueba por separado:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;la aplicación emite el evento correcto;&lt;/li&gt;
&lt;li&gt;la herramienta filtra por &lt;code&gt;run_id&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;el consumidor rechaza mensajes viejos;&lt;/li&gt;
&lt;li&gt;el cierre ocurre después de éxito y después de timeout;&lt;/li&gt;
&lt;li&gt;el recibo distingue infraestructura, aplicación y agente.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Así una regresión no queda etiquetada como “fallo del LLM” solo porque el proveedor de email estaba lento. El diagnóstico sale mas limpio y las comparaciones entre prompts son más justas.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preguntas frecuentes
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;¿Es obligatorio usar un correo temporal en cada prueba?&lt;/strong&gt; No. Para lógica de dominio, un mock suele ser suficiente. Usa un buzón aislado cuando quieras probar la integración real de entrega y lectura.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;¿Cuántos reintentos debería permitir?&lt;/strong&gt; Depende de la latencia esperada y del objetivo, pero debe ser un límite externo, visible en el recibo y finito. El agente no debe ampliar su propio presupuesto.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;¿Dónde encaja temp mail email en este diseño?&lt;/strong&gt; Puede ser una etiqueta contextual para encontrar un servicio de prueba en un entorno controlado; el enlace a &lt;a href="https://tempmailso.com" rel="noopener noreferrer"&gt;temp mail email&lt;/a&gt; debe mantenerse como una referencia puntual, no como una sustitución del contrato ni de la validación.&lt;/p&gt;

&lt;p&gt;La idea central es sencilla: un agente confiable no se evalúa por sonar seguro. Se evalúa por producir una cadena verificable de intención, entrega, consumo y cierre. Con límites claros, la automatización se vuelve repetible.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>automation</category>
      <category>testing</category>
    </item>
    <item>
      <title>I finally cut AI context bloat by 80% and the fix was embarrassingly simple</title>
      <dc:creator>Lars Winstand</dc:creator>
      <pubDate>Wed, 14 Oct 2026 14:12:07 +0000</pubDate>
      <link>https://dev.to/lars_winstand/i-finally-cut-ai-context-bloat-by-80-and-the-fix-was-embarrassingly-simple-1mlp</link>
      <guid>https://dev.to/lars_winstand/i-finally-cut-ai-context-bloat-by-80-and-the-fix-was-embarrassingly-simple-1mlp</guid>
      <description>&lt;p&gt;A few months ago I watched an agent do something deeply cursed.&lt;/p&gt;

&lt;p&gt;It had already fetched the data.&lt;br&gt;
It had already parsed the data.&lt;br&gt;
It had already stored the useful fields.&lt;/p&gt;

&lt;p&gt;And then it pasted the entire raw tool response into the next model call anyway.&lt;/p&gt;

&lt;p&gt;Full JSON blobs. Logs. Metadata. Useless fields. Everything.&lt;/p&gt;

&lt;p&gt;The next step got slower.&lt;br&gt;
The step after that got more expensive.&lt;br&gt;
Then the model started doing that annoying thing where it answers the easy part of the task and quietly ignores the important part.&lt;/p&gt;

&lt;p&gt;That was the moment the bug became obvious:&lt;/p&gt;

&lt;p&gt;Most “context window problems” are not model problems.&lt;br&gt;
They are state management problems.&lt;/p&gt;

&lt;p&gt;Once you see that, you start spotting it everywhere in n8n flows, LangGraph agents, MCP tool loops, and custom OpenAI-compatible orchestration code.&lt;/p&gt;
&lt;h2&gt;
  
  
  The actual fix
&lt;/h2&gt;

&lt;p&gt;Stop replaying raw tool output into every prompt.&lt;/p&gt;

&lt;p&gt;Keep full results in structured state outside the model.&lt;br&gt;
Send only:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a short summary&lt;/li&gt;
&lt;li&gt;the exact fields needed for the next step&lt;/li&gt;
&lt;li&gt;or the exact evidence slice if verification matters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That one change usually does more for agent quality than switching from one frontier model to another.&lt;/p&gt;
&lt;h2&gt;
  
  
  The anti-pattern
&lt;/h2&gt;

&lt;p&gt;Here’s the bad version:&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;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_forecast&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Austin&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="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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&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;user&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;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Use this API response to decide whether to send an alert:&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="si"&gt;}&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;If &lt;code&gt;result&lt;/code&gt; contains 200 lines of hourly forecast data, provider metadata, timestamps, debug fields, and trace IDs, you just turned your prompt into a junk drawer.&lt;/p&gt;

&lt;p&gt;Now the model has to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;find the relevant fields&lt;/li&gt;
&lt;li&gt;ignore the irrelevant ones&lt;/li&gt;
&lt;li&gt;remember prior steps&lt;/li&gt;
&lt;li&gt;plan the next action&lt;/li&gt;
&lt;li&gt;not get distracted by noise&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Models can do this.&lt;br&gt;
They are just not especially efficient at it.&lt;/p&gt;
&lt;h2&gt;
  
  
  The better pattern
&lt;/h2&gt;

&lt;p&gt;Store the full result in app state.&lt;br&gt;
Pass only the fields the next step needs.&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;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;weather_api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get_forecast&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Austin&lt;/span&gt;&lt;span class="sh"&gt;"&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;weather_raw&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="n"&gt;result&lt;/span&gt;

&lt;span class="n"&gt;weather_summary&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;temperature_f&lt;/span&gt;&lt;span class="sh"&gt;"&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;current&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;temp_f&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;conditions&lt;/span&gt;&lt;span class="sh"&gt;"&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;current&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;condition&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;wind_alert&lt;/span&gt;&lt;span class="sh"&gt;"&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;alerts&lt;/span&gt;&lt;span class="sh"&gt;"&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="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;wind&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)&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="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;role&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;user&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;content&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Decide whether to send an alert using this data: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;weather_summary&lt;/span&gt;&lt;span class="si"&gt;}&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;Same workflow.&lt;br&gt;
Smaller prompt.&lt;br&gt;
Less distraction.&lt;br&gt;
Better odds the model focuses on the decision instead of re-parsing junk.&lt;/p&gt;
&lt;h2&gt;
  
  
  Prompt size is not the same as prompt quality
&lt;/h2&gt;

&lt;p&gt;A lot of builders confuse these two ideas:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the model can fit a long context&lt;/li&gt;
&lt;li&gt;the model should receive a long context&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those are not the same.&lt;/p&gt;

&lt;p&gt;A giant prompt is often just a badly managed state store wearing a trench coat.&lt;/p&gt;

&lt;p&gt;Even when GPT-5, Claude Opus, Grok, Qwen, or Llama can technically accept the full history, performance still gets mushier as stale content piles up. Latency rises. Cost rises. Attention gets diffused.&lt;/p&gt;

&lt;p&gt;This is why long-running agents often feel smart for 5 steps and weirdly flaky by step 20.&lt;/p&gt;
&lt;h2&gt;
  
  
  The 3 patterns, ranked
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;What happens in practice&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Raw tool output in prompt&lt;/td&gt;
&lt;td&gt;Biggest prompt growth. Highest distraction. Latency and cost climb every step.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Summarized tool result in prompt&lt;/td&gt;
&lt;td&gt;Usually the best balance. Smaller prompt footprint, but bad summaries can hide edge cases.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Structured state outside prompt&lt;/td&gt;
&lt;td&gt;Best default for multi-step agents. Small recurring prompts, cleaner reasoning, better orchestration.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;My opinionated take: structured state outside the prompt should be the default.&lt;/p&gt;

&lt;p&gt;If you are building anything more serious than a toy bot, replaying raw tool output into every step is lazy architecture.&lt;/p&gt;
&lt;h2&gt;
  
  
  What should live where?
&lt;/h2&gt;

&lt;p&gt;This is the mental model I wish more agent builders started with:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Short-term conversational state stays attached to the thread.&lt;/li&gt;
&lt;li&gt;Long-term facts and tool results live outside the prompt in a database or memory store.&lt;/li&gt;
&lt;li&gt;The next model call gets only the smallest useful slice of that state.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That’s it.&lt;/p&gt;

&lt;p&gt;Not complicated. Just disciplined.&lt;/p&gt;
&lt;h2&gt;
  
  
  Real examples
&lt;/h2&gt;
&lt;h3&gt;
  
  
  LangGraph: checkpoint state, don’t replay transcripts
&lt;/h3&gt;

&lt;p&gt;LangGraph gets this right.&lt;/p&gt;

&lt;p&gt;Instead of stuffing previous tool output back into every prompt, persist graph state and resume by thread.&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="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;langgraph.checkpoint.postgres&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;PostgresSaver&lt;/span&gt;

&lt;span class="n"&gt;DB_URI&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;postgresql://postgres:postgres@localhost:5432/postgres?sslmode=disable&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="n"&gt;PostgresSaver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;from_conn_string&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;DB_URI&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;checkpointer&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;graph&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;checkpointer&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;checkpointer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is the grown-up version of memory.&lt;/p&gt;

&lt;p&gt;The model gets what the next node needs.&lt;br&gt;
Postgres keeps the rest.&lt;/p&gt;
&lt;h3&gt;
  
  
  n8n: trim memory on purpose
&lt;/h3&gt;

&lt;p&gt;n8n is refreshingly practical here.&lt;/p&gt;

&lt;p&gt;If you are building AI workflows in n8n, you already have the tools to avoid context bloat:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Simple Memory&lt;/li&gt;
&lt;li&gt;Redis&lt;/li&gt;
&lt;li&gt;Postgres&lt;/li&gt;
&lt;li&gt;Xata&lt;/li&gt;
&lt;li&gt;Zep&lt;/li&gt;
&lt;li&gt;Motorhead&lt;/li&gt;
&lt;li&gt;Chat Memory Manager&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The existence of Chat Memory Manager should tell you everything.&lt;/p&gt;

&lt;p&gt;If a workflow platform ships a node specifically to inspect and reduce memory, then “just append to chat history forever” is obviously not the best pattern.&lt;/p&gt;
&lt;h3&gt;
  
  
  MCP: tool output is app state first, prompt material second
&lt;/h3&gt;

&lt;p&gt;MCP makes this cleaner because tools already have structure.&lt;/p&gt;

&lt;p&gt;Example tool definition:&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;"get_weather"&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;"Get current weather information for a location"&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;"location"&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;"string"&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;"required"&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;"location"&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;"outputSchema"&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="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;That should push you toward a simple pattern:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;call the tool&lt;/li&gt;
&lt;li&gt;store the full structured result&lt;/li&gt;
&lt;li&gt;pass only the needed fields into the next prompt&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example:&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;tool_result&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;temperature&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;72F&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;conditions&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;cloudy&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;wind_alert&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;hourly&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;provider_metadata&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;trace_id&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;abc123&lt;/span&gt;&lt;span class="sh"&gt;"&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;weather_result&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="n"&gt;tool_result&lt;/span&gt;

&lt;span class="n"&gt;prompt_payload&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;temperature&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tool_result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;temperature&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;conditions&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tool_result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;conditions&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;wind_alert&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;tool_result&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;wind_alert&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The prompt becomes a working note, not a warehouse.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompt caching helps, but it does not fix bad context hygiene
&lt;/h2&gt;

&lt;p&gt;This part gets misunderstood a lot.&lt;/p&gt;

&lt;p&gt;Anthropic prompt caching is useful when you keep reusing the same stable prefix.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;system instructions&lt;/li&gt;
&lt;li&gt;tool definitions&lt;/li&gt;
&lt;li&gt;fixed documents&lt;/li&gt;
&lt;li&gt;repeated scaffolding&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It does not magically make a sloppy prompt good.&lt;/p&gt;

&lt;p&gt;Claude caching only helps when the prefix is identical, and cache entries last 5 minutes by default. That’s great for repeated prefixes. It does nothing to make a giant raw tool dump more relevant.&lt;/p&gt;

&lt;p&gt;If anything, caching can hide bad architecture for a while because the bill hurts less before quality problems become obvious.&lt;/p&gt;

&lt;p&gt;Example:&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="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;anthropic&lt;/span&gt;

&lt;span class="n"&gt;client&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;anthropic&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Anthropic&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;client&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="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;claude-opus-5-5&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;max_tokens&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1024&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;cache_control&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;type&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;ephemeral&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;system&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 an AI assistant tasked with analyzing literary works.&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="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;role&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;user&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;content&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;Analyze the major themes in Pride and Prejudice.&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="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use caching for stable prefixes.&lt;br&gt;
Do not use it as an excuse to keep shoving junk into prompts.&lt;/p&gt;

&lt;h2&gt;
  
  
  A quick before/after refactor
&lt;/h2&gt;

&lt;p&gt;Here’s what this looks like in a normal agent loop.&lt;/p&gt;

&lt;h3&gt;
  
  
  Before
&lt;/h3&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;run_step&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;user_request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;search_results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;search_docs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;crm_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;fetch_customer_record&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;customer_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;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    User request: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;user_request&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;

    Search results:
    &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;search_results&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;

    CRM data:
    &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;crm_data&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;

    Decide what to do next.
    &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;llm&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works at first.&lt;br&gt;
Then &lt;code&gt;search_results&lt;/code&gt; gets huge.&lt;br&gt;
Then &lt;code&gt;crm_data&lt;/code&gt; gets huge.&lt;br&gt;
Then every step drags around more baggage.&lt;/p&gt;

&lt;h3&gt;
  
  
  After
&lt;/h3&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;run_step&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;user_request&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;search_results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;search_docs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;user_request&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;crm_data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;fetch_customer_record&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;customer_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;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;search_results_raw&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="n"&gt;search_results&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;crm_data_raw&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="n"&gt;crm_data&lt;/span&gt;

    &lt;span class="n"&gt;prompt_payload&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;user_request&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_request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;top_matches&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="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;title&lt;/span&gt;&lt;span class="sh"&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;doc&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;search_results&lt;/span&gt;&lt;span class="p"&gt;[:&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;]],&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;customer_tier&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;crm_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tier&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;open_tickets&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;crm_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;open_tickets_count&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;billing_status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;crm_data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;billing_status&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="n"&gt;prompt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Decide what to do next using this state: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;prompt_payload&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;llm&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This version is less fragile.&lt;/p&gt;

&lt;p&gt;And when the model needs exact evidence later, you can pull the raw state back in selectively.&lt;/p&gt;

&lt;h2&gt;
  
  
  When should you keep raw output in the prompt?
&lt;/h2&gt;

&lt;p&gt;There are real exceptions.&lt;/p&gt;

&lt;p&gt;Sometimes the next step genuinely needs exact source material.&lt;/p&gt;

&lt;p&gt;Keep raw output in-context when you need:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;legal or compliance citations&lt;/li&gt;
&lt;li&gt;exact stack traces for debugging&lt;/li&gt;
&lt;li&gt;code review on full diffs&lt;/li&gt;
&lt;li&gt;extraction from messy text&lt;/li&gt;
&lt;li&gt;verification against original evidence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But even then, pass the exact slice that matters.&lt;br&gt;
Not the entire upstream universe.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule I use now
&lt;/h2&gt;

&lt;p&gt;This is the heuristic that cleaned up most of my agent workflows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If information is needed for reasoning, summarize it.&lt;/li&gt;
&lt;li&gt;If it is needed for retrieval, store it.&lt;/li&gt;
&lt;li&gt;If it is needed for verification, pass the exact slice.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That rule has saved me more latency, more cost, and more agent quality than swapping models ever did.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this matters even more when you pay per token
&lt;/h2&gt;

&lt;p&gt;This problem gets expensive fast in production.&lt;/p&gt;

&lt;p&gt;If your agent runs 24/7 in n8n, Make, Zapier, OpenClaw, or a custom loop, every extra blob you keep replaying becomes recurring cost.&lt;/p&gt;

&lt;p&gt;That’s one reason teams end up obsessing over token usage dashboards instead of fixing the architecture.&lt;/p&gt;

&lt;p&gt;A cleaner state design reduces prompt bloat at the source.&lt;/p&gt;

&lt;p&gt;And if you are using an OpenAI-compatible endpoint with flat monthly pricing, this gets even nicer because you can optimize for agent quality and throughput instead of constantly asking whether one more tool call is going to spike the bill.&lt;/p&gt;

&lt;p&gt;That’s the part I like about Standard Compute: it works as a drop-in OpenAI API replacement, so you can keep your existing SDKs and agent code, but stop thinking in per-token panic mode while you clean up orchestration.&lt;/p&gt;

&lt;p&gt;The architecture fix still matters.&lt;br&gt;
You just get to apply it without token anxiety hanging over every experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practical checklist
&lt;/h2&gt;

&lt;p&gt;If your agent feels slower and dumber over time, check these first:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Are you pasting raw tool output into every next prompt?&lt;/li&gt;
&lt;li&gt;Are you storing canonical results outside the model?&lt;/li&gt;
&lt;li&gt;Are you summarizing tool results before the next reasoning step?&lt;/li&gt;
&lt;li&gt;Are you passing exact evidence only when verification is required?&lt;/li&gt;
&lt;li&gt;Are you using prompt caching only for stable prefixes?&lt;/li&gt;
&lt;li&gt;Are you trimming memory in n8n or your orchestration layer?&lt;/li&gt;
&lt;li&gt;Are you treating the model like a reasoning engine instead of a database?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you fix just those, you will probably get a bigger improvement than another model bake-off.&lt;/p&gt;

&lt;p&gt;I went looking for a model fix.&lt;/p&gt;

&lt;p&gt;What I found was an architecture fix.&lt;/p&gt;

&lt;p&gt;Most “context window problems” are really just us using chat history as a storage layer.&lt;/p&gt;

&lt;p&gt;Once you stop shoving raw tool output back into the next prompt, agents get faster, cheaper, and noticeably less confused.&lt;/p&gt;

&lt;p&gt;Not because the models changed.&lt;/p&gt;

&lt;p&gt;Because we finally stopped making them carry our state management mistakes.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
      <category>devops</category>
    </item>
    <item>
      <title>How to Choose the Right AI Software Development Company in 2026?</title>
      <dc:creator>hoor ali</dc:creator>
      <pubDate>Wed, 14 Oct 2026 14:10:44 +0000</pubDate>
      <link>https://dev.to/hoor_ali_428d0ccd853d063e/how-to-choose-the-right-ai-software-development-company-in-2026-8kb</link>
      <guid>https://dev.to/hoor_ali_428d0ccd853d063e/how-to-choose-the-right-ai-software-development-company-in-2026-8kb</guid>
      <description>&lt;p&gt;To choose the right AI software development company, look for a partner that starts with your business problem, has shipped AI to production in your industry, owns data and MLOps end to end, follows a recognized AI risk framework, and prices against outcomes rather than hours. Ask for live references, a paid discovery phase, and a clear plan for what happens after launch.&lt;/p&gt;

&lt;p&gt;Almost every business is now experimenting with AI. In McKinsey's 2025 State of AI survey, 88% of respondents said their organization uses AI in at least one function, yet only 7% said it was fully scaled. The gap between a promising pilot and a system that earns its keep is usually the partner you pick. This guide walks through how to close it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What does an AI software development company do?&lt;/strong&gt;&lt;br&gt;
An AI software development company designs, builds, and maintains software that uses machine learning, large language models (LLMs), or AI agents to automate decisions and tasks. Typical AI software development services include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI strategy and discovery: finding use cases with a measurable return.&lt;/li&gt;
&lt;li&gt;Data engineering: cleaning, labeling, and piping the data models depend on.&lt;/li&gt;
&lt;li&gt;Custom model and LLM development: fine-tuning, retrieval-augmented generation (RAG), and agent workflows.&lt;/li&gt;
&lt;li&gt;AI integration: adding AI features to your existing apps, CRM, or ERP.&lt;/li&gt;
&lt;li&gt;MLOps and support: monitoring, retraining, and cost control after launch.
This is different from a team that simply uses AI in software development, such as coding assistants that help engineers write code faster. Most good partners do both, but you are hiring for the first.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;7 criteria for choosing an AI software development company:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;They start with the problem, not the model:&lt;br&gt;
Strong partners ask about your workflow, KPIs, and budget before they mention GPT, Claude, or Gemini. If the first call is a tech demo, expect a solution looking for a problem.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Proven production work in your industry:&lt;br&gt;
Ask for two or three case studies with numbers: hours saved, error rates cut, revenue gained. Then ask to speak with those clients. A pilot that never went live is not a reference.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Data readiness and security:&lt;br&gt;
AI is only as good as its data. The company should assess your data quality early and explain where your data is stored, who can access it, and whether it is used to train third-party models. Look for SOC 2 or ISO 27001 practices and compliance with rules such as GDPR or HIPAA where they apply.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Responsible AI and governance:&lt;br&gt;
Ask how they test for bias, hallucinations, and failure cases. Partners who align with the NIST AI Risk Management Framework can show you a documented process for mapping, measuring, and managing AI risk.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Model-agnostic architecture:&lt;br&gt;
The best model today may not be the best in six months. Prefer a team that can swap LLM providers or run open-source models without a rebuild, so you avoid vendor lock-in and control costs.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;MLOps and post-launch support:&lt;br&gt;
Models drift as data changes. Confirm who monitors accuracy, how often models are retrained, and what the support SLA covers. Get the cost of running the system, including API and cloud fees, in writing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Clear ownership and transparent pricing:&lt;br&gt;
Your contract should state that you own the code, prompts, fine-tuned weights, and data. Pricing should be broken into phases with defined deliverables.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Red flags to watch for:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Guaranteed accuracy figures before seeing your data.&lt;/li&gt;
&lt;li&gt;No paid discovery phase; a fixed quote after one call.&lt;/li&gt;
&lt;li&gt;Vague answers on data privacy or model training.&lt;/li&gt;
&lt;li&gt;Every project uses the same tool, whatever the problem.&lt;/li&gt;
&lt;li&gt;No plan for maintenance after launch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Common engagement and pricing models:&lt;/strong&gt;&lt;br&gt;
Most AI software development companies offer four engagement models. A paid discovery phase or proof of concept tests feasibility in 2–6 weeks, and it doubles as a test of the team, not just the idea. A fixed-scope project suits well-defined features with clean data, though change requests can get expensive. &lt;br&gt;
Time and materials fit evolving products and R&amp;amp;D, but it needs strong sprint reporting to keep costs visible. A dedicated AI team works best for long-term roadmaps, as long as you have your own product owner to steer it. Whichever model you choose, start with a small, paid discovery phase; it tells you more about how a company works than any sales deck.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Frequently asked questions:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How much does it cost to hire an AI software development company?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Costs depend on scope and data readiness. A discovery phase or proof of concept is usually the smallest commitment, while a production system with integrations and MLOps costs much more. Ask for phased quotes and a monthly estimate of running costs such as API and cloud fees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How long does an AI software project take?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A proof of concept typically takes 2–6 weeks. A production-ready AI feature often takes 3–6 months, depending on data quality, integrations, and compliance reviews.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is the difference between AI software development services and using AI in software development?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;AI software development services build products that contain AI, such as chatbots, prediction engines, or agents. AI in software development refers to tools that help engineers write, test, and review code faster. A good partner uses the second to deliver the first more efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Should I build an in-house AI team or outsource?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Outsourcing is faster when you need specialized skills now or are testing a first use case. An in-house team makes sense once AI is core to your product. Many companies start with a partner and hire internally as the system matures.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mlops</category>
      <category>llm</category>
      <category>development</category>
    </item>
    <item>
      <title>I verified all 160 official U.S. business-data portals so your agent doesn't have to — here's what I found</title>
      <dc:creator>bradraylucas-eng</dc:creator>
      <pubDate>Wed, 14 Oct 2026 14:07:46 +0000</pubDate>
      <link>https://dev.to/bradraylucaseng/i-verified-all-160-official-us-business-data-portals-so-your-agent-doesnt-have-to-heres-what-5g3d</link>
      <guid>https://dev.to/bradraylucaseng/i-verified-all-160-official-us-business-data-portals-so-your-agent-doesnt-have-to-heres-what-5g3d</guid>
      <description>&lt;p&gt;Every agent workflow I build starts with the same wasted motion: the agent searches the web for the official registry, lands on an ad or an aggregator, and burns its run. So I verified the official portals myself — business entity search (50 states + DC + federal), UCC lien search, and professional license verification — and wrote down what agents actually need to know before they start.&lt;/p&gt;

&lt;p&gt;Findings that surprised me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Texas is the only state that charges for a basic business entity search ($1 via its portal) — and it retired the system agents' training data points to (SOSDirect) in September 2026.&lt;/li&gt;
&lt;li&gt;UCC search is a different world: 21 of 51 jurisdictions charge, 18 require an account before you can search, and Delaware has no public search at all (state-licensed "Authorized Searchers" only).&lt;/li&gt;
&lt;li&gt;License verification has no center: only 21 of 51 jurisdictions have a true central portal. California's main portal excludes contractors and real estate entirely. A "not found" there proves nothing.&lt;/li&gt;
&lt;li&gt;In 10+ states the business registry is not run by the Secretary of State at all.&lt;/li&gt;
&lt;li&gt;A large share of these portals return 403/bot challenges to plain HTTP clients. If your agent fetches with a simple client, it needs a browser session for these — the datasets flag them per portal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I packaged the verified data (JSON + CSV, documented schema, per-entry cost/login/access notes, last verified October 2026) as the Source Finder datasets on Gumroad, with free samples so you can check the schema before paying anything: &lt;a href="https://github.com/bradraylucas-eng/ai-agent-tools-free-samples" rel="noopener noreferrer"&gt;https://github.com/bradraylucas-eng/ai-agent-tools-free-samples&lt;/a&gt; · Vol. 1 on Gumroad: &lt;a href="https://bradray2.gumroad.com/l/fxnjw" rel="noopener noreferrer"&gt;https://bradray2.gumroad.com/l/fxnjw&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you build agents that do due diligence, vendor checks, or lead verification, I'd genuinely like to know what other official sources you re-hunt every run — that's what Vol. 4 should be.&lt;/p&gt;

&lt;p&gt;— Brad (maker; the datasets are my product, the samples are free)&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>agents</category>
      <category>opensource</category>
    </item>
    <item>
      <title>2026 Frontier MoE VRAM Sizing &amp; Bare-Metal GPU Repatriation Math (DeepSeek-V4.1-Flash, Kimi K2.5, GLM-5.3)</title>
      <dc:creator>Asif Muhammad Iqbal</dc:creator>
      <pubDate>Wed, 14 Oct 2026 14:02:57 +0000</pubDate>
      <link>https://dev.to/asifmiqbal/2026-frontier-moe-vram-sizing-bare-metal-gpu-repatriation-math-deepseek-v41-flash-kimi-k25-h9m</link>
      <guid>https://dev.to/asifmiqbal/2026-frontier-moe-vram-sizing-bare-metal-gpu-repatriation-math-deepseek-v41-flash-kimi-k25-h9m</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published with an interactive 8-Blade HGX Silicon X-Ray simulator at &lt;a href="https://logic42.ai/assessments/gpu-tco" rel="noopener noreferrer"&gt;Logic42 Sovereign Engineering Practice&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Most enterprise infrastructure teams sizing private GPU clusters for 2026 Mixture-of-Experts (MoE) models make a costly arithmetic mistake: &lt;strong&gt;they size HBM3e VRAM for active parameters per token instead of the full resident checkpoint + concurrent PagedAttention KV cache.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you try to deploy &lt;strong&gt;DeepSeek-V4.1-Flash&lt;/strong&gt; (&lt;code&gt;552B MoE + 196B Engram&lt;/code&gt;, &lt;code&gt;8B–16B&lt;/code&gt; active per token) or &lt;strong&gt;Moonshot Kimi K2.5&lt;/strong&gt; (&lt;code&gt;1.04T&lt;/code&gt; total, &lt;code&gt;32B&lt;/code&gt; active) on an undersized cluster, vLLM will either OOM during weight initialization or evict KV-cache blocks on every concurrent multi-turn agent request.&lt;/p&gt;

&lt;p&gt;You can test your exact concurrency and token volume live in our &lt;strong&gt;&lt;a href="https://logic42.ai/assessments/gpu-tco" rel="noopener noreferrer"&gt;Sovereign MoE Silicon X-Ray &amp;amp; Cloud Repatriation Calculator&lt;/a&gt;&lt;/strong&gt;. Below is the complete engineering math and 2026 reference table.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The 3-Component MoE VRAM Sizing Formula
&lt;/h2&gt;

&lt;p&gt;Total cluster VRAM required at production concurrency ($C$ concurrent streams at 32k context) is governed by three additive components plus a mandatory $\ge 6\%$ HBM3e fragmentation buffer:&lt;/p&gt;

&lt;p&gt;$$\text{VRAM}&lt;em&gt;{\text{total}} = \left(\text{VRAM}&lt;/em&gt;{\text{weights}} + \text{VRAM}&lt;em&gt;{\text{KV}}(C) + \text{VRAM}&lt;/em&gt;{\text{CUDA}}\right) \times 1.06$$&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Resident MoE + Engram Weights ($\text{VRAM}_{\text{weights}}$)&lt;/strong&gt;: Every routed and shared expert must reside in high-bandwidth GPU memory across your Tensor Parallel (&lt;code&gt;--tensor-parallel-size&lt;/code&gt;) or Expert Parallel (&lt;code&gt;--enable-expert-parallel&lt;/code&gt;) group. Offloading inactive experts over PCIe Gen5 to host DDR5 RAM degrades token generation latency by $8\times\text{–}14\times$.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Active PagedAttention KV Cache ($\text{VRAM}_{\text{KV}}$)&lt;/strong&gt;: Scales linearly with concurrent streams ($C$) and context window length. Models using Multi-Head Latent Attention (MLA) like DeepSeek-V4.1-Flash compress KV states to ~&lt;code&gt;2.4 GB&lt;/code&gt; per 32k stream (FP8 KV), whereas wider architectures consume &lt;code&gt;3.0 GB–3.8 GB&lt;/code&gt; per 32k stream.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CUDA Graph &amp;amp; NCCL Buffer Overhead ($\text{VRAM}_{\text{CUDA}}$)&lt;/strong&gt;: PyTorch activation scratchpads, NCCL AllReduce ring buffers, and CUDA graph capture consume ~&lt;code&gt;3.5%&lt;/code&gt; of resident weight memory (minimum &lt;code&gt;6 GB–20 GB&lt;/code&gt; per node).&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  2. Q4 2026 Frontier MoE &amp;amp; Dense VRAM Sizing Reference Table (at 40 Concurrent 32k Streams)
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;2026 Frontier Model&lt;/th&gt;
&lt;th&gt;Architecture (Total / Active)&lt;/th&gt;
&lt;th&gt;Native FP4 / INT4 Weights&lt;/th&gt;
&lt;th&gt;FP8 Weights&lt;/th&gt;
&lt;th&gt;BF16 Weights&lt;/th&gt;
&lt;th&gt;KV Cache @ 40 Streams (32k)&lt;/th&gt;
&lt;th&gt;Minimum Recommended HGX Cluster&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DeepSeek-V4.1-Flash&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;552B MoE + 196B Engram&lt;/code&gt; (&lt;code&gt;8B/16B&lt;/code&gt; active)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;511 GB&lt;/code&gt; &lt;em&gt;(MXFP4/FP8)&lt;/em&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;590 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1,104 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;96 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;8× H200 SXM (1,128 GB)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Moonshot Kimi K2.5&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;1.04T MoE&lt;/code&gt; (&lt;code&gt;32B&lt;/code&gt; active, 384 experts)&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;595 GB&lt;/code&gt; &lt;em&gt;(QAT-INT4)&lt;/em&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1,050 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2,080 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;128 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;8× H200 SXM (1,128 GB)&lt;/strong&gt; &lt;em&gt;(INT4)&lt;/em&gt; or &lt;strong&gt;8× B200 (1,440 GB)&lt;/strong&gt; &lt;em&gt;(FP8)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Zhipu GLM-5.3-Flash&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;320B MoE&lt;/code&gt; (&lt;code&gt;18B&lt;/code&gt; active)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;96 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;185 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;360 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;64 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;4× H100 SXM (320 GB)&lt;/strong&gt; &lt;em&gt;(FP8)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Zhipu GLM-5.2 Flagship&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;744B MoE&lt;/code&gt; (&lt;code&gt;40B&lt;/code&gt; active)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;215 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;410 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;780 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;120 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;8× H100 SXM (640 GB)&lt;/strong&gt; &lt;em&gt;(FP8)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;DeepSeek-V4-Pro&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;1.6T MoE&lt;/code&gt; (&lt;code&gt;49B&lt;/code&gt; active)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;480 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;920 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1,780 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;152 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;8× B200 Blackwell (1,440 GB)&lt;/strong&gt; &lt;em&gt;(FP8)&lt;/em&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Zhipu GLM-4.5-Air&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;106B MoE&lt;/code&gt; (&lt;code&gt;12B&lt;/code&gt; active)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;34 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;64 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;124 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;44 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;4× L40S (192 GB)&lt;/strong&gt; or &lt;strong&gt;4× H100 (320 GB)&lt;/strong&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Qwen 3.8-27B Dense&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;27B Dense&lt;/code&gt; (&lt;code&gt;27B&lt;/code&gt; active)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;16 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;29 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;56 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;36 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;2× L40S (96 GB)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Llama 4 Scout&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;109B MoE&lt;/code&gt; (&lt;code&gt;17B&lt;/code&gt; active, 16 experts)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;35 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;68 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;132 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;48 GB&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;4× L40S (192 GB)&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;h2&gt;
  
  
  3. What Bare-Metal GPU Node Rates Include vs. Exclude
&lt;/h2&gt;

&lt;p&gt;When comparing commercial API token spend (&lt;code&gt;$4.60–$7.20 / 1M blended tokens&lt;/code&gt; on GPT-5 or Claude 4.5 Sonnet) against dedicated sovereign bare-metal clusters (&lt;code&gt;$13,500/mo&lt;/code&gt; for an 8×H100 node or &lt;code&gt;$17,800/mo&lt;/code&gt; for an 8×H200 node on a 36-month reserved lease):&lt;/p&gt;

&lt;h3&gt;
  
  
  Included Inside the Server Chassis BOM:
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Host CPUs&lt;/strong&gt;: Dual Socket AMD EPYC 9654 / 9754 (192–256 physical cores) or Intel Xeon Platinum 8592+&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System RAM&lt;/strong&gt;: &lt;code&gt;2.0 TB – 4.0 TB&lt;/code&gt; DDR5-5600 ECC Registered memory for fast safetensors mmap loading&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Local NVMe Storage&lt;/strong&gt;: &lt;code&gt;30.7 TB – 61.4 TB&lt;/code&gt; PCIe Gen5 NVMe U.3 RAID0 scratch array (&lt;code&gt;55+ GB/s&lt;/code&gt; sequential read)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Interconnect Fabric&lt;/strong&gt;: &lt;code&gt;900 GB/s – 1.8 TB/s&lt;/code&gt; NVLink / NVSwitch backplane + &lt;code&gt;8× 400GbE&lt;/code&gt; RoCEv2 / InfiniBand NDR NICs&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Excluded (On-Premises Colocation &amp;amp; Electrical Utility):
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;If deploying into your own Tier-3/Tier-4 colocation cage rather than a reserved bare-metal cloud lease, budget separately for rack space, Direct Liquid Cooling (DLC), and continuous electrical draw (&lt;code&gt;10.2 kW–14.2 kW&lt;/code&gt; IT load per 8-GPU chassis at PUE &lt;code&gt;1.30&lt;/code&gt;, adding roughly &lt;code&gt;$950–$1,450/mo&lt;/code&gt; depending on regional industrial kWh tariffs).&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Interactive Tool: Run Your Own MoE VRAM &amp;amp; 24-Month TCO Simulation
&lt;/h2&gt;

&lt;p&gt;You can inspect the live &lt;strong&gt;8-Blade HGX GPU Rack X-Ray (&lt;code&gt;G1&lt;/code&gt;–&lt;code&gt;G8&lt;/code&gt;)&lt;/strong&gt;, test concurrency sliders, view the 24-month cumulative payback curve, and export a 1-page &lt;strong&gt;CFO Business Case PDF&lt;/strong&gt; at:&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;&lt;a href="https://logic42.ai/assessments/gpu-tco" rel="noopener noreferrer"&gt;Launch the Sovereign MoE Silicon X-Ray &amp;amp; Cloud Repatriation Calculator&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You can also explore our 4 interactive &lt;strong&gt;Adversarial &amp;amp; Failure X-Ray Playbook Hubs&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://logic42.ai/articles/pillar/cyber-security" rel="noopener noreferrer"&gt;Cyber Security &amp;amp; Adversarial AI Containment Hub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://logic42.ai/articles/pillar/data-substrates" rel="noopener noreferrer"&gt;Data Substrates &amp;amp; Lakehouse Lineage Hub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://logic42.ai/articles/pillar/ai-automation" rel="noopener noreferrer"&gt;Deterministic Agent Control Plane Hub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://logic42.ai/articles/pillar/finops-routing" rel="noopener noreferrer"&gt;AI FinOps &amp;amp; Bare-Metal GPU Economics Hub&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>devops</category>
      <category>finops</category>
    </item>
    <item>
      <title>Character.ai Filed for Bankruptcy. How to Export Your Chats Before the Sale</title>
      <dc:creator>Alan West</dc:creator>
      <pubDate>Wed, 14 Oct 2026 13:40:03 +0000</pubDate>
      <link>https://dev.to/alanwest/characterai-filed-for-bankruptcy-how-to-export-your-chats-before-the-sale-2mcd</link>
      <guid>https://dev.to/alanwest/characterai-filed-for-bankruptcy-how-to-export-your-chats-before-the-sale-2mcd</guid>
      <description>&lt;p&gt;Character.ai filed for Chapter 11 bankruptcy on October 12, and the only bid on the table so far is Disney's $20 million for a license to some of its IP, which doesn't cover the app you chat in. If you have two years of roleplay, a dozen custom characters, or a chat log you actually care about, you have roughly six weeks to export your Character.ai chats before a court decides who ends up with the company and your data.&lt;/p&gt;

&lt;p&gt;Character Technologies &lt;a href="https://blog.character.ai/an-update-on-character-ai/" rel="noopener noreferrer"&gt;started a voluntary Chapter 11 process&lt;/a&gt; in federal court in Delaware on October 12, 2026. The company expects the court-supervised sale to finish "by the end of November or perhaps early December 2026." If no bid keeps the platform running, the official update says it "will be wound down."&lt;/p&gt;

&lt;p&gt;Below I go through what the announcement actually promises, how to request the official export, what the CAI Tools extension gets access to, and how I'd rebuild the characters in SillyTavern + Ollama on your own machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Character.ai's bankruptcy announcement says about your data
&lt;/h2&gt;

&lt;p&gt;The announcement on the Character.ai blog is short. It commits to four things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The platform stays up and all services remain accessible for now.&lt;/li&gt;
&lt;li&gt;Paid subscriptions keep billing as normal, and subscribers get notice before paid features change.&lt;/li&gt;
&lt;li&gt;User data stays covered by the existing Privacy Policy.&lt;/li&gt;
&lt;li&gt;You can export your data or delete your account from the app or the website.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The FAQ heading literally asks "What happens to user data and chats?" and then the answer never mentions chats. User-created characters don't come up at all.&lt;/p&gt;

&lt;p&gt;The buyer side doesn't help much. According to &lt;a href="https://thenextweb.com/news/character-ai-files-for-bankruptcy-as-disney-bids-20m-for-some-assets" rel="noopener noreferrer"&gt;The Next Web&lt;/a&gt;, Disney's $20 million opening bid buys a non-exclusive, perpetual license to certain IP and certain legal claims, plus a deal to lend back former Character.ai staff it hired so the platform can keep running safely for a while. Nothing in the coverage says Disney is buying the consumer app. The $20 million is a floor that other bidders can top, and the filing puts assets and liabilities at $50 million to $100 million.&lt;/p&gt;

&lt;p&gt;So the floor bid might keep the lights on for a while, and that's all it promises. For the app to survive, somebody has to want a chatbot platform that settled five teen mental-health lawsuits in January and has faced more claims from families and US states since.&lt;/p&gt;

&lt;p&gt;In the &lt;a href="https://news.ycombinator.com/item?id=50068036" rel="noopener noreferrer"&gt;Hacker News thread&lt;/a&gt;, commenters brought up 23andMe and Spirit Airlines, two companies whose data went up for sale once they went under. "Privacy Policy unchanged" describes today. It doesn't tell you what a buyer gets to do with your logs after the sale closes.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to export your Character.ai data with the official request
&lt;/h2&gt;

&lt;p&gt;Do this first. It takes two minutes. Character.ai's own help center returned a 403 when I tried to load it, so these paths come from third-party guides, and the guides don't agree with each other. Menu names may have moved.&lt;/p&gt;

&lt;p&gt;On the web:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign in at character.ai.&lt;/li&gt;
&lt;li&gt;Open &lt;strong&gt;Profile Settings&lt;/strong&gt;, then &lt;strong&gt;Account&lt;/strong&gt;, then &lt;strong&gt;Manage Account &amp;amp; Data&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Pick the export data option.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In the mobile app, look for &lt;strong&gt;Export my data&lt;/strong&gt; in account settings (one guide puts it under Settings → Privacy, another under Legal &amp;amp; Privacy). The official update says export works from both the app and the website, though one guide claims the desktop site doesn't have the option. If you can't find it on the web, use the phone.&lt;/p&gt;

&lt;p&gt;Things to know before you rely on it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;There's no per-chat export. You get one archive of the whole account (&lt;a href="https://www.llmnesia.com/blog/how-to-export-character-ai-conversation-history" rel="noopener noreferrer"&gt;LLMnesia's guide&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;It's a snapshot. Anything you chat after you request it isn't included, so request it again right before you stop using the service.&lt;/li&gt;
&lt;li&gt;Delivery reportedly goes to email. &lt;a href="https://aiinsightsnews.net/how-to-export-character-ai-chat/" rel="noopener noreferrer"&gt;One guide&lt;/a&gt; says the download link arrives by email, expires (it guesses 24 to 48 hours), and can take anywhere from about an hour to a few days to show up. It also says the ZIP has a folder named after your username with a &lt;code&gt;data/&lt;/code&gt; subfolder holding &lt;code&gt;user.json&lt;/code&gt;, &lt;code&gt;character.json&lt;/code&gt; and &lt;code&gt;message.json&lt;/code&gt;. I haven't seen Character.ai confirm that file list. Open the archive and check for yourself.&lt;/li&gt;
&lt;li&gt;Don't spam the button. That same guide says every request queues separately. Assume everyone else read the same headline and is in that queue with you.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The archive is raw JSON. You can grep it, but it won't load straight into another app.&lt;/p&gt;

&lt;h2&gt;
  
  
  Export characters and chats with CAI Tools (read the permissions first)
&lt;/h2&gt;

&lt;p&gt;To get something another app can import, most people will reach for CAI Tools. SillyTavern's own docs &lt;a href="https://docs.sillytavern.app/usage/core-concepts/chatfilemanagement/" rel="noopener noreferrer"&gt;point to it&lt;/a&gt; for importing Character.ai chats and bots. According to its &lt;a href="https://addons.mozilla.org/firefox/addon/cai-tools/" rel="noopener noreferrer"&gt;Firefox listing&lt;/a&gt;, it downloads chats in a "readable" or a "transferable" format and downloads characters as cards. The Chrome listing says JSON and PNG cards, and PNG cards are what SillyTavern imports.&lt;/p&gt;

&lt;p&gt;This is what you're agreeing to when you install it, going by the public listings:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;CAI Tools (Firefox, v3.8.2)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Last updated&lt;/td&gt;
&lt;td&gt;Oct 9, 2026&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Users&lt;/td&gt;
&lt;td&gt;5,597&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Required permissions&lt;/td&gt;
&lt;td&gt;Browser tabs, site data for character.ai and chatbotmanager.net&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Optional permissions&lt;/td&gt;
&lt;td&gt;character.ai, chub.ai, jannyai.com, chatgpt.com, janitorai.com&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;License&lt;/td&gt;
&lt;td&gt;All Rights Reserved&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Paid features&lt;/td&gt;
&lt;td&gt;"Some features may require payment" (Patreon)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The &lt;a href="https://github.com/irsat000/CAI-Tools" rel="noopener noreferrer"&gt;GitHub repo&lt;/a&gt; says outright: "Code here is not up-to-date." It exists for bug reports. You can't audit the build you install against that source.&lt;/p&gt;

&lt;p&gt;So you'd be giving a closed-source extension your logged-in character.ai session, in the same tab as your most private conversations. I still think it's the right call, because nothing else gets your data out in a format another app can load. Just be careful about it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Install it in a separate browser profile that's only logged into Character.ai.&lt;/li&gt;
&lt;li&gt;Export everything in one sitting, then uninstall it.&lt;/li&gt;
&lt;li&gt;If you're paranoid (fair), log out of every session afterwards and change your password.&lt;/li&gt;
&lt;li&gt;Lots of similarly named "Character.ai Exporter" extensions are going to show up in the stores this month. Don't install any of them unless you can explain who wrote it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also open every exported character card and look at the definition field. If it comes out empty, you've saved a name, an avatar and a greeting, and nothing else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Run your Character.ai characters locally with SillyTavern and Ollama
&lt;/h2&gt;

&lt;p&gt;Once your characters are PNG cards and your chats are files on disk, you don't need Character.ai's servers anymore. The local setup takes about ten minutes.&lt;/p&gt;

&lt;p&gt;Step 1 is installing Ollama and pulling a model. On Linux:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://ollama.com/install.sh | sh
ollama pull llama3.1:8b
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Choose a model that fits your RAM or VRAM. The Ollama library has plenty, and roleplay quality is a matter of taste, so try a few.&lt;/p&gt;

&lt;p&gt;Step 2 is raising the context window, which matters more than which model you pick. The &lt;a href="https://docs.ollama.com/faq" rel="noopener noreferrer"&gt;Ollama FAQ&lt;/a&gt; says "By default, Ollama uses a context window size of 4096 tokens." A character definition plus a long chat history will blow through that, and the character will start forgetting who it is. The FAQ's example raises it server-wide:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;OLLAMA_CONTEXT_LENGTH&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;8192 ollama serve
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One catch on Linux: the install script already runs Ollama as a systemd service, so that command will fail with "address already in use". Put the variable in the service instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl edit ollama
&lt;span class="c"&gt;# add under [Service]:&lt;/span&gt;
&lt;span class="c"&gt;#   Environment="OLLAMA_CONTEXT_LENGTH=8192"&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl restart ollama
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ollama binds to &lt;code&gt;127.0.0.1:11434&lt;/code&gt; by default. Leave it there. The FAQ shows how to set &lt;code&gt;OLLAMA_HOST&lt;/code&gt; to &lt;code&gt;0.0.0.0:11434&lt;/code&gt; to expose it on your network, and if you do that, anyone on the network can talk to the server.&lt;/p&gt;

&lt;p&gt;Step 3 is SillyTavern, from the &lt;a href="https://docs.sillytavern.app/installation/linuxmacos/" rel="noopener noreferrer"&gt;release branch&lt;/a&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/SillyTavern/SillyTavern &lt;span class="nt"&gt;-b&lt;/span&gt; release
&lt;span class="nb"&gt;cd &lt;/span&gt;SillyTavern
./start.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll need git and Node.js installed first. It opens in your browser, by default at &lt;code&gt;http://127.0.0.1:8000&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Step 4: connect the two. In the API connections panel, choose Text Completion, set the API type to Ollama, and enter &lt;code&gt;http://127.0.0.1:11434&lt;/code&gt;. Then pick your model from the dropdown.&lt;/p&gt;

&lt;p&gt;Step 5: import. Import the PNG card from the character list first, because a chat has to belong to a character. Then open that character, open &lt;strong&gt;Manage chat files&lt;/strong&gt; from the options menu at the bottom left, use the import button there, and pick the exported chat file.&lt;/p&gt;

&lt;p&gt;After that, your characters live in a folder you can back up with &lt;code&gt;rsync&lt;/code&gt;, put in git, or copy to a USB stick.&lt;/p&gt;

&lt;h2&gt;
  
  
  Character.ai export checklist
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Request the official export now. Request it again before you leave.&lt;/li&gt;
&lt;li&gt;Download the email link as soon as it arrives.&lt;/li&gt;
&lt;li&gt;Export cards and chats with CAI Tools in a separate browser profile, then uninstall it.&lt;/li&gt;
&lt;li&gt;Check that every card actually contains a definition.&lt;/li&gt;
&lt;li&gt;Set up SillyTavern + Ollama and import one character to prove the pipeline works.&lt;/li&gt;
&lt;li&gt;Decide whether to delete your account before the sale closes. You've got your copy. Whether the buyer also gets one is up to you.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A local 8B model is worse than what Character.ai ran at its peak. I'll take that trade over having my chat logs listed as an asset in a Delaware court.&lt;/p&gt;

&lt;p&gt;So which is it for you: would you trust another hosted AI companion app after this, or is local the only safe option now? And if you're staying hosted, what would a company have to promise you about data in a bankruptcy before you'd sign up?&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://blog.character.ai/an-update-on-character-ai/" rel="noopener noreferrer"&gt;An update on Character.ai&lt;/a&gt; (official announcement)&lt;/li&gt;
&lt;li&gt;&lt;a href="https://news.ycombinator.com/item?id=50068036" rel="noopener noreferrer"&gt;Hacker News discussion&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://thenextweb.com/news/character-ai-files-for-bankruptcy-as-disney-bids-20m-for-some-assets" rel="noopener noreferrer"&gt;The Next Web: Character.AI files for bankruptcy as Disney bids $20M&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://addons.mozilla.org/firefox/addon/cai-tools/" rel="noopener noreferrer"&gt;CAI Tools on Firefox Add-ons&lt;/a&gt; and &lt;a href="https://github.com/irsat000/CAI-Tools" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.sillytavern.app/usage/core-concepts/chatfilemanagement/" rel="noopener noreferrer"&gt;SillyTavern docs: chat file management&lt;/a&gt; and &lt;a href="https://docs.sillytavern.app/installation/linuxmacos/" rel="noopener noreferrer"&gt;Linux/macOS install&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.ollama.com/faq" rel="noopener noreferrer"&gt;Ollama FAQ&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>privacy</category>
      <category>llm</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>AI agent development cost: what actually moves the number (2026)</title>
      <dc:creator>Joan Comadran</dc:creator>
      <pubDate>Wed, 14 Oct 2026 13:35:36 +0000</pubDate>
      <link>https://dev.to/joancomadran/ai-agent-development-cost-what-actually-moves-the-number-2026-2715</link>
      <guid>https://dev.to/joancomadran/ai-agent-development-cost-what-actually-moves-the-number-2026-2715</guid>
      <description>&lt;p&gt;Here's the short answer people actually want: &lt;strong&gt;AI agent development cost is mostly scope, not model fees.&lt;/strong&gt; The model bill is real and easy to measure. The number that surprises founders is the engineering around the model — the channel, the tools that write to real systems, multi-tenant isolation, evals, and the week you spend hardening the webhook so Meta doesn't double-send every reply.&lt;/p&gt;

&lt;p&gt;I don't publish a rate card here, and I'm not going to invent a "market average" with fake precision. What I can do is show what moves the quote, what it costs to &lt;em&gt;run&lt;/em&gt; an agent on Claude as of October 2026, and what I learned shipping &lt;a href="https://www.joancomadran.dev/projects/claient" rel="noopener noreferrer"&gt;Claient&lt;/a&gt; (WhatsApp lead agent), &lt;a href="https://www.joancomadran.dev/projects/adorea-ai" rel="noopener noreferrer"&gt;Adorea.ai&lt;/a&gt;, and &lt;a href="https://www.joancomadran.dev/projects/dairector" rel="noopener noreferrer"&gt;Dairector&lt;/a&gt;. If you're comparing agency cost guides that all land on $30k–$180k, treat those as their sales bands — useful as a sanity check, not as a standard.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three costs people mix up
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Cost&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;th&gt;Who pays&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Build&lt;/td&gt;
&lt;td&gt;Engineering to ship the agent: product, tools, auth, channel, evals&lt;/td&gt;
&lt;td&gt;You, once (or in slices)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Run&lt;/td&gt;
&lt;td&gt;Model tokens, hosting, channel fees, observability&lt;/td&gt;
&lt;td&gt;You, every month&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Own&lt;/td&gt;
&lt;td&gt;Maintenance when models deprecate, prompts drift, APIs change&lt;/td&gt;
&lt;td&gt;You, forever&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Most "AI agent development cost" pages only talk about the first row, then bury run cost in a footnote. In production the second row is where a good architecture either stays cheap or quietly burns the margin — I wrote the token side up in &lt;a href="https://www.joancomadran.dev/blog/keeping-claudes-token-bill-from-ruining-your-month" rel="noopener noreferrer"&gt;keeping Claude's token bill from ruining your month&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually moves the build number
&lt;/h2&gt;

&lt;p&gt;These are the drivers I budget against, in the order that usually bites.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. How many systems the agent can write to.&lt;/strong&gt; A read-only FAQ bot over your docs is one shape. An agent that books appointments, creates CRM rows, or sends WhatsApp templates is another. Every write-action needs schemas, retries, idempotency, and a human-approval path when the stakes are high. Tool count is a weak proxy; &lt;em&gt;write&lt;/em&gt; count is the real one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. The channel.&lt;/strong&gt; WhatsApp via Meta Cloud API is not "add a chat widget." You need webhook verification, signature checks, idempotency on &lt;code&gt;wamid&lt;/code&gt;, and a plan for Meta's retries when your serverless function times out. That alone ate more engineering time than the Claude loop on &lt;a href="https://www.joancomadran.dev/blog/whatsapp-bot-with-claude" rel="noopener noreferrer"&gt;Claient&lt;/a&gt;. Email or an in-app chat is usually cheaper. Voice is its own project.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Single-tenant vs multi-tenant.&lt;/strong&gt; Solving the agent for one business is a focused build. Solving it so any tenant self-serves, with RLS on &lt;code&gt;account_id&lt;/code&gt;, encrypted BYOK keys, and one webhook routing by &lt;code&gt;phone_number_id&lt;/code&gt;, is a product. Claient only becomes interesting as a business once the second version exists.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Evals and observability.&lt;/strong&gt; Cheap agents skip them. Expensive incidents come from skipping them. Budget time for a golden set of real conversations, cost logging per account, and traces you can read when a lead gets the wrong answer at 23:00.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Who owns the model key.&lt;/strong&gt; Flat product price with your key absorbed (Claient defaults to Haiku) is a different quote from BYOK, where the tenant pays Anthropic directly. BYOK lowers your variable cost and raises onboarding and vault work.&lt;/p&gt;

&lt;p&gt;Rough shape from builds I've done: a single-task agent with a couple of tools and one channel is a few weeks of senior work to something clickable; hardening + multi-tenant + billing stretches that into months. I won't turn that into a fake dollar table — hours × whoever you hire is the only honest formula.&lt;/p&gt;

&lt;h2&gt;
  
  
  Running cost: model rates you can verify (as of Oct 2026)
&lt;/h2&gt;

&lt;p&gt;List prices from &lt;a href="https://docs.claude.com/en/docs/about-claude/pricing" rel="noopener noreferrer"&gt;Anthropic's pricing page&lt;/a&gt;, per million tokens (input / output). They change; check before you budget.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Input&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;th&gt;Notes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Claude Haiku 5.5 (≤100K prompt)&lt;/td&gt;
&lt;td&gt;$0.10&lt;/td&gt;
&lt;td&gt;$0.50&lt;/td&gt;
&lt;td&gt;Cheap high-volume tier&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Haiku 4.5&lt;/td&gt;
&lt;td&gt;$1&lt;/td&gt;
&lt;td&gt;$5&lt;/td&gt;
&lt;td&gt;What Claient still defaults to in production&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Sonnet 5.5&lt;/td&gt;
&lt;td&gt;$2&lt;/td&gt;
&lt;td&gt;$10&lt;/td&gt;
&lt;td&gt;Workhorse for harder reasoning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 5.5&lt;/td&gt;
&lt;td&gt;$4&lt;/td&gt;
&lt;td&gt;$20&lt;/td&gt;
&lt;td&gt;Heavy tasks, drafting, research&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Fable 5.1&lt;/td&gt;
&lt;td&gt;$10&lt;/td&gt;
&lt;td&gt;$50&lt;/td&gt;
&lt;td&gt;Top tier&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Prompt cache reads are a fraction of input (0.05×–0.1× depending on model; Fable goes lower). Batch is 50% off when you can wait. Client-side tool use is just tokens; Anthropic web search is $10 per 1,000 searches on top.&lt;/p&gt;

&lt;p&gt;What that means in practice for a WhatsApp lead agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Default to a cheap model for the conversation loop. Claient runs &lt;strong&gt;Haiku&lt;/strong&gt; by default; tenants who want Sonnet/Opus bring their own key.&lt;/li&gt;
&lt;li&gt;Cache the static system prompt and tool schemas. Don't resend the full history every turn — use a short verbatim window plus a rolling summary (&lt;a href="https://www.joancomadran.dev/blog/keeping-claudes-token-bill-from-ruining-your-month" rel="noopener noreferrer"&gt;details here&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Log real USD per account. If you can't see cost per conversation, you can't price the product.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hosting for a Next.js + Supabase agent is usually noise next to a bad model choice: tens to low hundreds of dollars a month until you have serious traffic. Channel fees matter more — Meta service conversations within 24h on Cloud API direct are free, which is why Claient can sit at &lt;strong&gt;€49/month&lt;/strong&gt; with ~0 € platform cost per customer. A BSP in the middle would have broken that price.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build vs buy vs hire
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Buy a SaaS&lt;/strong&gt; when your use case is generic (FAQ, basic lead capture, appointment booking templates) and you're fine renting their qualification rules. Fastest path; you pay forever and bend to their product.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Build in-house&lt;/strong&gt; when you already have a senior engineer who has shipped LLM tool-use, and the agent is core IP. Still budget for the channel and for the month after launch, not just the demo week.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hire&lt;/strong&gt; when you need production reliability and don't have that person on payroll. Fit for custom tools, multi-tenant SaaS, WhatsApp/CRM write-paths, or a first LLM product where a wrong architecture is expensive to unwind. Not fit for a slide-deck prototype.&lt;/p&gt;

&lt;p&gt;I ship the hire path from Barcelona, remote-friendly: TypeScript, Next.js, Supabase, &lt;code&gt;@anthropic-ai/sdk&lt;/code&gt; directly — no LangChain tax unless the project truly needs multi-provider orchestration. Details and process on &lt;a href="https://www.joancomadran.dev/ai-engineering" rel="noopener noreferrer"&gt;hire an AI engineer&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When it's worth it / when it's not
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Worth building or hiring for when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Leads or revenue depend on speed (out-of-hours WhatsApp, inbound that dies in an inbox).&lt;/li&gt;
&lt;li&gt;The agent must call &lt;em&gt;your&lt;/em&gt; tools with real side effects, not just chat.&lt;/li&gt;
&lt;li&gt;You need multi-tenant isolation, BYOK, or channel economics a template can't give you.&lt;/li&gt;
&lt;li&gt;You're launching a product (not a one-off script) and need cost controls from day one.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Not worth it when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Zapier/Make/no-code bot already covers the happy path.&lt;/li&gt;
&lt;li&gt;You only need an internal demo for a stakeholder meeting.&lt;/li&gt;
&lt;li&gt;Nobody will own evals and model updates after the first deploy.&lt;/li&gt;
&lt;li&gt;The "agent" is really a single LLM call with no tools — that's a feature, not a project.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Verdict
&lt;/h2&gt;

&lt;p&gt;If someone quotes you AI agent development cost as one number with no breakdown of channel, write-tools, tenancy and run model, they're selling a vibe. Ask for: scope of write-actions, who pays for tokens, how evals work, and what the monthly run cost looks like at your expected volume on a named model and caching strategy.&lt;/p&gt;

&lt;p&gt;My default for a production lead or support agent in 2026: &lt;strong&gt;Claude via the official SDK, cheapest model that passes your eval, prompt caching on, conversation memory bounded, channel owned directly.&lt;/strong&gt; That's the shape behind Claient. The build cost is the engineering to make that boring and safe; the run cost is then a line item you can actually forecast.&lt;/p&gt;

&lt;p&gt;Want that built end-to-end — agent, product shell, tracking — talk to me on the &lt;a href="https://www.joancomadran.dev/ai-engineering" rel="noopener noreferrer"&gt;AI engineering&lt;/a&gt; page. Related reading: &lt;a href="https://www.joancomadran.dev/blog/claude-vs-gpt-for-ai-agents" rel="noopener noreferrer"&gt;Claude vs GPT for AI agents&lt;/a&gt;, &lt;a href="https://www.joancomadran.dev/blog/whatsapp-bot-with-claude" rel="noopener noreferrer"&gt;WhatsApp bot with Claude&lt;/a&gt;, &lt;a href="https://www.joancomadran.dev/blog/ship-an-ai-product-in-a-weekend" rel="noopener noreferrer"&gt;ship an AI product in a weekend&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How much does it cost to build an AI agent in 2026?
&lt;/h3&gt;

&lt;p&gt;There is no single market price. What moves the number is scope: one channel vs many, how many write-actions the agent can take, multi-tenant isolation, evals, and who owns the channel (WhatsApp, CRM, calendar). A focused single-task agent with a few tools is weeks of senior engineering; a multi-tenant product with billing, dashboards and hardened webhooks is months. Vendor cost guides often quote $30k–$180k+ for production agents — treat those as rough bands from their sales pages, not a standard. Running cost is separate and usually dominated by model tokens.&lt;/p&gt;

&lt;h3&gt;
  
  
  What does it cost to run an AI agent after you build it?
&lt;/h3&gt;

&lt;p&gt;Mostly model tokens plus hosting. As of October 2026 on Anthropic's list prices, Claude Haiku 5.5 starts at $0.10 / $0.50 per million input/output tokens (prompts up to 100K), Haiku 4.5 is $1 / $5, Sonnet 5.5 is $2 / $10, and Opus 5.5 is $4 / $20. Prompt cache reads are a fraction of input. A WhatsApp lead agent on Haiku with caching and a rolling conversation window stays in the cents-per-conversation range for typical volumes; the same agent on a frontier model without caching does not. Add hosting (often tens to low hundreds of dollars a month on Vercel + a managed Postgres) and whatever the channel charges.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is it cheaper to buy a SaaS chatbot than to build a custom AI agent?
&lt;/h3&gt;

&lt;p&gt;Usually yes for generic FAQ or lead capture. Buy when a template covers your channel and qualification rules. Build (or hire) when you need custom tools, multi-tenant isolation, a channel you must own (for example Meta Cloud API direct), BYOK, or product economics that SaaS pricing breaks. Claient only made sense as a product because Meta service conversations within 24h are free on Cloud API direct — a BSP fee would have eaten the $49/month price.&lt;/p&gt;

&lt;h3&gt;
  
  
  When is it worth hiring an AI engineer to build an agent?
&lt;/h3&gt;

&lt;p&gt;When the agent has to touch real systems (WhatsApp, CRM, calendar, payments), when wrong answers cost you leads or trust, or when you need multi-tenant security and cost controls from day one. Not worth it for a one-off internal demo or a FAQ bot a no-code tool already covers. If you want someone who has shipped production agents end-to-end, see the &lt;a href="https://www.joancomadran.dev/ai-engineering" rel="noopener noreferrer"&gt;AI engineering&lt;/a&gt; page.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need LangChain or an agent framework in the budget?
&lt;/h3&gt;

&lt;p&gt;No. Production agents I ship call &lt;code&gt;@anthropic-ai/sdk&lt;/code&gt; directly: a tool-use loop is a few dozen lines. Frameworks help with multi-provider routing or complex graphs; they also hide the provider features (prompt caching breakpoints, server tools) that usually save the most money. Budget for evals, observability and cost logging before you budget for a framework.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.joancomadran.dev/blog/ai-agent-development-cost" rel="noopener noreferrer"&gt;joancomadran.dev&lt;/a&gt;. I'm Joan, an AI engineer in Barcelona — &lt;a href="https://www.joancomadran.dev/ai-engineering" rel="noopener noreferrer"&gt;work with me&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>claude</category>
      <category>anthropic</category>
    </item>
    <item>
      <title>Claude vs GPT for AI agents: what I actually ship with (2026)</title>
      <dc:creator>Joan Comadran</dc:creator>
      <pubDate>Wed, 14 Oct 2026 13:34:31 +0000</pubDate>
      <link>https://dev.to/joancomadran/claude-vs-gpt-for-ai-agents-what-i-actually-ship-with-2026-41gc</link>
      <guid>https://dev.to/joancomadran/claude-vs-gpt-for-ai-agents-what-i-actually-ship-with-2026-41gc</guid>
      <description>&lt;p&gt;Here's the verdict, so you can leave early if that's all you came for: &lt;strong&gt;I build my AI agents on Claude, and I'd still tell most people that the honest answer to "Claude vs GPT for agents" in late 2026 is "it matters less than you think."&lt;/strong&gt; As of October 2026 the two price ladders mirror each other almost to the cent, both have 1M-token context windows, both enforce tool schemas strictly, and both host web search for you. What's left to choose on is API shape, how much control you get over caching, which hosted tools you need, and which one your evals prefer on &lt;em&gt;your&lt;/em&gt; tool schemas.&lt;/p&gt;

&lt;p&gt;If you want a default: pick &lt;strong&gt;Claude&lt;/strong&gt; if your agent lives on long, growing context and you care about controlling exactly what gets cached. Pick &lt;strong&gt;GPT&lt;/strong&gt; if you're building a voice agent, want hosted file search over your documents, or your company already runs on OpenAI or Azure contracts.&lt;/p&gt;

&lt;p&gt;One disclosure before the table, because comparison posts rarely make it: every agent I run in production is on Claude. I've used OpenAI's API, but I don't have a shipped GPT agent to compare like-for-like, so the GPT column below comes from OpenAI's docs and pricing pages, not from war stories. The Claude column comes from code I can show you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Claude vs GPT at a glance (as of October 2026)
&lt;/h2&gt;

&lt;p&gt;All prices are list prices per million tokens (input / output), taken from the &lt;a href="https://docs.claude.com/en/docs/about-claude/pricing" rel="noopener noreferrer"&gt;Anthropic&lt;/a&gt; and &lt;a href="https://platform.openai.com/docs/pricing" rel="noopener noreferrer"&gt;OpenAI&lt;/a&gt; pricing pages in October 2026. These change often; check before you budget.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;Claude (Anthropic)&lt;/th&gt;
&lt;th&gt;GPT (OpenAI)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Current lineup&lt;/td&gt;
&lt;td&gt;Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5&lt;/td&gt;
&lt;td&gt;GPT-6 Astra, GPT-6.1 Sol, GPT-6 Luna&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Top tier&lt;/td&gt;
&lt;td&gt;Fable 5.1: $10 / $50&lt;/td&gt;
&lt;td&gt;GPT-6 Astra: $10 / $50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Between top and mid&lt;/td&gt;
&lt;td&gt;Opus 5.5: $4 / $20&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Workhorse tier&lt;/td&gt;
&lt;td&gt;Sonnet 5.5: $2 / $10&lt;/td&gt;
&lt;td&gt;GPT-6.1 Sol: $2 / $10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Cheap, high-volume tier&lt;/td&gt;
&lt;td&gt;Haiku 5.5: from $0.10 / $0.50 (prompts up to 100K tokens)&lt;/td&gt;
&lt;td&gt;GPT-6 Luna: from $0.10 / $0.50 (short context)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context window&lt;/td&gt;
&lt;td&gt;1M tokens on all current models&lt;/td&gt;
&lt;td&gt;1.05M tokens on the flagship three&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Long-context billing&lt;/td&gt;
&lt;td&gt;Full 1M at the standard rate (except Haiku 5.5 above 100K)&lt;/td&gt;
&lt;td&gt;Separate, higher long-context rate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Max output&lt;/td&gt;
&lt;td&gt;128K tokens&lt;/td&gt;
&lt;td&gt;128K tokens&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API you build agents on&lt;/td&gt;
&lt;td&gt;Messages API (&lt;code&gt;tool_use&lt;/code&gt; / &lt;code&gt;tool_result&lt;/code&gt; blocks)&lt;/td&gt;
&lt;td&gt;Responses API (required for tool calling on Astra and Sol)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Schema-enforced tool calls&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;strict: true&lt;/code&gt; on tool definitions&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;strict: true&lt;/code&gt;; Responses tries to make tools strict by default&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Prompt caching&lt;/td&gt;
&lt;td&gt;Explicit &lt;code&gt;cache_control&lt;/code&gt; breakpoints or automatic; cache reads at 10% of input or less&lt;/td&gt;
&lt;td&gt;Discounted cached input (5–10% of input on the flagship three)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Batch discount&lt;/td&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;td&gt;50%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hosted tools&lt;/td&gt;
&lt;td&gt;Web search ($10 / 1K searches), web fetch, code execution, tool search, MCP connector, computer and browser use&lt;/td&gt;
&lt;td&gt;Web search ($10 / 1K calls), file search, hosted shell / code interpreter, computer use, MCP, tool search&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Voice / realtime&lt;/td&gt;
&lt;td&gt;Text and image in, text out&lt;/td&gt;
&lt;td&gt;Dedicated realtime and voice models&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Look at the price rows for a second. Not long ago, a "Claude vs GPT" post was half about cost. Now the cheap tiers start at the same price, the workhorse tiers are identical, and the top tiers are identical. Rate cards aren't where the difference is anymore.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where they actually differ for agent builders
&lt;/h2&gt;

&lt;h3&gt;
  
  
  The API shape
&lt;/h3&gt;

&lt;p&gt;On Claude, an agent turn is a Messages API call. If the model wants a tool, the response has &lt;code&gt;stop_reason: "tool_use"&lt;/code&gt; and one or more &lt;code&gt;tool_use&lt;/code&gt; blocks; you run them and send back a user turn full of &lt;code&gt;tool_result&lt;/code&gt; blocks. On GPT, the newest models require the Responses API for tool calling: the output is a list of items, tool calls come back as &lt;code&gt;function_call&lt;/code&gt; items, and you return &lt;code&gt;function_call_output&lt;/code&gt; items, optionally chaining with &lt;code&gt;previous_response_id&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Neither is better in the abstract. They are different enough that "we'll just swap the model later" is a week of work, not a config change, once you've built retries, caching, cost logging and error handling around one of them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Caching control
&lt;/h3&gt;

&lt;p&gt;This is the one that decided it for me. Claude lets you mark exactly where the cacheable prefix ends with &lt;code&gt;cache_control&lt;/code&gt; breakpoints (or let the API place them automatically). In a conversational agent, where the system prompt is static and the history grows every turn, being able to say "cache everything up to here" is the difference between cost that grows with the square of the conversation and cost that grows roughly linearly. I wrote up the full story in &lt;a href="https://www.joancomadran.dev/blog/keeping-claudes-token-bill-from-ruining-your-month" rel="noopener noreferrer"&gt;keeping Claude's token bill from ruining your month&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;OpenAI discounts cached input heavily too, so this isn't "Claude caches, GPT doesn't." It's about how much you get to steer it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Long context billing
&lt;/h3&gt;

&lt;p&gt;Both vendors offer roughly a million tokens of context. The difference is the bill: Anthropic charges the full 1M window at the standard rate on its current models (Haiku 5.5 aside), while OpenAI lists a separate, higher long-context price on Astra, Sol and Luna. If your agent stuffs whole codebases, contracts or long transcripts into context, model that difference before you pick. If your prompts are a few thousand tokens, it doesn't matter.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hosted tools
&lt;/h3&gt;

&lt;p&gt;Both now run web search on their side and support MCP. OpenAI has hosted &lt;strong&gt;file search&lt;/strong&gt; with managed storage and a full line of &lt;strong&gt;realtime voice&lt;/strong&gt; models; if you're building a phone or voice agent, that alone probably decides it. Anthropic has server-side web search and web fetch, code execution, a tool-search tool for large tool sets, and an MCP connector that talks to remote MCP servers straight from the Messages API.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I actually run in production (and why)
&lt;/h2&gt;

&lt;p&gt;None of my agents use LangChain or the Vercel AI SDK. Every one calls &lt;code&gt;@anthropic-ai/sdk&lt;/code&gt; directly, because the provider-specific features are exactly the ones I'm relying on. Here are two, straight from the repos.&lt;/p&gt;

&lt;h3&gt;
  
  
  Claient: a multi-tenant WhatsApp agent on Haiku
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.joancomadran.dev/projects/claient" rel="noopener noreferrer"&gt;Claient&lt;/a&gt; answers and qualifies WhatsApp leads for small businesses (&lt;a href="https://www.joancomadran.dev/blog/whatsapp-bot-with-claude" rel="noopener noreferrer"&gt;the build story is here&lt;/a&gt;). The model choice is gated by who pays:&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;// With the platform key (we pay), only Haiku is served.&lt;/span&gt;
&lt;span class="c1"&gt;// Tenants who bring their own key (BYOK) can pick Sonnet or Opus.&lt;/span&gt;
&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MODELO_BASE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;claude-haiku-4-5-20251001&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;modeloEfectivo&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;opts&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;model&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&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;opts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;apiKey&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;MODELO_BASE&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;opts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;model&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="nf"&gt;getClaudeConfig&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nx"&gt;model&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;The reply runs in a tool-use loop with three booking tools (check availability, book, reschedule). Two guards matter more than the model: a hard cap of five loop iterations, and a time budget, because a serverless function killed mid-loop means the lead got a message but the webhook didn't finish, and Meta's retry sends it twice:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MAX_ITER_TOOLS&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;MARGEN_VUELTA_MS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="nx"&gt;_000&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// SDK timeout 15 s + 1 retry must fit&lt;/span&gt;

&lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;MAX_ITER_TOOLS&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="o"&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;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nf"&gt;hayMargen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;opts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;deadline&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// fall back instead of dying mid-turn&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;respuesta&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;claude&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="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;max_tokens&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;system&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="nx"&gt;tools&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;respuesta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;stop_reason&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;tool_use&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="c1"&gt;// run each tool_use block, push the tool_result blocks, loop again&lt;/span&gt;
    &lt;span class="k"&gt;continue&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;textOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;respuesta&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;Lead qualification is a separate call that &lt;em&gt;forces&lt;/em&gt; a tool, &lt;code&gt;tool_choice: { type: "tool", name: "registrar_lead" }&lt;/code&gt;, with nullable fields and an enum for lead temperature (cold, warm, hot). Forcing a tool is the most reliable way I know to get structured data out of a conversation, and GPT can do the same thing with &lt;code&gt;tool_choice&lt;/code&gt; plus strict mode. The cache breakpoints sit on the system prompt and the latest turn, and the history sent is a window of the last 16 messages plus a rolling summary. Every call logs input, output, cache-read and cache-write tokens and their USD cost per tenant, with a monthly spend cap.&lt;/p&gt;

&lt;p&gt;An honest footnote: Claient still pins Haiku 4.5, which is now a legacy model. Haiku 5.5 lists at a tenth of the price. That's the obvious thing to test next, and it's also a good example of why you want evals: "cheaper and newer" is a hypothesis until your own conversations say otherwise.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pollitics: two models, two jobs
&lt;/h3&gt;

&lt;p&gt;For &lt;a href="https://pollitics.es" rel="noopener noreferrer"&gt;pollitics.es&lt;/a&gt;, a weekly job drafts candidate questions about the week's news for a human to review. It's split into two Claude calls on purpose:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Research&lt;/strong&gt; on Sonnet 5.5 with Anthropic's server-side web search (&lt;code&gt;max_uses: 10&lt;/code&gt;, effort &lt;code&gt;medium&lt;/code&gt;). Most of the cost here is input tokens from the pages it reads, so the cheaper model does the reading.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drafting&lt;/strong&gt; on Opus 5.5 with JSON-schema structured output (effort &lt;code&gt;high&lt;/code&gt;), where editorial nuance matters and the input is small.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's two calls, not one, because structured output doesn't carry the search citations, so the research comes back as text with URLs and the drafter works from that. The code also handles &lt;code&gt;pause_turn&lt;/code&gt; (the server-side search loop paused, send it back to continue) and &lt;code&gt;refusal&lt;/code&gt; stop reasons, and the whole thing has to fit inside a 150-second Edge Function. A deterministic review step then flags anything that breaks the editorial rules before a person approves it.&lt;/p&gt;

&lt;h3&gt;
  
  
  So why Claude?
&lt;/h3&gt;

&lt;p&gt;Not because GPT couldn't run either of these. The reasons are concrete and a little boring:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Cache breakpoints matched the architecture.&lt;/strong&gt; Static script plus growing history is exactly the shape explicit &lt;code&gt;cache_control&lt;/code&gt; is good at.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tiering within one vendor.&lt;/strong&gt; Haiku for every message, Sonnet for reading the web, Opus for the writing that matters. One SDK, one usage format, one cost table. &lt;a href="https://www.joancomadran.dev/projects/dairector" rel="noopener noreferrer"&gt;Dairector&lt;/a&gt;'s script doctor runs on Claude too.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;BYOK stays simple.&lt;/strong&gt; Tenants paste one kind of key. Supporting two providers' keys, models and error classes would double the surface for very little customer value.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Compounding.&lt;/strong&gt; Timeouts, retries, error classification (&lt;code&gt;AuthenticationError&lt;/code&gt; vs transient 429/5xx), cost logging: all written once, against one SDK. That's the real lock-in, and it's mine, not the vendor's.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  When to use which
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Choose Claude when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Your agent is conversational or long-running and context grows every turn, so caching control pays for itself.&lt;/li&gt;
&lt;li&gt;You need very long context and don't want a long-context surcharge on the mid and top tiers.&lt;/li&gt;
&lt;li&gt;You want one vendor with a clear cheap / workhorse / heavy ladder to route tasks across.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Choose GPT when:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You're building a voice or phone agent and want first-party realtime models.&lt;/li&gt;
&lt;li&gt;You want hosted file search over your documents without running your own vector store.&lt;/li&gt;
&lt;li&gt;Your organisation already has OpenAI or Azure OpenAI contracts, data agreements and monitoring in place. That's a perfectly good reason; procurement is engineering too.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Either way:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Build a small eval set from real conversations (twenty is enough to start) and run both on your actual tool schemas before you commit.&lt;/li&gt;
&lt;li&gt;Put the model call behind one module of your own so a future switch touches one file.&lt;/li&gt;
&lt;li&gt;Cap loop iterations and spend from day one. Neither vendor will do that for you.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're weighing this for a real product and want someone who has shipped agents end-to-end to make the call with you, that's &lt;a href="https://www.joancomadran.dev/ai-engineering" rel="noopener noreferrer"&gt;what I do&lt;/a&gt;. For the rest of the stack around the model, see &lt;a href="https://www.joancomadran.dev/blog/ship-an-ai-product-in-a-weekend" rel="noopener noreferrer"&gt;how I ship an AI product in a weekend&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  FAQ
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Is Claude or GPT better for building AI agents in 2026?
&lt;/h3&gt;

&lt;p&gt;Neither wins across the board. As of October 2026 the price tiers mirror each other (Sonnet 5.5 and GPT-6.1 Sol are both $2/$10 per million tokens; Haiku 5.5 and GPT-6 Luna both start at $0.10/$0.50), both offer 1M-token context, 128K max output, strict schema-enforced tool calls and hosted web search. Claude is the better default if you want explicit control over prompt caching and long context billed at the standard rate; GPT is the better default for voice agents, hosted file search, or teams already on OpenAI or Azure. Run your own eval on your own tool schemas before committing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is Claude more expensive than GPT for agents?
&lt;/h3&gt;

&lt;p&gt;Not anymore at list price. As of October 2026 the mid tiers (Claude Sonnet 5.5 and GPT-6.1 Sol) are both $2 input / $10 output per million tokens, the cheap tiers (Claude Haiku 5.5 and GPT-6 Luna) both start at $0.10 / $0.50, and the top tiers (Claude Fable 5.1 and GPT-6 Astra) are both $10 / $50. Claude Opus 5.5 sits in between at $4 / $20. Both offer 50% off for batch work and discounted cached input. Real cost differences come from how much context you resend and how well you cache it, not the rate card.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I switch an agent from Claude to GPT later?
&lt;/h3&gt;

&lt;p&gt;Yes, but it is not a one-line change. The Claude Messages API uses &lt;code&gt;tool_use&lt;/code&gt; and &lt;code&gt;tool_result&lt;/code&gt; content blocks; OpenAI's Responses API, which GPT-6 Astra and GPT-6.1 Sol require for tool calling, uses &lt;code&gt;function_call&lt;/code&gt; and &lt;code&gt;function_call_output&lt;/code&gt; items. Caching, usage fields, error classes and hosted tools also differ. Keep the model call behind one small module of your own so a switch touches one file, and keep an eval set so you can tell whether the switch was an improvement.&lt;/p&gt;

&lt;h3&gt;
  
  
  Which model does Joan Comadran use for production AI agents?
&lt;/h3&gt;

&lt;p&gt;Claude, called directly through the Anthropic TypeScript SDK with no agent framework. Claient, the WhatsApp lead agent, runs Claude Haiku 4.5 by default with tool use for appointment booking and forced tool calls for lead extraction, and lets tenants bring their own key to use Sonnet or Opus. The weekly-question pipeline for pollitics.es uses Claude Sonnet 5.5 with server-side web search for research and Claude Opus 5.5 with JSON-schema structured output for drafting.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do I need LangChain or another framework to build an agent with Claude or GPT?
&lt;/h3&gt;

&lt;p&gt;No. A tool-use agent is a loop: call the model with tool definitions, execute any tool calls it returns, send the results back, and stop when it answers in text. Both official SDKs make that a few dozen lines, and both vendors now offer optional helpers (Anthropic's Tool Runner, OpenAI's Agents SDK). A framework can help with many providers or complex orchestration, but it also hides the provider-specific features, like cache breakpoints and server tools, that most of the cost and reliability wins come from.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://www.joancomadran.dev/blog/claude-vs-gpt-for-ai-agents" rel="noopener noreferrer"&gt;joancomadran.dev&lt;/a&gt;. I'm Joan, an AI engineer in Barcelona — &lt;a href="https://www.joancomadran.dev/ai-engineering" rel="noopener noreferrer"&gt;work with me&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>claude</category>
      <category>openai</category>
    </item>
  </channel>
</rss>
