<?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>How to Automate the ChatGPT &amp; Gemini Web UIs Without an API Key</title>
      <dc:creator>Usama</dc:creator>
      <pubDate>Tue, 30 Jun 2026 12:35:30 +0000</pubDate>
      <link>https://dev.to/pseudo_usama/how-to-automate-the-chatgpt-gemini-web-uis-without-an-api-key-2ek8</link>
      <guid>https://dev.to/pseudo_usama/how-to-automate-the-chatgpt-gemini-web-uis-without-an-api-key-2ek8</guid>
      <description>&lt;p&gt;You've got a folder of a few hundred screenshots and you want the text out of each one. Or you want to generate a batch of images for a side project. Or you just want to drop a single "summarize this" call into a script you're writing on a Sunday afternoon. So you open the pricing page for the official API, do the math on per-token billing plus setting up keys and a payment method, and it's hard to justify, because the exact same model will do the exact same thing for free in a browser tab.&lt;/p&gt;

&lt;p&gt;There are really two ways to get a model like ChatGPT or Gemini to do work for you. The web UI is free, or already covered by a subscription you're paying for anyway, but you drive it by hand. The API is scriptable, but you pay by the token. Most of the time that trade-off is fine. But for a whole category of work like hobby projects, throwaway scripts, research, or anything that doesn't need production-grade reliability, you're stuck picking between "free but manual" and "automated but paid."&lt;/p&gt;

&lt;p&gt;Which raises the obvious question: why not automate the free web UI? It's just a webpage. You open it, type in the box, click send. It turns out that hides a few fiddly problems, which I ran into enough times that I eventually built a small &lt;a href="https://github.com/pseudo-usama/hermex" rel="noopener noreferrer"&gt;library&lt;/a&gt; for them. In this article we'll work through what it takes to automate these UIs, and at the end I'll show how little code it comes down to.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. What it takes to drive a chat UI
&lt;/h2&gt;

&lt;p&gt;A single round trip with ChatGPT or Gemini breaks down into four jobs:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Get your text into the input box&lt;/li&gt;
&lt;li&gt;Optionally attach a file&lt;/li&gt;
&lt;li&gt;Wait for the model to finish answering&lt;/li&gt;
&lt;li&gt;And read the answer back out.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Every one of these is harder than it sounds, because the page is a modern single-page app that was never built to be driven by a script. We'll use Selenium with undetected-chromedriver, and for now assume the browser is already open (we'll get to launching it in the next section). To keep the code readable I'll show whichever of the two platforms makes each problem clearest, and mention the other where it differs.&lt;/p&gt;

&lt;h3&gt;
  
  
  1.1 Typing the message
&lt;/h3&gt;

&lt;p&gt;The first surprise is that the input isn't a normal text field you can drop a string into. On ChatGPT it's a &lt;code&gt;contenteditable&lt;/code&gt; div, and on Gemini it's a custom &lt;code&gt;rich-textarea&lt;/code&gt; element. You can still send keystrokes to it, but two things will trip you up. A plain Enter submits the message, so any newline inside your prompt has to go in as Shift+Enter. And emoji and other characters outside the basic range quietly break send_keys, so those need to be inserted through JavaScript instead.&lt;/p&gt;

&lt;p&gt;That pushes you toward sending the message one character at a time:&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;selenium.webdriver.common.by&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;By&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;selenium.webdriver.common.keys&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Keys&lt;/span&gt;

&lt;span class="n"&gt;box&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_element&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;By&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CSS_SELECTOR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;div[contenteditable=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;true&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;]&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;click&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;char&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;char&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="c1"&gt;# A plain Enter would send the message early
&lt;/span&gt;        &lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Keys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;SHIFT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Keys&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ENTER&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;char&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Gemini works the same way, just against the &lt;code&gt;rich-textarea&lt;/code&gt; element instead of the &lt;code&gt;contenteditable&lt;/code&gt; div.&lt;/p&gt;

&lt;h3&gt;
  
  
  1.2 Uploading a file
&lt;/h3&gt;

&lt;p&gt;This is where it gets interesting. The file &lt;code&gt;&amp;lt;input&amp;gt;&lt;/code&gt; on the page is hidden, and the useful trick is that you don't need to open a file dialog at all: if you can get a reference to a hidden &lt;code&gt;input[type=file]&lt;/code&gt;, you can hand it a path with &lt;code&gt;send_keys&lt;/code&gt; and ChromeDriver does the upload internally, no dialog involved.&lt;/p&gt;

&lt;p&gt;ChatGPT is the easy case. The input already exists in the page, so you unhide it and send the path. Gemini is the awkward one. Clicking its upload button makes the page call the input's own &lt;code&gt;.click()&lt;/code&gt;, which pops the operating system's file picker, a window Selenium has no way to drive. The fix is to stop the page from opening that dialog in the first place, by monkey-patching the browser's &lt;code&gt;click&lt;/code&gt; method so it ignores the call on file inputs:&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;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute_script&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
    const orig = HTMLInputElement.prototype.click;
    HTMLInputElement.prototype.click = function () {
        if (this.type === &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;file&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;) return;   // swallow the call that opens the OS dialog
        return orig.apply(this, arguments);
    };
&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;With that in place you can walk through Gemini's upload menu without a dialog ever appearing, then find the hidden input it creates, unhide it, and feed it the path:&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;file_input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_element&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;By&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CSS_SELECTOR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;input[name=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Filedata&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;]&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute_script&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;arguments[0].style.display = &lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;block&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;;&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;file_input&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;file_input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/path/to/receipt.jpg&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;In real code you'd restore the original &lt;code&gt;click&lt;/code&gt; afterward so the patch doesn't leak into the rest of the session, but the four lines above are the whole idea. The recurring lesson with this kind of automation is that the hardest problems are the ones where the page actively fights you.&lt;/p&gt;

&lt;h3&gt;
  
  
  1.3 Waiting for the response
&lt;/h3&gt;

&lt;p&gt;You've sent the message. Now you have to know when the model is done, and there's no event you can listen for and no callback that fires. You poll the page and read its visual cues. The cleanest signal on ChatGPT is the stop button: while a response is being generated there's a stop button on screen, and when generation finishes it disappears.&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;time&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;is_generating&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;bool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_elements&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;By&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CSS_SELECTOR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;[data-testid=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;stop-button&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;]&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="nf"&gt;is_generating&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
    &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The principle here is that you're inferring application state from interface elements that were never meant to be read as an API.&lt;/p&gt;

&lt;h3&gt;
  
  
  1.4 Getting the response out
&lt;/h3&gt;

&lt;p&gt;The reply lives in the page as rendered HTML. Pulling the text out is a matter of finding the right container in the last response and reading it:&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;turn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_elements&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;By&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CSS_SELECTOR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.agent-turn&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="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;   &lt;span class="c1"&gt;# the most recent response
&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;turn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;find_element&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;By&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;CSS_SELECTOR&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;.markdown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want the raw markdown source instead of the rendered text, there's a copy button you can click and then read off the clipboard. And if the response contains a generated image, getting it out is its own small pipeline: you click the image's download button and then wait for the file to arrive in your download folder, skipping the partial &lt;code&gt;.crdownload&lt;/code&gt; file the browser writes while the download is still in progress.&lt;/p&gt;

&lt;p&gt;That's a full round trip: text in, file attached, wait for the answer, text or image back out. Run it twice, though, and you hit the next problem. The second time your script opens the browser, you're logged out and starting from a blank session, which is where the next piece comes in.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Making it survive across runs
&lt;/h2&gt;

&lt;p&gt;The reason your second run starts logged out is that an automated browser, by default, begins every session from nothing: no cookies, no history, no saved login. So before any of the previous section's code is useful in practice, you need the browser to remember who you are between runs, and you need it to behave enough like a real session that the platform doesn't start throttling you. That comes down to one Chrome setting, a one-time setup step, and typing at a human pace.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.1 A browser profile that persists
&lt;/h3&gt;

&lt;p&gt;Chrome keeps everything about your identity on a site, including cookies and login sessions, inside a profile directory. If you let Chrome spin up a throwaway profile each run, you lose all of that the moment the script ends. Point it at a directory you control instead, and the login survives:&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;undetected_chromedriver&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;uc&lt;/span&gt;

&lt;span class="n"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;uc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;ChromeOptions&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add_argument&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-data-dir=/path/to/your/profile&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;driver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;uc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Chrome&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things are happening here. &lt;code&gt;undetected-chromedriver&lt;/code&gt; is a drop-in replacement for Selenium's Chrome that smooths over the most obvious tells of an automated browser. And the &lt;code&gt;--user-data-dir&lt;/code&gt; flag is the part that gives you persistence: it tells Chrome to store its profile in a folder of your choosing, so the session you logged into yesterday is still there today. A profile with real history also looks like a returning user rather than a brand-new automated one, which keeps the session healthier over time.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.2 Logging in, once
&lt;/h3&gt;

&lt;p&gt;A profile directory is only useful once there's a logged-in session inside it, so there's a one-time setup step. You open the browser pointed at your profile, log in by hand, then close it. Every automated run after that reuses the saved session.&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;driver&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;uc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Chrome&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;options&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;driver&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;https://gemini.google.com&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Log into the browser window, then press Enter here to finish setup.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;driver&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;quit&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Logging in is also where a paid plan pays off. If you already subscribe to ChatGPT Plus or a paid Gemini tier, signing in during setup means every automated run uses that subscription, with its higher message limits and access to the better models, instead of being capped at the free tier. You do this once per machine and forget about it.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.3 Typing at a human pace
&lt;/h3&gt;

&lt;p&gt;A script that drops an entire prompt into the box in a single instant doesn't behave like a person at a keyboard, and sessions that look automated are the ones that get rate-limited or challenged. The fix is cheap. We're already sending the message one character at a time, so all it takes is a small, slightly random delay between keystrokes:&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;time&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;random&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;char&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;box&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;send_keys&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;char&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;random&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uniform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.02&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;   &lt;span class="c1"&gt;# a human pace, not an instant dump
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The randomness matters more than the exact timing, since a perfectly even rhythm is itself a tell.&lt;/p&gt;

&lt;p&gt;With that, the machine is complete. The browser stays logged in across runs, and the input behaves enough like a real person to keep the session stable. You've now seen everything that goes into automating these interfaces, which means it's a good moment to step back and see how much of it you have to write yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. All of that, in a few lines
&lt;/h2&gt;

&lt;p&gt;Every problem in the last two sections is the kind you want to solve once and then never think about again. That's what pushed me to wrap the whole thing up into a library. It's called Hermex, and you install it with &lt;code&gt;pip install hermex&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The one-time login from the previous section becomes a single call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;hermex&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ChatGPT&lt;/span&gt;

&lt;span class="n"&gt;ChatGPT&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;   &lt;span class="c1"&gt;# opens a browser once: log in, then close the window
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After that, the entire round trip from earlier, launching the browser, typing, uploading, waiting for the response, and reading it back, is one line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ChatGPT&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;simple_query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;What does this receipt say?&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;attachments&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;receipt.jpg&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For a back-and-forth conversation, keep the browser open and call &lt;code&gt;query&lt;/code&gt; as many times as you want:&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;hermex&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Gemini&lt;/span&gt;

&lt;span class="n"&gt;gemini&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Gemini&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;gemini&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;open_url&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gemini&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Summarize the history of the internet.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;gemini&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Now just the key dates.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;gemini&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;close&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And a generated image comes back as a path to the downloaded file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;gemini&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;query&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Generate an image of a mountain at sunset.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;image&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Under the hood, that's everything from the previous sections: the character-by-character typing with its newline and emoji handling, the hidden-input upload with Gemini's dialog suppression, the polling that waits for generation to finish, the text and image extraction, and the persistent profile that keeps you logged in. None of it is conceptually hard, but it's a lot of fiddly surface area to get right and, harder still, to keep working as the interfaces change. That last part is the real argument for not hand-rolling it every time. Hermex is open source under the MIT license, and the code is on GitHub at &lt;a href="https://github.com/pseudo-usama/hermex" rel="noopener noreferrer"&gt;github.com/pseudo-usama/hermex&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Wrapping up
&lt;/h2&gt;

&lt;p&gt;Automating a chat web UI comes down to a handful of problems that each look trivial and aren't: getting text into an input that isn't a text field, attaching files through an element the page hides from you, knowing when the model has finished without any event to tell you, and pulling the answer back out. Wrap those up with a profile that stays logged in, and it collapses to a single line you can call from a script.&lt;/p&gt;

&lt;p&gt;The catch is that it's brittle by nature. You're driving an interface built for people, not programs, and a redesign that moves a button or renames a class will quietly break it. That makes it a great fit for hobby projects, scripts, and research, and a poor fit for production, where the official API earns its cost. And since ChatGPT and Gemini each have their own terms of service, where you take this is your call and your responsibility.&lt;/p&gt;

&lt;p&gt;The code is on &lt;a href="https://github.com/pseudo-usama/hermex" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt; if it's useful. The documentation is available at &lt;a href="https://hermex.usama.ai/" rel="noopener noreferrer"&gt;hermex.usama.ai&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>chatgpt</category>
      <category>llm</category>
    </item>
    <item>
      <title>Gemma-4 31B + vLLM + RTX 6000 PRO : 1168 tokens/sec and still asking for more...</title>
      <dc:creator>Nikhil</dc:creator>
      <pubDate>Tue, 30 Jun 2026 12:35:13 +0000</pubDate>
      <link>https://dev.to/hexgrid_cloud/gemma-4-31b-vllm-rtx-6000-pro-1168-tokenssec-and-still-asking-for-more-418b</link>
      <guid>https://dev.to/hexgrid_cloud/gemma-4-31b-vllm-rtx-6000-pro-1168-tokenssec-and-still-asking-for-more-418b</guid>
      <description>&lt;p&gt;We pushed Gemma-4 31B to 24 concurrent requests on a single RTX 6000 PRO Blackwell. The queue never filled. ~1.17k tokens/sec, and it still had headroom.&lt;/p&gt;

&lt;p&gt;Most LLM "benchmarks" show you one request at a time. That tells you almost nothing about production. &lt;/p&gt;

&lt;p&gt;So we ran Gemma-4 31B (FP8) on vLLM under a real ShareGPT workload, ramping concurrency 12 → 16 → 20 → 24, and watched what actually happens.&lt;/p&gt;




&lt;h2&gt;
  
  
  The numbers that mattered:
&lt;/h2&gt;

&lt;p&gt;→ &lt;strong&gt;Peak throughput&lt;/strong&gt;: ~1,168 tokens/sec total (~548 tok/s output) &lt;/p&gt;

&lt;p&gt;→ &lt;strong&gt;Median time-to-first-token&lt;/strong&gt;: ~0.7s — snappy even under load &lt;/p&gt;

&lt;p&gt;→ &lt;strong&gt;Queue depth&lt;/strong&gt;: averaged 0.41, peaked at just 3 while 14–21 requests ran concurrently &lt;/p&gt;

&lt;p&gt;→ &lt;strong&gt;Server stayed unsaturated across the entire sweep&lt;/strong&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  The one thing to watch:
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Tail TTFT.&lt;/strong&gt; &lt;br&gt;
Median first-token stays fast, but p99 climbs to ~19s at the heaviest concurrency. That's the first metric to flex as you push higher — not throughput, not the queue.&lt;/p&gt;




&lt;h2&gt;
  
  
  Setup:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;1× &lt;strong&gt;RTX 6000 PRO Blackwell&lt;/strong&gt; (96GB)&lt;/li&gt;
&lt;li&gt;Gemma-4 31B-it, FP8 checkpoint&lt;/li&gt;
&lt;li&gt;vLLM 0.20 — prefix caching + chunked prefill on&lt;/li&gt;
&lt;li&gt;ShareGPT workload, 1024 max output tokens, streaming ON&lt;/li&gt;
&lt;li&gt;Max model length (context) : 4096 &lt;/li&gt;
&lt;/ul&gt;




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

&lt;p&gt;A single Blackwell card runs a 31B model at 24-way concurrency without breaking a sweat. The high end-to-end latency is just long generations, not queuing — and there's clearly room to climb past 24.&lt;/p&gt;




&lt;h2&gt;
  
  
  Token Throughput chart:
&lt;/h2&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%2Fh6nrx3g42yim5jietd44.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%2Fh6nrx3g42yim5jietd44.png" alt=" " width="800" height="317"&gt;&lt;/a&gt;&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%2F3ujttwupmre12c97enp7.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%2F3ujttwupmre12c97enp7.png" alt=" " width="800" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  E2E Latency Chart
&lt;/h2&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%2Fmw50onrs24bvfqart309.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%2Fmw50onrs24bvfqart309.png" alt=" " width="800" height="322"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Full writeup — configs, charts, and per-concurrency breakdown — in the comments. ↓&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>gemma</category>
      <category>nvidia</category>
    </item>
    <item>
      <title>Changes to LLM pricing: Ambient and Novita</title>
      <dc:creator>Narev Bot</dc:creator>
      <pubDate>Tue, 30 Jun 2026 12:32:44 +0000</pubDate>
      <link>https://dev.to/narevbot/changes-to-llm-pricing-ambient-and-novita-5799</link>
      <guid>https://dev.to/narevbot/changes-to-llm-pricing-ambient-and-novita-5799</guid>
      <description>&lt;p&gt;Model price changes detected for Ambient and Novita. Details below.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>news</category>
    </item>
    <item>
      <title>GLM-5.2 vs Anthropic Mythos for Bug Finding: Architectures, Benchmarks, and Production Playbook</title>
      <dc:creator>Delafosse Olivier</dc:creator>
      <pubDate>Tue, 30 Jun 2026 12:30:12 +0000</pubDate>
      <link>https://dev.to/olivier-coreprose/glm-52-vs-anthropic-mythos-for-bug-finding-architectures-benchmarks-and-production-playbook-291i</link>
      <guid>https://dev.to/olivier-coreprose/glm-52-vs-anthropic-mythos-for-bug-finding-architectures-benchmarks-and-production-playbook-291i</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;Originally published on &lt;a href="https://www.coreprose.com/kb-incidents/glm-5-2-vs-anthropic-mythos-for-bug-finding-architectures-benchmarks-and-production-playbook?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=kb-incidents" rel="noopener noreferrer"&gt;CoreProse KB-incidents&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By 2026, most developers already pair-program with an AI assistant; the real decision is &lt;em&gt;which&lt;/em&gt; model is allowed near production code, secrets, and &lt;a href="https://dev.to/entities/6a17eccda2d594d36d239dff-ci"&gt;CI&lt;/a&gt; pipelines.[1] These assistants run on large-scale &lt;a href="https://en.wikipedia.org/wiki/Artificial_intelligence" rel="noopener noreferrer"&gt;artificial intelligence&lt;/a&gt; and &lt;a href="https://en.wikipedia.org/wiki/Generative_AI" rel="noopener noreferrer"&gt;generative AI&lt;/a&gt; foundations, and their behavior under real operational pressure matters.&lt;/p&gt;

&lt;p&gt;For bug finding—especially security issues—the model choice affects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How many real defects you catch
&lt;/li&gt;
&lt;li&gt;How many new vulnerabilities you introduce
&lt;/li&gt;
&lt;li&gt;How much every CI run costs
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This article compares Zhipu AI’s GLM-5.2 and &lt;a href="https://dev.to/entities/69d05cf64eea09eba3dfcc08-anthropic"&gt;Anthropic&lt;/a&gt;’s &lt;a href="https://en.wikipedia.org/wiki/Anthropic" rel="noopener noreferrer"&gt;Mythos&lt;/a&gt; as bug-finding engines in realistic &lt;a href="https://dev.to/entities/69d15a4e4eea09eba3dfe1b0-rag"&gt;RAG&lt;/a&gt;, agent, and &lt;a href="https://dev.to/entities/6a0be90a1f0b27c1f427162d-cicd"&gt;CI/CD&lt;/a&gt; architectures. The focus is reusable evaluation and rollout, not leaderboard scores.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Problem Framing: Why Compare GLM-5.2 and Mythos for Bug Finding?
&lt;/h2&gt;

&lt;p&gt;By 2026, AI copilots are baseline; the differentiator is &lt;em&gt;fit to workflow and risk profile&lt;/em&gt;, not raw coding ability.[1] Pentesters already see very different security behavior across assistants: some explain vulns well, others write exploits easily, and some introduce insecure patterns into code.[1]&lt;/p&gt;

&lt;p&gt;📊 &lt;strong&gt;Enterprise reality&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Around 68% of organizations put 30% or fewer generative AI projects into production, primarily due to underestimated integration, governance, and data prep complexity.[3] The same issues appear when wiring GLM-5.2 or Mythos into CI as automated reviewers.&lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Demo vs production gap&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Serving LLMs in production means handling:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Latency SLAs and tail latencies
&lt;/li&gt;
&lt;li&gt;Token-based pricing and unbounded loops
&lt;/li&gt;
&lt;li&gt;Observability of prompts, context, and outputs
&lt;/li&gt;
&lt;li&gt;Hallucinations and unsafe tool calls[8][10]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A model that feels great in the IDE can be unusable when every PR triggers hundreds of RAG + tool steps in CI.[8]&lt;/p&gt;

&lt;p&gt;💼 &lt;strong&gt;Anecdote:&lt;/strong&gt; A 40-person fintech added an LLM static reviewer to CI and quickly hit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;3× longer CI times
&lt;/li&gt;
&lt;li&gt;Insecure crypto suggestions merged
&lt;/li&gt;
&lt;li&gt;A surprise four-figure API bill from an unbounded agent loop[10]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not because the model was bad, but because it was treated as a chatbot, not an infrastructure component.&lt;/p&gt;

&lt;p&gt;Security audits of LLM apps now routinely find &lt;a href="https://dev.to/entities/69d08f194eea09eba3dfd055-prompt-injection"&gt;prompt injection&lt;/a&gt;, RAG poisoning, code exfiltration, and unsafe tool execution; “LLM pentest” offerings have emerged.[9] Your bug-finding model is part of the attack surface. In a world of AI worms and AI-orchestrated espionage, ignoring this is negligent.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Framing question&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
For CI-integrated AI code review and bug triage, under regulatory and security pressure, &lt;strong&gt;does GLM-5.2 or Mythos deliver better end-to-end value—accuracy, cost, and risk—once embedded in a full stack?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The rest of the article gives you the tools to answer that in your own environment.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Evaluation Methodology: How to Measure Bug-Finding Performance Rigorously
&lt;/h2&gt;

&lt;p&gt;A serious comparison needs more than anecdotes. Following production evaluation playbooks, define metrics &lt;em&gt;before&lt;/em&gt; prompt or pipeline tuning.[6]&lt;/p&gt;

&lt;h3&gt;
  
  
  2.1 Core metrics
&lt;/h3&gt;

&lt;p&gt;Capture at least:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Defect recall:&lt;/strong&gt; fraction of known bugs correctly identified and fixed
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Localization accuracy:&lt;/strong&gt; correct file/function highlighted
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patch correctness:&lt;/strong&gt; compiles, tests pass, no new defects
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hallucination rate:&lt;/strong&gt; unsupported or failing suggestions[2][6]
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Latency &amp;amp; P95:&lt;/strong&gt; full path including RAG and tools[8]
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cost per 1K tokens and per CI run:&lt;/strong&gt; models, embeddings, tools[6][10]
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reproducibility:&lt;/strong&gt; stability across repeated runs with identical inputs[6]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;📊 Evaluation guidance stresses quantifying accuracy, latency, cost, and &lt;a href="https://dev.to/entities/69d08f184eea09eba3dfd04c-hallucinations"&gt;hallucinations&lt;/a&gt; before system tuning.[6]&lt;/p&gt;

&lt;h3&gt;
  
  
  2.2 Dataset design
&lt;/h3&gt;

&lt;p&gt;Build a labeled dataset that mirrors your real defects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Failing unit/integration tests
&lt;/li&gt;
&lt;li&gt;Known security issues (injection, auth bugs, secrets)
&lt;/li&gt;
&lt;li&gt;Flaky tests, race conditions
&lt;/li&gt;
&lt;li&gt;Performance regressions and leaks
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For each scenario, include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Minimal reproducer&lt;/strong&gt; (snippet or repo)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ground truth&lt;/strong&gt; (must-pass tests or neutralized CVE)
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Severity labels&lt;/strong&gt; (e.g., CVSS-like)[6][9]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Many generative AI projects fail at scale because they rely on synthetic examples and skip curated datasets.[3]&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Security scenarios to include&lt;/strong&gt;[1][9]  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unsafe input validation around SQL/OS commands
&lt;/li&gt;
&lt;li&gt;Insecure crypto or hard-coded secrets
&lt;/li&gt;
&lt;li&gt;Deserialization of untrusted data
&lt;/li&gt;
&lt;li&gt;Overpermissive auth logic
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These reflect real AI-generated and AI-modified code issues.[1]&lt;/p&gt;

&lt;h3&gt;
  
  
  2.3 Closed-book vs RAG-augmented
&lt;/h3&gt;

&lt;p&gt;Evaluate both modes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Closed-book:&lt;/strong&gt; Failing test, stack trace, relevant file only.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RAG-augmented:&lt;/strong&gt; Plus retrieved context (docs, logs, standards).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;RAG combines retrieval from a knowledge base with LLM generation to reduce hallucinations and use up-to-date internal knowledge.[2][4] For debugging, this often means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Logs and traces
&lt;/li&gt;
&lt;li&gt;Past incident tickets
&lt;/li&gt;
&lt;li&gt;Internal guidelines and security standards
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Well-tuned RAG can cut hallucinations by 40–60%, depending on domain.[2] Measure how much GLM-5.2 vs Mythos actually benefit in &lt;em&gt;your&lt;/em&gt; stack.&lt;/p&gt;

&lt;h3&gt;
  
  
  2.4 Experiment loop and governance
&lt;/h3&gt;

&lt;p&gt;Use an iterative loop:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Run baseline prompts and tools.
&lt;/li&gt;
&lt;li&gt;Log metrics and representative examples.
&lt;/li&gt;
&lt;li&gt;Adjust prompts, system messages, tools.
&lt;/li&gt;
&lt;li&gt;Re-run and compare via dashboards.[6]
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Persist prompts, retrieved docs, and generated diffs for traceability and auditability, as required by modern LLM governance frameworks and the AI Act.[5] Debug workloads involving personal data or safety-critical systems especially require this.[5]&lt;/p&gt;

&lt;p&gt;⚡ &lt;strong&gt;Mini-conclusion:&lt;/strong&gt; Treat evaluation as a product. If you can’t trend recall, hallucinations, and cost per CI run over time, you’re not ready to choose a model.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Architecture: GLM-5.2 vs Mythos in a RAG- and Tool-Enhanced Debugging Stack
&lt;/h2&gt;

&lt;p&gt;GLM-5.2 and Mythos are pluggable components inside a broader system. The surrounding architecture often matters as much as the model.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.1 High-level pipeline
&lt;/h3&gt;

&lt;p&gt;A typical production debugging pipeline:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Trigger:&lt;/strong&gt; CI detects a failing pipeline or new security finding.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieval – telemetry:&lt;/strong&gt; Fetch stack traces, logs, traces.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Retrieval – knowledge:&lt;/strong&gt; Query vector DB for code, docs, standards.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reasoning:&lt;/strong&gt; LLM analyzes context, localizes bug, proposes patch.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tools:&lt;/strong&gt; Run tests, linters, SAST/DAST, sandbox repro.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Decision:&lt;/strong&gt; Auto-apply patch, open PR, or comment only.
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is a standard RAG + tool-use pattern for code and observability data.[2][4][8]&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;RAG layout for code&lt;/strong&gt;[2][7]  &lt;/p&gt;

&lt;p&gt;Embed into a vector DB:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Source files and tests
&lt;/li&gt;
&lt;li&gt;Architecture docs and runbooks
&lt;/li&gt;
&lt;li&gt;Historical incident tickets
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Retrieve Top‑K chunks per failure via a vanilla RAG pipeline extended to code.&lt;/p&gt;

&lt;h3&gt;
  
  
  3.2 Query enhancement and GLM-5.2 vs Mythos
&lt;/h3&gt;

&lt;p&gt;Retrieval quality is often the bottleneck. Query enhancement—hypothetical questions, &lt;a href="https://en.wikipedia.org/wiki/Hyde" rel="noopener noreferrer"&gt;HyDE&lt;/a&gt;-style docs, sub-queries, stepback prompts—consistently boosts RAG performance.[7]&lt;/p&gt;

&lt;p&gt;For bug finding:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Turn a stack trace into multiple “what went wrong?” questions
&lt;/li&gt;
&lt;li&gt;Generate a hypothetical failure explanation and embed it (HyDE) to locate files[7]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Compare GLM-5.2 and Mythos on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Quality of these auxiliary queries/documents
&lt;/li&gt;
&lt;li&gt;Tendency to overfit to their own hypotheticals over retrieved context
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3.3 Agents, gateways, and guardrails
&lt;/h3&gt;

&lt;p&gt;Modern debugging stacks increasingly use agentic AI: networks of agents that plan, decompose, and call tools.[8] Both Mythos (in the Claude family)[8] and GLM-5.2 can power such systems.&lt;/p&gt;

&lt;p&gt;Typical orchestration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;AI gateway normalizes APIs, auth, and routing.
&lt;/li&gt;
&lt;li&gt;Requests are routed to GLM-5.2 or Mythos by latency, cost, sensitivity.[8][10]
&lt;/li&gt;
&lt;li&gt;Agents call tools (tests, scanners, sandboxes) and occasionally web search.
&lt;/li&gt;
&lt;li&gt;Many enterprises expose tools via the Model Context Protocol (MCP) so multiple agents share capabilities.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In this setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GLM-5.2 self-hosting can cut marginal cost but adds infra complexity.
&lt;/li&gt;
&lt;li&gt;Mythos as a managed API speeds adoption and may offer stricter alignment and data guarantees.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Tools like Claude Code show the risk: if agents can execute shells, weak constraints can run destructive commands on your repo. Agent meltdowns and bad configs rival model choice in importance.[9]&lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Non-negotiable guardrails&lt;/strong&gt;[9]  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Strict tool schemas and allowlists
&lt;/li&gt;
&lt;li&gt;Output validation (e.g., patches cannot modify auth middleware in “read-only” mode)
&lt;/li&gt;
&lt;li&gt;Prompt-injection filters on user input and retrieved docs
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💼 &lt;strong&gt;Production mapping&lt;/strong&gt;[8]  &lt;/p&gt;

&lt;p&gt;Many orgs now deploy LLMs behind:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ingress → AI gateway → model router
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://dev.to/entities/6a0b9b4f1f0b27c1f426f909-vector-db"&gt;Vector DB&lt;/a&gt; for RAG
&lt;/li&gt;
&lt;li&gt;Observability stack for prompts, retrievals, outputs
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This reflects 2025–2026 practice, far from the “single notebook” view.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Benchmark Scenarios: From Unit Test Failures to Security Vulnerabilities
&lt;/h2&gt;

&lt;p&gt;Your benchmark suite should cover correctness and safety, reflecting how pentesters and developers already use AI for exploitation and debugging.[1][9]&lt;/p&gt;

&lt;h3&gt;
  
  
  4.1 Security-heavy scenarios
&lt;/h3&gt;

&lt;p&gt;Design tasks like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Misconfigured auth logic (bypassable role checks)
&lt;/li&gt;
&lt;li&gt;Unsafe deserialization leading to RCE
&lt;/li&gt;
&lt;li&gt;Command injection behind partial validation
&lt;/li&gt;
&lt;li&gt;SQL injection via ORM edge cases[1][9]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each scenario should include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reproducible environment
&lt;/li&gt;
&lt;li&gt;Tests or PoCs proving exploitability and remediation[6]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Include at least one poisoning / prompt injection case where the model is steered toward disabling security checks, echoing concerns about AI worms and autonomous exploit chains.&lt;/p&gt;

&lt;p&gt;📊 LLM pentests now separate LLM/RAG-specific flaws (prompt injection, poisoning, unsafe tools) from classic web issues.[9]&lt;/p&gt;

&lt;h3&gt;
  
  
  4.2 Systemic and RAG-specific failures
&lt;/h3&gt;

&lt;p&gt;Include systemic failure modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Brittle CI pipelines around AI tools
&lt;/li&gt;
&lt;li&gt;Misaligned expectations between security and product
&lt;/li&gt;
&lt;li&gt;Poor data classification exposing sensitive logs[3][8]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;RAG-specific failures to benchmark:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Context poisoning:&lt;/strong&gt; Malicious docs instruct disabling security.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Irrelevant retrieval:&lt;/strong&gt; Wrong files → spurious fixes.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sensitive leakage:&lt;/strong&gt; RAG reveals secrets or confidential modules inappropriately.[2][9]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;💡 &lt;strong&gt;Example:&lt;/strong&gt; A pentest found a PDF in a RAG index that injected prompts convincing the LLM to dump internal config and bypass safeguards, mapped to OWASP LLM01.[9]&lt;/p&gt;

&lt;h3&gt;
  
  
  4.3 Multi-level tasks and insecure suggestions
&lt;/h3&gt;

&lt;p&gt;Design tasks across levels:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;“Fix this failing unit test.”
&lt;/li&gt;
&lt;li&gt;“Identify and remediate OWASP Top 10-style issues in this service.”
&lt;/li&gt;
&lt;li&gt;“Harden this CI workflow used by an LLM agent running tests.”[9]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Measure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;True defect recall
&lt;/li&gt;
&lt;li&gt;Precision of safe, compilable patches
&lt;/li&gt;
&lt;li&gt;Frequency of insecure patterns (e.g., SQL string concat, weak crypto) each model suggests[1]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This mirrors findings where AI tools rapidly generate complex but insecure scripts and exploits.[1]&lt;/p&gt;

&lt;h3&gt;
  
  
  4.4 Governance-aware tasks
&lt;/h3&gt;

&lt;p&gt;Include tasks where the model must:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Redact PII from logs before use
&lt;/li&gt;
&lt;li&gt;Avoid exporting data outside allowed regions
&lt;/li&gt;
&lt;li&gt;Respect retention and minimization constraints[5]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Governing LLM usage demands audit trails, lawful processing bases, and AI Act risk classification. Your benchmark should test how well GLM-5.2 vs Mythos respect these constraints without extreme prompt engineering.[5][3]&lt;/p&gt;

&lt;p&gt;⚡ &lt;strong&gt;Mini-conclusion:&lt;/strong&gt; Benchmarks that skip security, RAG poisoning, and governance will favor the “catchiest chatbot,” not the safest debugging engine.&lt;/p&gt;




&lt;h2&gt;
  
  
  5. Production Concerns: Latency, Cost, Governance, and Safety Trade-offs
&lt;/h2&gt;

&lt;p&gt;Even if Mythos beats GLM-5.2 by 10% recall, that can vanish if CI runs cost 10× more or break data residency rules.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.1 Cost per CI run
&lt;/h3&gt;

&lt;p&gt;Since pricing is token-based, estimate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Average tokens per request (prompt + context + output)
&lt;/li&gt;
&lt;li&gt;Requests per failing PR (including RAG and tools)
&lt;/li&gt;
&lt;li&gt;Price per 1K tokens for each model and embedding tier
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then compute &lt;strong&gt;cost per CI run&lt;/strong&gt; for GLM-5.2 vs Mythos under realistic failure and adoption rates.[6][10]&lt;/p&gt;

&lt;p&gt;📊 One real case: a developer left an AI loop on overnight and incurred a $3,000 API bill—showing how fast unbounded agents can explode costs.[10]&lt;/p&gt;

&lt;h3&gt;
  
  
  5.2 Latency and throughput at system level
&lt;/h3&gt;

&lt;p&gt;Measure end-to-end latency:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gateway/routing
&lt;/li&gt;
&lt;li&gt;Vector DB retrieval
&lt;/li&gt;
&lt;li&gt;Model inference
&lt;/li&gt;
&lt;li&gt;Tools (tests, linters, scanners)
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Network hops and external APIs often dominate latency, not raw model speed.[8][10] This matters when CI per-PR budgets are 5–10 minutes.&lt;/p&gt;

&lt;p&gt;Helpful techniques:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parallelize retrieval and tool calls
&lt;/li&gt;
&lt;li&gt;Batch multiple failing tests
&lt;/li&gt;
&lt;li&gt;Use cheaper models for “explanation-only” comments
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  5.3 Governance, standards, and data protection
&lt;/h3&gt;

&lt;p&gt;Robust LLM governance for debugging needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data classification of logs, traces, repos
&lt;/li&gt;
&lt;li&gt;Lawful basis/DPIA for personal data in logs
&lt;/li&gt;
&lt;li&gt;AI Act risk categorization and controls for high-risk domains (finance, health, safety)[5]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Standards like ISO/IEC 42001 for AI management are emerging reference points. Self-hosted GLM-5.2 may ease residency concerns but increases infra/maintenance; managed Mythos may simplify ops but restrict what data you can send.[5][3]&lt;/p&gt;

&lt;p&gt;Traceability is essential: log prompts, retrieved docs, diffs, and decisions for audit, incident response, and appeals.[5][6] Training developers (e.g., Secure Code Warrior, internal “LLM safety drills”) is now as important as prompt tuning.&lt;/p&gt;

&lt;h3&gt;
  
  
  5.4 Adversarial testing and hardening
&lt;/h3&gt;

&lt;p&gt;Apply AI-specific pentest practices:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Jailbreak and prompt injection attempts
&lt;/li&gt;
&lt;li&gt;RAG poisoning with crafted docs
&lt;/li&gt;
&lt;li&gt;Tool abuse: commands that modify infra, leak secrets, escalate privileges[9]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Findings are often mapped to OWASP LLM Top 10 and AI Act obligations, highlighting both model behavior and architectural weaknesses.[9][5]&lt;/p&gt;

&lt;p&gt;⚠️ &lt;strong&gt;Organizational reality:&lt;/strong&gt; Leaders often assume that because public chatbots “just work,” wiring LLMs into CI and security is easy. They underestimate integration, data, and governance complexity—one reason so many projects stall pre-production.[3]&lt;/p&gt;




&lt;h2&gt;
  
  
  6. Implementation Playbook: Rolling Out GLM-5.2 or Mythos for Bug Finding
&lt;/h2&gt;

&lt;p&gt;This section compresses the ideas above into a rollout plan.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.1 Phased rollout
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Pilot on non-critical services&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Restrict to low-risk repos.
&lt;/li&gt;
&lt;li&gt;Run GLM-5.2 and Mythos in comment-only mode.
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Instrument evaluation&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Capture recall, hallucination, latency, cost.
&lt;/li&gt;
&lt;li&gt;Compare GLM-5.2 vs Mythos on identical tasks.[6]
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Progressive expansion&lt;/strong&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add more services as metrics stabilize.
&lt;/li&gt;
&lt;li&gt;Enable auto-fix only for low-risk categories.[3]
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Successful projects favor staged rollouts, stakeholder alignment, and continuous measurement over “big bang” launches.[3][6]&lt;/p&gt;

&lt;p&gt;💼 &lt;strong&gt;Anecdote:&lt;/strong&gt; One SaaS firm started with AI linting on a sandbox repo, then expanded to all internal services after three months of stable metrics and governance sign-off.&lt;/p&gt;

&lt;h3&gt;
  
  
  6.2 RAG tuning for debugging
&lt;/h3&gt;

&lt;p&gt;For the RAG layer:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Chunking:&lt;/strong&gt; Use structure-aware chunks (functions, classes, doc sections) instead of fixed tokens.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Indexing:&lt;/strong&gt; Separate indices for code, docs, and tickets.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Query enhancement:&lt;/strong&gt; Use HyDE-style hypotheticals and stepback prompts to boost recall and precision.[7]
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Across all phases, treat GLM-5.2 and Mythos as interchangeable backends for the same agentic workflows. The decisive signal is in the metrics: &lt;strong&gt;which model finds more real bugs per dollar of CI budget, under your governance and resilience constraints, with your AI agents and RAG stack?&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;About CoreProse&lt;/strong&gt;: Research-first AI content generation with verified citations. Zero hallucinations.&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://www.coreprose.com/signup?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=kb-incidents" rel="noopener noreferrer"&gt;Try CoreProse&lt;/a&gt; | 📚 &lt;a href="https://www.coreprose.com/kb-incidents?utm_source=devto&amp;amp;utm_medium=syndication&amp;amp;utm_campaign=kb-incidents" rel="noopener noreferrer"&gt;More KB Incidents&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>llm</category>
      <category>programming</category>
    </item>
    <item>
      <title>Inside the Quiet Rise of Autonomous AI Agents</title>
      <dc:creator>Yao Xiao</dc:creator>
      <pubDate>Tue, 30 Jun 2026 12:26:42 +0000</pubDate>
      <link>https://dev.to/blobxiaoyao/inside-the-quiet-rise-of-autonomous-ai-agents-1j31</link>
      <guid>https://dev.to/blobxiaoyao/inside-the-quiet-rise-of-autonomous-ai-agents-1j31</guid>
      <description>&lt;p&gt;There is a specific threshold every engineer crosses when building with modern LLMs. You wire a language model to a live tool and send a single open-ended query. The model triggers an API, evaluates the JSON payload, self-corrects, and autonomously spins up a subsequent call.&lt;/p&gt;

&lt;p&gt;Then it hits you: the loop is running on its own.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No per-step prompts. No human middleware. Just an unprompted sequence of tactical actions driving toward a strategic goal.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That moment used to feel like an ephemeral party trick. In 2026, it is production infrastructure.&lt;/p&gt;

&lt;p&gt;The shift from AI-as-chatbot to AI-as-agent is not a rebrand. It is a structural change in how language models are deployed — and understanding it matters whether you are building these systems, integrating them into an existing stack, or simply trying to stay technically oriented in a field that is compounding faster than most people have calibrated for.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Core Distinction: Answering vs. Acting
&lt;/h2&gt;

&lt;p&gt;A conversational AI responds. An agentic AI acts.&lt;/p&gt;

&lt;p&gt;The difference is not purely semantic — it is architectural. When you ask ChatGPT to summarize a document, the model reads your prompt, generates a token sequence, and stops. That is a single forward pass, one context window, one output. When you give an AI agent a goal — "research this competitor, draft a briefing, and schedule the summary for tomorrow morning" — the model must &lt;em&gt;plan&lt;/em&gt;, call tools, observe results, re-plan based on what came back, and iterate until the goal is satisfied or it runs out of options.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Dimension&lt;/th&gt;
&lt;th&gt;Conversational AI&lt;/th&gt;
&lt;th&gt;Agentic AI&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Input&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Single user prompt&lt;/td&gt;
&lt;td&gt;High-level goal + environment state&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Execution&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;One forward pass&lt;/td&gt;
&lt;td&gt;Multi-step loop (plan → act → observe)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Failure mode&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Wrong answer, hallucination&lt;/td&gt;
&lt;td&gt;Loop divergence, tool misuse, scope leak&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Compute cost&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Predictable (one call)&lt;/td&gt;
&lt;td&gt;Variable (N calls per goal)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;Human role&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Evaluates every output&lt;/td&gt;
&lt;td&gt;Sets goal; reviews at checkpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The cognitive architecture is different. The failure modes are different. The prompting requirements are different. And the results, when it works, are qualitatively more powerful than anything a single-turn prompt can produce.&lt;/p&gt;

&lt;h2&gt;
  
  
  What an Agent Actually Is, Under the Hood
&lt;/h2&gt;

&lt;p&gt;Strip away the marketing and an AI agent is a loop with four components:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Perception.&lt;/strong&gt; The model receives inputs — a user goal, tool outputs, memory contents, environment observations. This is its "world state."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Reasoning.&lt;/strong&gt; The model reasons about what to do next. Production agents implement ReAct-style reasoning (Reason + Act): the model emits an explicit chain-of-thought trace before committing to an action — a &lt;code&gt;thought:&lt;/code&gt; field followed by an &lt;code&gt;action:&lt;/code&gt; field in the output schema. This is not an optional design choice. Without a structured reasoning step, the model skips directly to action selection, which collapses reliability on any non-trivial task.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Action.&lt;/strong&gt; The model emits a structured output — often a JSON function call or a tool invocation — that triggers real-world effects: a web search, a database query, a file write, an email send, a subprocess execution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Observation.&lt;/strong&gt; The result of the action is fed back into the context window. The model reads it, updates its understanding, and starts the loop again.&lt;/p&gt;

&lt;p&gt;This loop continues until the agent decides it has satisfied the goal, or a stopping condition (maximum iterations, human confirmation gate) is met. The entire thing runs over what is, at its core, still just a next-token prediction model. The "agency" emerges from the loop structure, not from any new architectural invention inside the model itself.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Author's Comment:&lt;/strong&gt; This is the part that trips people up. Agents are not a new category of AI. They are a new &lt;em&gt;deployment pattern&lt;/em&gt; for the same underlying models you already use. The intelligence is the same; the scaffolding around it is what changes the capability ceiling.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  A Worked Example: Tearing Down a Real Agent Step by Step
&lt;/h2&gt;

&lt;p&gt;Theory is useful. A concrete teardown is more useful. Let's build the simplest agent worth building — a &lt;strong&gt;Research Briefing Agent&lt;/strong&gt; — and annotate every step against the loop structure above. You can set this up today, in ChatGPT or Gemini, with no code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The goal we hand to the agent:&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Research the current state of autonomous AI agents in enterprise software. Identify 3 key trends, find one supporting data point for each, and write a 300-word executive briefing. Stop and ask me before sending anything externally."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That single sentence contains a planning problem, multiple tool calls, a memory requirement, a reflection requirement, and a hard boundary constraint. Watch how each one maps.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting It Up: ChatGPT (GPT Builder) vs. Gemini (Gems)
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;In ChatGPT:&lt;/strong&gt; Go to &lt;a href="https://chatgpt.com/gpts/editor" rel="noopener noreferrer"&gt;chatgpt.com → Explore GPTs → Create&lt;/a&gt;. Paste the system prompt below into the "Instructions" field. Under "Capabilities," enable &lt;strong&gt;Web Search&lt;/strong&gt;. That's your tool. Save and open the GPT.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In Gemini:&lt;/strong&gt; Go to &lt;a href="https://gemini.google.com/gems/new" rel="noopener noreferrer"&gt;gemini.google.com → Gems → New Gem&lt;/a&gt;. Paste the same system prompt into the "Instructions" field. Gemini Gems have Google Search access by default. Save the Gem.&lt;/p&gt;

&lt;p&gt;Both platforms expose a tool-augmented, looping LLM behind a simple form. The underlying mechanism is identical to what production agent frameworks implement — the platform just handles the loop scaffolding for you.&lt;/p&gt;

&lt;h3&gt;
  
  
  The System Prompt (Copy This Exactly)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a Research Briefing Agent. 
Your job is to autonomously research a topic, synthesize findings, 
and produce a structured executive briefing.

ROLE: Senior research analyst with expertise in technology trends.

TASK: When given a research topic, you will:
1. Break the topic into 3 searchable sub-questions.
2. Search for each sub-question independently.
3. Extract one concrete data point or quote per sub-question.
4. Synthesize findings into a 300-word executive briefing with headers.
5. Perform a self-review: check that every claim has a source 
   and the briefing is under 320 words.

FORMAT: Return your output as:
  - PLAN: (numbered list of sub-questions before searching)
  - FINDINGS: (bullet list of data points with sources)
  - BRIEFING: (final 300-word document)
  - SELF-REVIEW: (pass/fail + one sentence rationale)

CONSTRAINTS:
- Do not send any content externally or take any action 
  beyond searching and writing.
- Do not exceed 5 web searches per task.
- If a search returns no useful result, 
  log "no result" and move to the next sub-question.
- Stop and ask the user for clarification 
  if the topic is ambiguous or spans more than one distinct domain.
- Never fabricate a data point. 
  If you cannot find a real source, state it explicitly.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prompt is less than 200 words. Every line maps to a specific component of the agent loop. Let's trace it.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Invoke the Agent
&lt;/h3&gt;

&lt;p&gt;Once the GPT is saved or the Gem is created, the agent is sitting idle — it has a system prompt loaded, tools enabled, and no active goal. Nothing runs until you send the first message. That first message is the &lt;strong&gt;invocation&lt;/strong&gt;: the signal that starts the loop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1: Send the opening task message.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Open the GPT (in ChatGPT, click the GPT name from your sidebar or the Explore page) or open the Gem (in Gemini, click the Gem from your Gems list). In the chat input, type your research topic as a direct instruction. Do not preface it with pleasantries. Be specific about what you want and what form you want it in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Research the current state of autonomous AI agents in enterprise software.
Identify 3 key trends, find one supporting data point for each, and write
a 300-word executive briefing.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That message is your goal. Hit send.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2: Watch for the PLAN block — do not interrupt it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A correctly configured agent will not immediately start searching. Its first output should be the &lt;code&gt;PLAN:&lt;/code&gt; block — three numbered sub-questions it has derived from your goal. This is the Reasoning step made visible. If you see it, the agent is working correctly. If the model skips straight to "Sure, here are three trends about AI agents..." without searching, the system prompt is not loaded or the tool is disabled.&lt;/p&gt;

&lt;p&gt;In ChatGPT, a working invocation looks like this in the response pane:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PLAN:
1. What enterprise AI agent platforms have reported production deployments
   in 2025–2026?
2. What efficiency or cost reduction figures have been cited 
   in agentic AI case studies?
3. Which major enterprise software vendors (SAP, Salesforce, ServiceNow, etc.) 
   have shipped GA agent features, and what is the reported adoption scope?

[Searching the web…]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Gemini Gems, the same sequence appears — Gemini shows its Google Search queries inline as it executes each one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3: Handle disambiguation if the agent pauses and asks.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If your topic is broad or crosses domains, the agent will halt and surface a clarifying question before searching. This is the &lt;code&gt;human_checkpoint&lt;/code&gt; constraint from the system prompt working as designed. Do not skip past this. Answer it directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent: Your topic spans both autonomous coding agents and autonomous
       enterprise workflow agents. Which domain should I focus on?

You:   Focus on enterprise workflow automation agents — think Salesforce
       Agentforce, ServiceNow, and similar platforms.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A single-sentence reply is enough. The agent re-enters the loop with your constraint applied and continues from where it paused.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4: Receive and review the final output.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Once all searches complete, the agent emits &lt;code&gt;FINDINGS:&lt;/code&gt;, then &lt;code&gt;BRIEFING:&lt;/code&gt;, then &lt;code&gt;SELF-REVIEW:&lt;/code&gt;. Review the self-review verdict first. A &lt;code&gt;PASS&lt;/code&gt; means the model found sources for every claim and stayed within the word limit. A &lt;code&gt;FAIL&lt;/code&gt; entry means it flagged a gap — read the rationale and decide whether to accept it or prompt a correction:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You:   The second finding has no URL. Please search again specifically for
       that data point or replace it with a verifiable alternative.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent treats your follow-up as a new Perception input, re-enters Reasoning, executes the corrective Action, and updates the output.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5: Trigger follow-up tasks in the same session.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agent retains the full conversation context within the session. You can issue a second task without restarting:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You:   Now do the same briefing but focused on healthcare AI agents specifically.
       Reuse the same format.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent carries forward its understanding of the &lt;code&gt;BRIEFING:&lt;/code&gt; format from the prior turn — this is working memory in action. It does not re-read the system prompt line by line; the relevant context is already in the window. For a third or fourth task in the same session, watch for context drift: if the model starts skipping the &lt;code&gt;PLAN:&lt;/code&gt; step or producing shorter outputs, the context window is becoming crowded with prior turns. Start a fresh session for unrelated topics.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Author's Comment:&lt;/strong&gt; The invocation message is more consequential than most people realize. Vague goals produce vague plans, which produce vague searches, which produce vague briefings. The model cannot compensate for an underspecified goal — it will fill the ambiguity with plausible-sounding but potentially wrong sub-questions. Treat your invocation message like a spec document for a junior analyst: the more precisely you define scope, output format, and constraints upfront, the less correction you do downstream.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  The Loop Trace: Annotated Against Theory
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Turn 1 — Perception&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You paste the goal into the GPT or Gem. The model's context window now contains: &lt;/p&gt;

&lt;p&gt;(1) the system prompt above, &lt;/p&gt;

&lt;p&gt;(2) your goal sentence. &lt;/p&gt;

&lt;p&gt;This is the agent's complete world state at T=0. There is no memory of prior sessions, no external data — just two text blocks. This is &lt;em&gt;Perception&lt;/em&gt;: the model has ingested its environment.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turn 1 — Reasoning (the PLAN step)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Before touching a search tool, the model emits its plan:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;PLAN:
1. What are the most-cited enterprise AI agent deployments in 2025–2026?
2. What productivity or cost metrics have been reported from agentic AI pilots?
3. Which enterprise software vendors have shipped native agent features 
   and what is their adoption rate?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the &lt;code&gt;thought:&lt;/code&gt; step from ReAct — explicit goal decomposition expressed as text before any action is committed. The system prompt forced this by mandating &lt;code&gt;PLAN:&lt;/code&gt; as the first output block. Without that instruction, most models skip straight to searching, which degrades multi-step reliability.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turns 2–4 — Action (Tool Calls)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The model calls &lt;code&gt;web_search&lt;/code&gt; three times — once per sub-question. Each call is a discrete &lt;em&gt;Action&lt;/em&gt;: the model emits a structured tool invocation, the platform executes it, and the raw search result is returned. In ChatGPT's interface you see a "Searching the web…" spinner; in Gemini you see the query appear inline. Behind both is the same JSON function call mechanism:&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;"tool"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"web_search"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"arguments"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"query"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"enterprise AI agent deployments productivity metrics 2025"&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;Note what the system prompt does here: it caps tool calls at 5 (&lt;code&gt;"Do not exceed 5 web searches"&lt;/code&gt;). This is your circuit breaker. Without it, a poorly-grounded model will search indefinitely, hallucinating new sub-questions to justify more calls. The constraint converts an open-ended loop into a bounded one.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turns 2–4 — Observation (Result Injection)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Each search result is injected back into the context window as an &lt;code&gt;observation:&lt;/code&gt; block. The model reads the returned content, extracts the relevant data point, and notes the source URL. This is the &lt;em&gt;Observation&lt;/em&gt; step — the world state is updated with new evidence, and the model re-enters the reasoning phase for the next sub-question.&lt;/p&gt;

&lt;p&gt;If a search returns nothing useful, the system prompt's fallback fires: &lt;code&gt;log "no result" and move on&lt;/code&gt;. This is explicit failure handling — the model does not retry indefinitely or hallucinate a result. It acknowledges the gap and continues.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Turn 5 — Action (Writing) + Reflection&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;With three data points in context, the model synthesizes the &lt;code&gt;BRIEFING:&lt;/code&gt; block. It then immediately executes the &lt;code&gt;SELF-REVIEW:&lt;/code&gt; step — re-reading its own output, checking word count and source coverage, and emitting a pass/fail verdict. This is the &lt;em&gt;critic-actor&lt;/em&gt; pattern in miniature: the same model acts as both author and reviewer within a single turn.&lt;/p&gt;

&lt;p&gt;If the self-review fails (word count exceeded, missing source), the model is instructed to revise and recheck. In production frameworks this would be an explicit second agent call. Here, the single-model loop approximates it cheaply.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Boundary Constraint in Action&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The final line of the system prompt — &lt;em&gt;"Stop and ask the user for clarification if the topic is ambiguous"&lt;/em&gt; — is the human-in-the-loop gate. If you had asked the agent to "research AI in finance," it spans trading systems, fraud detection, lending, and compliance. The agent would recognize the ambiguity, halt the loop, and surface a clarifying question before spending 5 search calls on the wrong sub-domain. This maps directly to the &lt;code&gt;human_checkpoint&lt;/code&gt; field in the scope-scoping JSON pattern from the Multi-Agent section.&lt;/p&gt;

&lt;h3&gt;
  
  
  What This Example Proves
&lt;/h3&gt;

&lt;p&gt;One system prompt, one tool (web search), zero code. And yet the agent exhibits planning, tool use, bounded iteration, explicit failure handling, self-reflection, and a hard stop condition. Every component from the theoretical loop above is present and accounted for.&lt;/p&gt;

&lt;p&gt;The gap between this toy example and a production system is not conceptual — the architecture is identical. The gap is in reliability engineering: error rate budgets, observability hooks, retry logic, and the discipline to define &lt;code&gt;denied_tools&lt;/code&gt; before you deploy. The concepts scale. The discipline is the hard part.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Four Capabilities That Make Agents Work
&lt;/h2&gt;

&lt;p&gt;Research from Berkeley and DeepMind has converged on a consistent taxonomy of what separates a capable agent from an overrated wrapper. The four capabilities are planning, tool use, memory, and reflection.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Advanced Planning: Algorithmic Goal Decomposition to Mitigate Execution Drift
&lt;/h3&gt;

&lt;p&gt;Agentic workflows lacking structural goal decomposition predictably fail under non-trivial execution depths. In production infrastructure, planning is not merely a long system prompt — it is the runtime capacity of the model to map an abstract macro-goal into a deterministic directed acyclic graph (DAG) of executable sub-tasks, where each node has a defined input, a defined success criterion, and a defined fallback.&lt;/p&gt;

&lt;p&gt;The quality of that decomposition is directly correlated with the quality of the system prompt that defines the agent's operating environment. An agent given only a goal and a tool list will produce a shallow, linear plan. An agent given a goal, explicit reasoning instructions, intermediate-step examples, and failure-state definitions will produce a robust DAG. This is why prompt engineering for agents is a structurally different discipline than prompt engineering for answers — the target is not a good response, it is a reliable &lt;em&gt;process&lt;/em&gt; that holds under N sequential decisions.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Tool Use: Deterministic Schema Design for Zero-Hallucination Invocations
&lt;/h3&gt;

&lt;p&gt;Tools are what give agents reach beyond the model's training data and the current context window. A tool is, at its simplest, a typed function the model can call by name with structured arguments. The function executes externally, and the result is injected back into context as an observation.&lt;/p&gt;

&lt;p&gt;The design of tool schemas is where most agent reliability problems actually originate — not in the model, and not in the prompt. How you specify each tool's name, argument types, valid value ranges, and expected output format directly determines whether the model invokes the tool correctly or hallucinates an argument. Ambiguous schema descriptions produce malformed calls. Precisely typed schemas with enum constraints and explicit &lt;code&gt;description&lt;/code&gt; fields on every parameter produce deterministic invocations. Treat your tool schema with the same rigor you would apply to a public API contract.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Memory Architecture: Building Persistent State Across Multi-Session Agent Runs
&lt;/h3&gt;

&lt;p&gt;Context windows have grown dramatically — GPT-4.1, Gemini 1.5 Pro, and Claude 3.7 all support million-token contexts — but for long-running agents, even these are not enough. A job that spans hours or multiple sessions needs a memory architecture beyond a single context window.&lt;/p&gt;

&lt;p&gt;Agents typically implement memory at three levels. &lt;strong&gt;Working memory&lt;/strong&gt; is just the active context window — fast, temporary, expensive per token. &lt;strong&gt;Short-term memory&lt;/strong&gt; is a vector store or key-value cache the agent can query and write to during a session. &lt;strong&gt;Long-term memory&lt;/strong&gt; is a persistent database that survives session boundaries, allowing an agent to pick up where it left off days later.&lt;/p&gt;

&lt;p&gt;The production-grade architecture for each layer — including the latency trade-offs between retrieval-augmented memory and full-context injection, and when each approach breaks down — is a topic that deserves its own dedicated treatment. We derived the full framework in &lt;a href="https://appliedaihub.org/blog/memory-planning-tools-three-pillars-ai-power-user/" rel="noopener noreferrer"&gt;Memory, Planning, Tools: The Three Pillars Every Serious AI Power User Must Understand&lt;/a&gt;, which covers the engineering decisions that determine whether a multi-session agent remains coherent or accumulates silent state corruption over time.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Reflection: Implementing Critic-Actor Loops for Self-Correcting Agent Pipelines
&lt;/h3&gt;

&lt;p&gt;The most underrated capability in the list. Reflection is the agent's ability to evaluate its own outputs and intermediate steps, identify errors, and self-correct before delivering a final result — closing the loop without waiting for a human to catch the mistake.&lt;/p&gt;

&lt;p&gt;In practice, reflection is implemented as a second pass: the agent runs a task, then routes the output to a separate critic prompt — or a dedicated critic agent — that evaluates the result against the original goal and emits a structured pass/fail verdict with improvement notes. This critic-actor setup produces measurably better results on complex tasks than single-pass execution. The cost is additional inference calls, but for high-stakes, error-sensitive tasks, the reliability gain justifies it without question.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi-Agent Systems: When One Is Not Enough
&lt;/h2&gt;

&lt;p&gt;Single-agent architectures have a natural ceiling. A single context window, a single chain of reasoning, a single point of failure. Multi-agent systems distribute the workload across specialized agents coordinated by an orchestrator.&lt;/p&gt;

&lt;p&gt;A common pattern: an orchestrator agent receives a high-level goal, breaks it into sub-tasks, and dispatches each to a specialist agent — a researcher, a writer, a code reviewer, a data analyst. Each specialist works within its domain, returns a result, and the orchestrator integrates the outputs into a coherent whole.&lt;/p&gt;

&lt;p&gt;This pattern is powerful but introduces new failure modes. Agents can contradict each other. Orchestrators can lose track of partial results. Communication overhead eats into context budgets. The industry has begun addressing this through protocol standardization — Anthropic's Model Context Protocol (MCP) defines a standard interface for LLMs to connect to external tools and data sources, while Google's Agent2Agent (A2A) specification proposes a standard for inter-agent communication. These are not finished standards, but their existence signals that the field is moving from ad-hoc integration to structured interoperability.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Practical Pitfall Avoidance — Scope Leakage:&lt;/strong&gt; The most common multi-agent failure is scope leakage: a sub-agent interprets its task more broadly than the orchestrator intended and performs actions outside its sanctioned boundary. The mitigation is tight tool scoping — each agent receives only the tools required for its specific role. A concrete enforcement pattern looks like this:&lt;/p&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;"agent"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"researcher"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"allowed_tools"&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;"web_search"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"read_pdf"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"read_url"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"denied_tools"&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;"write_file"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"send_email"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"execute_code"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"max_iterations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"human_checkpoint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"before_final_output"&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;p&gt;Declare the &lt;code&gt;denied_tools&lt;/code&gt; list explicitly. An agent with an &lt;em&gt;implicit&lt;/em&gt; boundary will drift toward it. An agent with an &lt;em&gt;explicit&lt;/em&gt; constraint list will not.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The Reliability Problem That Nobody Wants to Talk About
&lt;/h2&gt;

&lt;p&gt;Here is the honest part: current autonomous agents fail at rates that would be unacceptable in any production software system. A 2025 analysis from METR tracking agent performance on real-world tasks showed that even frontier models succeed on only a fraction of multi-step tasks requiring sustained autonomous execution. &lt;a href="https://metr.org/blog/2025-03-19-measuring-ai-ability-to-complete-long-tasks/" rel="noopener noreferrer"&gt;METR's research on measuring AI ability to complete long tasks&lt;/a&gt; documents this gap in detail and frames it as a fundamental reliability challenge, not a marginal engineering issue.&lt;/p&gt;

&lt;p&gt;This does not mean agents are not useful — they clearly are, for the right tasks. It means the gap between "impressive demo" and "production system" is larger for agents than for any other AI deployment. The tasks agents handle most reliably share common characteristics: they are well-defined, their success criteria are measurable, they operate in bounded environments with known tool behaviors, and they have human-in-the-loop checkpoints at high-stakes decision points.&lt;/p&gt;

&lt;p&gt;The underlying tension here is architectural: traditional software engineering assumes idempotency, whereas agentic execution is a stochastic state-machine where error rates propagate &lt;em&gt;multiplicatively&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Consider a non-trivial workflow requiring $N$ sequential agentic decisions. Even if your frontier model delivers a stellar $p = 0.95$ single-step reliability rate, the joint probability of a zero-fault autonomous run scales as:&lt;/p&gt;

&lt;p&gt;$$P(\text{Success}) = p^N$$&lt;/p&gt;

&lt;p&gt;At $N = 10$ steps — a modest research-and-write pipeline — that 95% per-step reliability collapses to $0.95^{10} \approx 0.60$. A 40% failure rate on a ten-step task is not an edge case. It is the baseline for any agent deployed without explicit fault-tolerance architecture. At $N = 20$, the same model drops to $\approx 36\%$ success. The math is unforgiving.&lt;/p&gt;

&lt;p&gt;This is why treating an LLM as a deterministic function call is a catastrophic design error. Engineers must treat the model as a &lt;em&gt;volatile stochastic node&lt;/em&gt; inside a rigid, deterministic shell — borrowing fault-tolerance paradigms directly from distributed systems. You do not fix the node; you architect aggressive retry logic, state-rollback fallbacks, and execution circuit breakers around its probabilistic boundaries. The same principle that makes distributed systems engineers paranoid about network partitions should make agent engineers paranoid about per-step inference variance.&lt;/p&gt;

&lt;p&gt;Agents deployed against open-ended, poorly-defined goals in uncontrolled environments fail early and often. This is not a model limitation waiting to be fixed by the next version — it is a system design problem that requires the same architectural discipline you would apply to any fault-tolerant distributed system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prompt Engineering for Agents Is Not What You Think
&lt;/h2&gt;

&lt;p&gt;Most engineers who start building agents try to use the same prompting instincts they developed for conversational AI. Write a detailed system prompt, describe the goal, list the tools. This gets you to about 40% reliability on simple tasks.&lt;/p&gt;

&lt;p&gt;Reliable agent prompts require a different structure. The system prompt for an agent needs to specify not just &lt;em&gt;what&lt;/em&gt; to do but &lt;em&gt;how to reason about what to do&lt;/em&gt;. It needs explicit instructions for handling ambiguity, explicit rules for when to stop and ask for human confirmation, explicit formats for tool call outputs, and explicit recovery behaviors for when a tool fails.&lt;/p&gt;

&lt;p&gt;Simon Willison and the team at Anthropic have written clearly about this — the dominant framing from their engineering blog is that the prompt is not a configuration file; it is the agent's operating procedure document, and it needs to be written with the same rigor you would apply to a runbook in a production service.&lt;/p&gt;

&lt;p&gt;To bypass these structural failures, engineers must enforce rigid boundary conditions before running inference. Implementing a deterministic scaffolding framework like &lt;a href="https://appliedaihub.org/tools/prompt-scaffold/" rel="noopener noreferrer"&gt;Prompt Scaffold&lt;/a&gt; allows you to systematically isolate Role, Task, Context, Format, and Constraints before the model ever sees a token of your goal. In agentic design, the Constraints field is your architectural guardrail — it codifies exact exception-handling states, human-in-the-loop trigger conditions, and acceptable error budgets that prevent open-ended execution drift. Most first-time agent builders treat the Constraints field as optional. The production failure logs tell a different story.&lt;/p&gt;

&lt;p&gt;The full taxonomy of agentic prompt architecture — action instruction schemas, output contract enforcement, and failure-recovery patterns for production systems — is a topic too dense to compress into a section of this article. We laid it out in full in the &lt;a href="https://appliedaihub.org/blog/prompt-engineering-for-autonomous-ai-agents/" rel="noopener noreferrer"&gt;Prompt Engineering Playbook for Autonomous AI Agent Systems&lt;/a&gt;, which derives the structural differences between conversational and agentic prompting from first principles and provides the exact templates that production agent systems require.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Shift in Mental Model That Changes Everything
&lt;/h2&gt;

&lt;p&gt;Conversational AI rewards good question-askers. You get better at formulating queries; the model gives you better answers. The skill is fundamentally linguistic.&lt;/p&gt;

&lt;p&gt;Agentic AI rewards systems thinkers. You get better at defining goals, scoping tool access, designing feedback loops, and setting failure boundaries. The skill is fundamentally architectural.&lt;/p&gt;

&lt;p&gt;This shift has real implications for who builds well with AI going forward. Developers who approach agents as fancy chatbots will build systems that look impressive in demos and fail in production. Developers who approach agents as distributed systems with probabilistic components — applying the same rigor they would to any asynchronous, fault-tolerant architecture — will build systems that reliably deliver value.&lt;/p&gt;

&lt;p&gt;The quiet rise of autonomous agents is not a trend to watch from a distance. It is an infrastructure shift that is already happening in production systems across industries. The engineers who understand the underlying mechanics — the loop structure, the memory architecture, the tool design, the reliability constraints — will be the ones building the systems that everyone else uses.&lt;/p&gt;

&lt;p&gt;The technology is less magical than the demos suggest. It is also more consequential than most people have calibrated for.&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>agenticworkflows</category>
      <category>llm</category>
      <category>ai</category>
    </item>
    <item>
      <title>The first malicious MCP server was one line of code: the postmark-mcp rug pull</title>
      <dc:creator>Brenn Hill</dc:creator>
      <pubDate>Tue, 30 Jun 2026 12:00:00 +0000</pubDate>
      <link>https://dev.to/brennhill/the-first-malicious-mcp-server-was-one-line-of-code-the-postmark-mcp-rug-pull-jda</link>
      <guid>https://dev.to/brennhill/the-first-malicious-mcp-server-was-one-line-of-code-the-postmark-mcp-rug-pull-jda</guid>
      <description>&lt;p&gt;In September 2025, security researchers at &lt;a href="https://www.koi.ai/blog/postmark-mcp-npm-malicious-backdoor-email-theft" rel="noopener noreferrer"&gt;Koi Security found&lt;/a&gt; what's widely described as the first in-the-wild malicious MCP server. It wasn't a sophisticated zero-day. It was one added line in an email tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happened
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;postmark-mcp&lt;/code&gt; is an npm package that gives an AI agent a tool for sending email through Postmark. For fifteen releases — versions 1.0.0 through 1.0.15 — it did exactly that, and nothing else. It got adopted, it got trusted, it landed in people's daily agent workflows. By the time it mattered, it was pulling roughly 1,500 downloads a week.&lt;/p&gt;

&lt;p&gt;Then version 1.0.16 shipped on September 17, 2025. The diff was small enough to miss in a glance: the send-email function gained a &lt;code&gt;Bcc&lt;/code&gt; field pointing at &lt;code&gt;phan@giftshop[.]club&lt;/code&gt;, a domain the maintainer controlled. Every email the agent sent — content, recipients, attachments, whatever secrets or PII happened to be inside — got silently copied to the attacker.&lt;/p&gt;

&lt;p&gt;Nothing else changed. The tool still sent your email correctly. From the outside, and from the agent's perspective, it worked. That's the whole trick: the malicious version was indistinguishable in behavior from the benign one, except for the carbon copy you couldn't see.&lt;/p&gt;

&lt;p&gt;Anyone on auto-update inherited the backdoor the moment they pulled the new version. The package was downloaded 1,643 times in total before it was removed from npm. Postmark, the company, &lt;a href="https://postmarkapp.com/blog/information-regarding-malicious-postmark-mcp-package" rel="noopener noreferrer"&gt;confirmed&lt;/a&gt; it had nothing to do with the package — the name just borrowed their credibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters
&lt;/h2&gt;

&lt;p&gt;The uncomfortable lesson here isn't "audit your dependencies." Plenty of people &lt;em&gt;had&lt;/em&gt; effectively audited this one — it was fine for fifteen versions. The lesson is that &lt;strong&gt;approval isn't permanent&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;When you vet a tool, you vet a specific version's behavior at a specific moment. An MCP server can change its tool definitions and its actual behavior in any later release, and the agent — which trusts the tool to describe itself honestly — has no built-in way to notice. This is the "rug pull": vetted and benign, then quietly hostile, with the trust you extended earlier carried forward to code you never looked at.&lt;/p&gt;

&lt;p&gt;MCP makes this sharper than a normal dependency bump, because these tools run with real authority inside your agent's loop. An email tool can read and send mail. A filesystem tool can read and write files. The blast radius of a hostile update is whatever you granted the tool on the day you trusted it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The practitioner takeaway
&lt;/h2&gt;

&lt;p&gt;You can't manually re-read every dependency on every update. But you can make "the tool changed" a thing your system &lt;em&gt;notices&lt;/em&gt; instead of a thing it silently accepts.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Pin versions.&lt;/strong&gt; Auto-update is what turned a malicious release into mass exposure. Pin MCP servers and their dependencies to exact versions, and treat a version bump as a change that needs a human, not a default.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fingerprint tools at approval time.&lt;/strong&gt; When you vet a tool, record a fingerprint — the package version and integrity hash, plus the tool's declared schema and description. That's the thing you actually approved.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Re-check the fingerprint on every load.&lt;/strong&gt; Before an agent uses a tool, compare its current fingerprint to the approved one. A &lt;code&gt;postmark-mcp&lt;/code&gt; running 1.0.15 and one running 1.0.16 should not look the same to your system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Treat a moved fingerprint as hostile until proven otherwise.&lt;/strong&gt; If the hash, version, or tool definition changed and nobody re-approved it, fail closed. Don't run the tool, don't pass it secrets, and surface the diff to a human. A changed tool definition is exactly the signal a rug pull produces.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this requires catching the malicious line by reading it. It requires noticing that &lt;em&gt;something&lt;/em&gt; changed in a tool you'd already decided to trust — which is the one signal this attack couldn't hide.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This incident is one of the sources behind *&lt;/em&gt;&lt;a href="https://braceframework.org/" rel="noopener noreferrer"&gt;BRACE&lt;/a&gt;*&lt;em&gt;, an open, vendor-neutral framework for securing autonomous AI agents — its &lt;a href="https://braceframework.org/guides/ecosystem/" rel="noopener noreferrer"&gt;ecosystem guide&lt;/a&gt; covers vetting tools and re-checking them on every load. BRACE is built by reading the incidents and the research and asking, each time: what concrete control would have prevented or contained this?&lt;/em&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>ai</category>
      <category>llm</category>
      <category>devops</category>
    </item>
    <item>
      <title>The Audit Tax: Why Your Agent Made You Slower</title>
      <dc:creator>Ben Stanley</dc:creator>
      <pubDate>Tue, 30 Jun 2026 11:30:38 +0000</pubDate>
      <link>https://dev.to/temrel/the-audit-tax-why-your-agent-made-you-slower-45bj</link>
      <guid>https://dev.to/temrel/the-audit-tax-why-your-agent-made-you-slower-45bj</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published in &lt;a href="https://spark.temrel.com/?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=repurpose" rel="noopener noreferrer"&gt;Temrel&lt;/a&gt;, a weekly newsletter on agentic engineering.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You ask an agent to code an update. It takes about 90 seconds to produce the PR. You then spend the next 90 minutes reading it line by line to see if you trust it. You might, whisper it, be shipping code even slower than you were before.&lt;/p&gt;

&lt;p&gt;Agent-based development velocity is borrowed time, re-invoiced with interest at review time. The agent writes the PR in seconds; you pay for that speed in the time it takes to decide whether to trust what it has written. This is the &lt;strong&gt;Audit Tax&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is a deliberate sequel to last week's "Stop prompting, start looping." Verification was one of our six dials, and today we focus on that one.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bottleneck moved while you were watching the leaderboard
&lt;/h2&gt;

&lt;p&gt;Code generation is effectively solved. By mid-2026, even the die-hard holdouts can't seriously argue that coding agents underperform humans in commercial environments. The hard part now is verification.&lt;/p&gt;

&lt;p&gt;The old scoreboard measures the wrong thing: model benchmarks, tokens per second, and the rest. The real measurement is how quickly agent-produced code gets into production.&lt;/p&gt;

&lt;p&gt;According to LinearB's &lt;a href="https://linearb.io/resources/software-engineering-benchmarks-report" rel="noopener noreferrer"&gt;2026 Software Engineering Benchmarks Report&lt;/a&gt;, AI PRs take 4.6x longer to get reviewed. That is a product of higher volume and faster delivery, and it is the biggest blocker to AI engineering productivity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reviewing agent code is harder than reviewing human code
&lt;/h2&gt;

&lt;p&gt;Verification is harder than it looks. You can't interrogate the agent and trust the answer; the hallucination might be buried in the reasoning. Your old heuristics for reviewing human code are unfit for the task:&lt;/p&gt;

&lt;p&gt;Agent-written PRs always look clean and self-confident, whether they work or not. Sloppy formatting and thin documentation no longer signal a weak PR, so you can't kick it back on those grounds.&lt;/p&gt;

&lt;p&gt;Enforcing small diffs doesn't work either. Try it and "4.6x longer" becomes a stretch goal; you'll be drowning in PRs forever.&lt;/p&gt;

&lt;p&gt;Individual reliability means nothing now. John, the old hand who always shipped clean code and earned a cursory review? John's gone. There's just Claude now.&lt;/p&gt;

&lt;p&gt;And don't forget: you contribute to &lt;a href="https://spark.temrel.com/p/the-sloppening" rel="noopener noreferrer"&gt;The Sloppening&lt;/a&gt; every time you push slop to the codebase.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stop paying the tax by hand. Build the verification layer.
&lt;/h2&gt;

&lt;p&gt;Get your cheap, deterministic gates in first: typecheck, tests, lint, build. You already have them, they're virtually free and fast, and they catch stupid mistakes. Anthropic calls these &lt;strong&gt;code-based graders&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Then add a review subagent. In Anthropic's terms, &lt;strong&gt;model-based graders&lt;/strong&gt;. Check the diff against the stated intent, not just whether it builds and runs.&lt;/p&gt;

&lt;p&gt;Then human-in-the-loop: a person's eyes on anything that survives the deterministic and agent-review gates. The machines clear the early hurdles, and the human lets the output hit production. Anthropic calls these &lt;strong&gt;human graders&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Evals make verification repeatable, not vibes
&lt;/h2&gt;

&lt;p&gt;Anthropic recommend starting evals early, and so do I. Record the cases where the agent misses requirements, and once you have around 20, start building your evals.&lt;/p&gt;

&lt;p&gt;Add your deterministic checks plus an LLM-as-judge for the fuzzy intent. Wire them to triggers so you don't kick them off by hand.&lt;/p&gt;

&lt;p&gt;There's an in-depth &lt;a href="https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents" rel="noopener noreferrer"&gt;Anthropic blog&lt;/a&gt; on methodology that is lighter on technical implementation. Take that as a sign of how early this step in the agentic loop still is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Action steps (do this week)
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Measure your tax: time-to-generate a PR versus time-to-merge it. The gap is the bill.&lt;/li&gt;
&lt;li&gt;Add one mandatory CI gate the agent cannot merge past (start with tests or typecheck).&lt;/li&gt;
&lt;li&gt;Stand up a 20-case eval from last month's actual agent failures.&lt;/li&gt;
&lt;li&gt;Add a "review" pass that checks diffs against intent before they reach you.&lt;/li&gt;
&lt;li&gt;Re-measure the gap. Watch the tax drop.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why this matters
&lt;/h2&gt;

&lt;p&gt;This is the reframing of the dev career ladder. We started with context engineering (2024), then loop engineering (2026). Follow the thread and you become one of the top players in software development, set up well for what's next.&lt;/p&gt;

&lt;p&gt;Whoever owns verification owns the bottleneck, and whoever owns the bottleneck owns the leverage. Code generation is solved. The tax is rigorous evaluation.&lt;/p&gt;

&lt;p&gt;Pay the tax on purpose, or pay it by accident.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Subscribe to &lt;a href="https://spark.temrel.com/subscribe?utm_source=devto&amp;amp;utm_medium=social&amp;amp;utm_campaign=repurpose" rel="noopener noreferrer"&gt;Temrel&lt;/a&gt; for weekly agentic engineering field notes.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>agents</category>
      <category>llm</category>
      <category>codereview</category>
    </item>
    <item>
      <title>How to Give Your AI Agent Access to Upwork Data</title>
      <dc:creator>AlterLab</dc:creator>
      <pubDate>Tue, 30 Jun 2026 11:21:48 +0000</pubDate>
      <link>https://dev.to/alterlab/how-to-give-your-ai-agent-access-to-upwork-data-2pla</link>
      <guid>https://dev.to/alterlab/how-to-give-your-ai-agent-access-to-upwork-data-2pla</guid>
      <description>&lt;h1&gt;
  
  
  How to Give Your AI Agent Access to Upwork Data
&lt;/h1&gt;

&lt;p&gt;This guide covers accessing publicly available data. Always review a site's robots.txt and Terms of Service before automated access.&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;Use AlterLab's Extract API to turn Upwork job pages into structured JSON. Your AI agent can call the API directly, receive clean data, and feed it into an LLM for market intelligence, skill tracking, or rate monitoring—no HTML parsing needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI agents need Upwork data
&lt;/h2&gt;

&lt;p&gt;AI agents benefit from fresh, structured web data for several agentic use cases:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Freelance market intelligence&lt;/strong&gt;: Track demand for skills, average rates, and job volume over time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Skill demand monitoring&lt;/strong&gt;: Identify which technologies or services are gaining traction in the freelance marketplace.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rate analysis&lt;/strong&gt;: Compare compensation trends across regions or experience levels to inform pricing strategies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These insights feed RAG pipelines, tool calls, and knowledge base updates that keep agents current without manual scraping.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why raw HTTP requests fail for agents
&lt;/h2&gt;

&lt;p&gt;Direct HTTP calls to Upwork often break agent pipelines:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Rate limiting&lt;/strong&gt;: IP bans or CAPTCHAs cause failed requests and wasted token budgets on retries.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;JavaScript rendering&lt;/strong&gt;: Modern pages rely on client‑side code; raw HTML lacks the data you need.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bot detection&lt;/strong&gt;: Headless browser signatures trigger blocks, requiring complex mitigation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Parsing overhead&lt;/strong&gt;: Agents spend cycles extracting fields from noisy HTML instead of reasoning.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The result is brittle pipelines, higher latency, and increased cost per successful data point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Connecting your agent to Upwork via AlterLab
&lt;/h2&gt;

&lt;p&gt;AlterLab handles anti‑bot measures, rendering, and extraction so your agent receives structured output. Use the Extract API for schema‑driven JSON or the Scrape API for raw HTML when you need full page control.&lt;/p&gt;

&lt;h3&gt;
  
  
  Structured extraction with the Extract API
&lt;/h3&gt;

&lt;p&gt;Define a schema that matches the Upwork job fields you need—title, price, description, etc.—and let AlterLab return clean data.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```python title="agent_upwork_extract.py" {3-8}&lt;/p&gt;

&lt;p&gt;client = alterlab.Client("YOUR_API_KEY")&lt;/p&gt;

&lt;h1&gt;
  
  
  Request structured data from a Upwork job listing
&lt;/h1&gt;

&lt;p&gt;result = client.extract(&lt;br&gt;
    url="&lt;a href="https://www.upwork.com/jobs/%7E0123456789abcdef" rel="noopener noreferrer"&gt;https://www.upwork.com/jobs/~0123456789abcdef&lt;/a&gt;",&lt;br&gt;
    schema={&lt;br&gt;
        "title": "string",&lt;br&gt;
        "price": "string",&lt;br&gt;
        "description": "string",&lt;br&gt;
        "skills": "list[string]"&lt;br&gt;
    }&lt;br&gt;
)&lt;/p&gt;
&lt;h1&gt;
  
  
  result.data is a dict ready for your LLM
&lt;/h1&gt;

&lt;p&gt;print(result.data)&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;




```bash title="Terminal"
curl -X POST https://api.alterlab.io/api/v1/extract/templates/{template_id} \
  -H "X-API-Key: YOUR_KEY" \
  -d '{
    "url": "https://www.upwork.com/jobs/~0123456789abcdef",
    "schema": {
      "title": "string",
      "price": "string",
      "description": "string",
      "skills": "list[string]"
    }
  }'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Both examples return a JSON object that your agent can pass directly to an LLM call, saving tokens and eliminating parsing logic.&lt;/p&gt;

&lt;p&gt;For cases where you need the full rendered page (e.g., to run custom logic), use the Scrape API:&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```python title="agent_upwork_scrape.py" {3-6}&lt;br&gt;
result = client.scrape(&lt;br&gt;
    url="&lt;a href="https://www.upwork.com/jobs/%7E0123456789abcdef" rel="noopener noreferrer"&gt;https://www.upwork.com/jobs/~0123456789abcdef&lt;/a&gt;",&lt;br&gt;
    formats=["html"]  # returns cleaned HTML ready for downstream parsing&lt;br&gt;
)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


Refer to the [Extract API docs](/docs/extract) for schema options and rate limits.

## Using the Search API for Upwork queries
When you need to discover jobs matching a query (e.g., “Python Django”), AlterLab’s Search API lets you retrieve results without building a crawler.



```python title="agent_upwork_search.py" {3-7}
# Assume you have previously created a search template via the dashboard or API
search_id = "upwork-python-jobs"

result = client.search(
    search_id=search_id,
    params={"q": "Python Django", "page": 1}
)

# result.data contains an array of structured job objects
for job in result.data["items"]:
    print(job["title"], job["price"])
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;p&gt;```bash title="Terminal"&lt;br&gt;
curl -X POST &lt;a href="https://api.alterlab.io/api/v1/search/upwork-python-jobs" rel="noopener noreferrer"&gt;https://api.alterlab.io/api/v1/search/upwork-python-jobs&lt;/a&gt; \&lt;br&gt;
  -H "X-API-Key: YOUR_KEY" \&lt;br&gt;
  -d '{"q": "Python Django", "page": 1}'&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


The Search API returns the same structured format as Extract, making it easy to plug into agentic workflows.

&amp;lt;div data-infographic="try-it" data-url="https://www.upwork.com" data-description="Extract structured Upwork data for your AI agent"&amp;gt;&amp;lt;/div&amp;gt;

## MCP integration
AlterLab provides an MCP server that exposes its APIs as tool calls for agents built with Claude, GPT, or Cursor. Register the MCP server in your agent’s toolkit and invoke Upwork extraction as a standard function call. See the [AlterLab for AI Agents](https://alterlab.io/glossary/user-agent) glossary for setup details.

## Building a freelance market intelligence pipeline
Here is an end‑to‑end example showing how an agent can collect Upwork data, enrich it, and store insights.

1. **Agent triggers a tool call** – The LLM decides it needs current freelance rates for “React Native”.
2. **AlterLab fetches and extracts** – The agent calls the Extract API with a schema for title, price, and skills. AlterLab handles rendering, anti‑bot, and returns JSON.
3. **Agent processes the data** – The structured output is passed to a summarization LLM or stored in a knowledge base.
4. **Pipeline repeats on a schedule** – Using cron or an internal scheduler, the agent refreshes the dataset hourly.



```python title="freelance_pipeline.py" {3-15}

from openai import OpenAI

alterlab_client = alterlab.Client("YOUR_ALTERLAB_KEY")
llm_client = OpenAI(api_key="YOUR_OPENAI_KEY")

def fetch_upwork_jobs(query: str, limit: int = 20):
    """Retrieve structured job data for a given query."""
    search_id = "upwork-freelance-search"
    resp = alterlab_client.search(
        search_id=search_id,
        params={"q": query, "limit": limit}
    )
    return resp.data.get("items", [])

def enrich_with_llm(jobs):
    """Ask the LLM to extract trends from raw job listings."""
    prompt = (
        "Analyze the following Upwork job listings and summarize:\n"
        "- Median hourly rate\n"
        "- Top 5 requested skills\n"
        "- Any notable changes from the previous report\n\n"
        f"Jobs: {jobs}"
    )
    completion = llm_client.chat.completions.create(
        model="gpt-4o",
        messages=[{"role": "user", "content": prompt}],
        temperature=0.2
    )
    return completion.choices[0].message.content

def main():
    jobs = fetch_upwork_jobs("React Native")
    insight = enrich_with_llm(jobs)
    # Store insight in a database or trigger a notification
    print("Market insight:", insight)

if __name__ == "__main__":
    main()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pipeline uses AlterLab as a reliable data source, letting the agent focus on reasoning rather than navigating anti‑bot measures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key takeaways
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Structured extraction removes HTML parsing overhead and improves token efficiency.&lt;/li&gt;
&lt;li&gt;AlterLab’s built‑in anti‑bot handling delivers reliable data for agentic pipelines.&lt;/li&gt;
&lt;li&gt;Use the Search API for discovery and the Extract API for precise field selection.&lt;/li&gt;
&lt;li&gt;Integrate via MCP to treat AlterLab as a standard tool call in LLM agents.&lt;/li&gt;
&lt;li&gt;Review the &lt;a href="https://dev.to/pricing"&gt;AlterLab pricing&lt;/a&gt; page to estimate costs for your agent’s data volume.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hit reply if you have questions.&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>llm</category>
      <category>rag</category>
      <category>dataextraction</category>
    </item>
    <item>
      <title>How to Give Your AI Agent Access to Seeking Alpha Data</title>
      <dc:creator>AlterLab</dc:creator>
      <pubDate>Tue, 30 Jun 2026 11:21:47 +0000</pubDate>
      <link>https://dev.to/alterlab/how-to-give-your-ai-agent-access-to-seeking-alpha-data-1df5</link>
      <guid>https://dev.to/alterlab/how-to-give-your-ai-agent-access-to-seeking-alpha-data-1df5</guid>
      <description>&lt;h1&gt;
  
  
  How to Give Your AI Agent Access to Seeking Alpha Data
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Disclaimer&lt;/strong&gt;: &lt;em&gt;This guide covers accessing publicly available data. Always review a site's robots.txt and Terms of Service before automated access.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;p&gt;To give an AI agent access to Seeking Alpha data, connect it to the AlterLab Extract API. This allows your agent to request a URL and receive structured JSON instead of raw HTML, making it compatible with RAG pipelines and tool-calling-based-reasoning without manual parsing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI Agents Need Seeking Alpha Data
&lt;/h2&gt;

&lt;p&gt;Standard LLMs are limited by their training cutoff. For financial agents, this means they are blind to current market sentiment, recent earnings transcripts, and real-time stock analysis. To build a production-grade investment agent, you must bridge the gap between the LLM and live web data.&lt;/p&gt;

&lt;p&gt;High-performing agentic workflows use Seeking Alpha data for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Investment Research Monitoring&lt;/strong&gt;: Agents that track specific tickers and summarize new analysis articles as they are published.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Earnings Analysis&lt;/strong&gt;: Automatically pulling key metrics from earnings summaries to compare against historical trends in a RAG (Retrieval-Augm-ented Generation) database.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stock Discussion Pipelines&lt;/strong&gt;: Monitoring sentiment in public comment sections to provide a "market mood" metric for a broader investment tool.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Raw HTTP Requests Fail for Agents
&lt;/h2&gt;

&lt;p&gt;If you attempt to use a simple &lt;code&gt;requests.get()&lt;/code&gt; or &lt;code&gt;fetch()&lt;/code&gt; call within a tool-call-loop, your agent will likely fail. Seeking Alpha utilizes sophisticated anti-bot protections that detect non-browser signatures.&lt;/p&gt;

&lt;p&gt;When an agent hits a wall, it doesn's just "get the wrong data"—it wastes your most expensive resource: the LLM's context window. Instead of getting financial data, your agent receives a 403 Forbidden error or a CAPTCHA challenge. This results in:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Token Waste&lt;/strong&gt;: The agent tries to "reason" through an error page, consuming tokens for no value.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Broken Pipelines&lt;/strong&gt;: An agent that cannot fetch data cannot complete its tool-calling loop, causing the entire task to crash.&lt;/li&gt;
&lt;li&gt; &lt;strong&gt;Rate Limiting&lt;/strong&gt;: Repeatedly hitting a site with the same signature will lead to an IP ban, breaking your agent's ability to access any data from that source.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Connecting Your Agent to Seeking Alpha via AlterLab
&lt;/h2&gt;

&lt;p&gt;The most efficient way to feed data to an agent is via structured extraction. Rather than passing raw HTML into an LLM—which is noisy and expensive—you should use the AlterLab Extract API. This transforms a webpage into a clean JSON object that fits perfectly into a prompt.&lt;/p&gt;

&lt;h3&gt;
  
  
  Using the Extract API
&lt;/h3&gt;

&lt;p&gt;The Extract API uses predefined templates to turn any URL into structured data. This is the preferred method for RAG pipelines because it minimizes the token count significantly.&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;```python title="agent_extraction.py" {3-8}&lt;/p&gt;

&lt;p&gt;client = alterlab.Client("YOUR_API_KEY")&lt;/p&gt;

&lt;h1&gt;
  
  
  Extract structured data directly for the agent's context window
&lt;/h1&gt;

&lt;p&gt;result = client.extract(&lt;br&gt;
    url="&lt;a href="https://seekingalpha.com/article/example-article-id" rel="noopener noreferrer"&gt;https://seekingalpha.com/article/example-article-id&lt;/a&gt;",&lt;br&gt;
    schema={&lt;br&gt;
        "article_title": "string",&lt;br&gt;
        "author": "string",&lt;br&gt;
        "sentiment": "string",&lt;br&gt;
        "key_points": "array of strings"&lt;br&gt;
    }&lt;br&gt;
)&lt;/p&gt;

&lt;h1&gt;
  
  
  Pass this clean JSON directly to your LLM
&lt;/h1&gt;

&lt;p&gt;print(result.data)&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


Alternatively, you can use `curl` for lightweight server-side implementations:



```bash title="Terminal"
curl -X POST https://api.alterlab.io/api/v1/extract/templates/{template_id} \
  -H "X-API-Key: YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://seekingalpha.com/example",
    "schema": {"title": "string", "author": "string"}
  }'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For more details on schema definitions, check our &lt;a href="https://dev.to/docs/extract"&gt;Extract API docs&lt;/a&gt;. If you are building a production service, refer to our &lt;a href="https://dev.to/docs/quickstart/installation"&gt;Getting started guide&lt;/a&gt; to set up your environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Searching for Financial Data at Scale
&lt;/h2&gt;

&lt;p&gt;Sometimes your agent doesn's have a specific URL but rather a query (e.g., "Find recent sentiment for $TSLA"). In these cases, the Search API allows your agent to perform queries against the web and receive structured results.&lt;/p&gt;

&lt;p&gt;An agentic workflow would look like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Agent identifies a need for new data.&lt;/li&gt;
&lt;li&gt;Agent generates a search query.&lt;/li&gt;
&lt;li&gt;Agent calls the AlterLab Search tool.&lt;/li&gt;
&lt;li&gt;AlterLab returns a list of URLs and metadata.&lt;/li&gt;
&lt;li&gt;Agent selects the most relevant URL and calls the Extract API.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  MCP Integration: Giving Claude and GPT-4 Real-World Access
&lt;/h2&gt;

&lt;p&gt;The Model Context Protocol (MCP) is becoming the standard for connecting LLMs to external data sources. By using AlterLab as an MCP server, you can give agents like Claude or custom-built GPTs the ability to "browse" Seeking Alpha as a tool. This transforms the agent from a static text generator into a dynamic researcher capable of real-time market analysis.&lt;/p&gt;

&lt;p&gt;Learn more about how we support this via our &lt;a href="https://dev.to/glossary/user-agent"&gt;User Agent glossary&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building an Investment Research Monitoring Pipeline
&lt;/h2&gt;

&lt;p&gt;To build a professional-grade monitoring system, you need to move away from manual scripts and toward automated pipelines. A robust architecture looks like this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Trigger&lt;/strong&gt;: A cron job or a webhook signals a new article.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extraction&lt;/strong&gt;: AlterLab fetches the article, bypasses bot detection, and returns structured JSON via a Webhook.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reasoning&lt;/strong&gt;: The LLM receives the JSON, compares it against your investment thesis, and decides if action is required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Action&lt;/strong&gt;: The agent posts a summary to Slack or updates a database.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Implementation Example: The Monitoring Loop
&lt;/h3&gt;



&lt;p&gt;```python title="monitoring_pipeline.py" {2,5,8-12}&lt;/p&gt;

&lt;p&gt;client = alterlab.Client("YOUR_API_KEY")&lt;br&gt;
llm = openai.OpenAI()&lt;/p&gt;

&lt;p&gt;def monitor_ticker(url):&lt;br&gt;
    # 1. Get clean data from AlterLab&lt;br&gt;
    raw_data = client.extract(url=url, schema_id="seeking_alpha_article")&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 2. Feed structured data to LLM for reasoning
response = llm.chat.completions.create(
    model="gpt-4-turbo",
    messages=[
        {"role": "system", "content": "You are a financial analyst. Summarize the sentiment of this article."},
        {"role": "user", "content": f"Data: {raw_data.data}"}
    ]
)
return response.choices[0].message.content
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h1&gt;
  
  
  Example URL
&lt;/h1&gt;

&lt;p&gt;print(monitor_ticker("&lt;a href="https://seekingalpha.com/article/example%22)" rel="noopener noreferrer"&gt;https://seekingalpha.com/article/example")&lt;/a&gt;)&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;


## Key Takeaways
* **Structured over Raw**: Never feed raw HTML into an LLM. Use the Extract API to minimize token usage and-to-maximize reasoning-quality.
* **Avoid the Retry Loop**: Building your own proxy rotation is a waste of engineering time. Let the API handle the heavy lifting of bot detection.
* **Agentic Tools**: Use the MCP pattern to give your agents native access to web data without writing custom scrapers for every site.

By implementing these patterns, you move from "scraping websites" to "orchestrating data pipelines," creating agents that can actually act on real-world information.

***

**AlterLab // Web Data, Simplified.**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>aiagents</category>
      <category>llm</category>
      <category>rag</category>
      <category>dataextraction</category>
    </item>
    <item>
      <title>SGLang v0.5.14: LPLB Expert-Parallel Load Balancing</title>
      <dc:creator>pueding</dc:creator>
      <pubDate>Tue, 30 Jun 2026 11:19:23 +0000</pubDate>
      <link>https://dev.to/pueding/sglang-v0514-lplb-expert-parallel-load-balancing-2dan</link>
      <guid>https://dev.to/pueding/sglang-v0514-lplb-expert-parallel-load-balancing-2dan</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/QCcBgX1CYrI"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What:&lt;/strong&gt; The &lt;strong&gt;SGLang v0.5.14&lt;/strong&gt; release ships &lt;strong&gt;LPLB&lt;/strong&gt; — a &lt;strong&gt;linear-programming load balancer&lt;/strong&gt; for serving mixture-of-experts models, where the experts are split across many GPUs and each step routes every token to a few of them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why:&lt;/strong&gt; In expert-parallel MoE serving, token routing is &lt;strong&gt;uneven and shifts every step&lt;/strong&gt;, so one overloaded GPU stalls the whole step at a sync barrier; &lt;strong&gt;evening that load is what unlocks throughput&lt;/strong&gt; on big MoE models like DeepSeek-V4.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;vs prior:&lt;/strong&gt; Earlier setups used &lt;strong&gt;static, hand-tuned expert placement&lt;/strong&gt; and ate the imbalance; LPLB keeps &lt;strong&gt;redundant replicas of the hot experts&lt;/strong&gt; and solves a small linear program &lt;strong&gt;each step&lt;/strong&gt; to minimize the busiest GPU's share of the work.&lt;/p&gt;

&lt;h2&gt;
  
  
  Think of it as
&lt;/h2&gt;

&lt;p&gt;A warehouse store opening duplicate counters to even out the longest line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       40% of this step's tokens want one hot expert

   WITHOUT LPLB                 WITH LPLB (3 replicas)
   ┌──────────────┐             ┌──────────────┐
   │ GPU1 ####### │ 40%         │ GPU1 ##      │ 14%
   │ GPU2 #       │  5%         │ GPU2 ##      │ 14%
   │ GPU3 #       │  5%         │ GPU3 ##      │ 14%
   └──────┬───────┘             └──────┬───────┘
          ▼                            ▼
   barrier waits on GPU1        lanes finish together
   ✗ others idle ~1/3 step      ✓ idle time deleted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;a customer = a token routed to its experts this step&lt;/li&gt;
&lt;li&gt;a specialty counter = an expert (a sub-network in a mixture-of-experts model)&lt;/li&gt;
&lt;li&gt;a checkout lane = a GPU the experts are spread across&lt;/li&gt;
&lt;li&gt;one counter mobbed while others sit idle = per-GPU load imbalance&lt;/li&gt;
&lt;li&gt;duplicate copies of the busy counter = redundant expert replicas&lt;/li&gt;
&lt;li&gt;the floor manager who evens the longest line each wave = LPLB&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Quick glossary
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;MoE (Mixture-of-Experts)&lt;/strong&gt; — A model whose feed-forward layer is split into many &lt;strong&gt;experts&lt;/strong&gt; (sub-networks); a small &lt;strong&gt;router&lt;/strong&gt; sends each token to only a few. Total parameters are huge, but the &lt;strong&gt;active&lt;/strong&gt; ones per token stay small. DeepSeek-V4 is a large MoE model.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Expert parallelism (EP)&lt;/strong&gt; — The serving layout that &lt;strong&gt;spreads a MoE's experts across many GPUs&lt;/strong&gt;, because all the experts together do not fit on one. Each step, tokens must be shipped to whichever GPU holds their chosen expert and the results shipped back.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Load imbalance&lt;/strong&gt; — When this step's router sends far more tokens to some experts than others, the GPUs holding the &lt;strong&gt;popular experts&lt;/strong&gt; get swamped while the rest sit idle. The pattern is &lt;strong&gt;data-dependent&lt;/strong&gt;, so it shifts batch to batch.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Redundant expert replicas&lt;/strong&gt; — Keeping &lt;strong&gt;extra copies of the hot experts&lt;/strong&gt; on several GPUs so their token load can be split, instead of one GPU owning a popular expert alone. The balancer decides how to divide each expert's tokens among its copies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LPLB&lt;/strong&gt; — SGLang's &lt;strong&gt;Linear-Programming Load Balancer&lt;/strong&gt;. Each step it solves a tiny &lt;strong&gt;linear program&lt;/strong&gt; over the current token counts to assign load across replicas so the &lt;strong&gt;maximum per-GPU load is as small as possible&lt;/strong&gt; (a min-max objective).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Waterfill&lt;/strong&gt; — The second expert-parallel balancer the release ships alongside LPLB. SGLang names it but does not detail how it works; the name points to a classic &lt;strong&gt;water-filling&lt;/strong&gt; heuristic — fill the least-loaded replica first — which would be a lighter alternative to solving the LP each step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;All-to-all&lt;/strong&gt; — The expert-parallel &lt;strong&gt;communication step&lt;/strong&gt; that ships tokens out to their experts' GPUs and the results back. It runs every layer and &lt;strong&gt;waits for the slowest GPU&lt;/strong&gt;, which is why imbalance is so costly here.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The news.&lt;/strong&gt; On &lt;strong&gt;June 26, 2026&lt;/strong&gt;, the SGLang team &lt;a href="https://github.com/sgl-project/sglang/releases/tag/v0.5.14" rel="noopener noreferrer"&gt;released v0.5.14&lt;/a&gt;, with work from 56 contributors. The headline is &lt;strong&gt;5x higher throughput at the same interactivity&lt;/strong&gt; serving &lt;strong&gt;DeepSeek-V4&lt;/strong&gt; on NVIDIA GB300, driven by two new expert-parallel load balancers — &lt;strong&gt;Waterfill&lt;/strong&gt; and &lt;strong&gt;LPLB&lt;/strong&gt; (a linear-programming load balancer) — plus CuteDSL prefill kernels for Blackwell and int8 checkpoint pooling for linear-attention prefix caches. &lt;a href="https://github.com/sgl-project/sglang/releases/tag/v0.5.14" rel="noopener noreferrer"&gt;Read the release →&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Picture a warehouse store at peak rush. The checkout &lt;strong&gt;lanes&lt;/strong&gt; are the GPUs; the specialty &lt;strong&gt;counters&lt;/strong&gt; — deli, pharmacy, bakery — are the model's experts, and because no single lane can hold them all, the store spreads the counters across the lanes. That spread is &lt;strong&gt;expert parallelism&lt;/strong&gt;: a mixture-of-experts model has too many experts to fit on one GPU, so they live across many, and each decode step the router sends every customer (token) to the one or two counters they need. The trouble is that the rush is &lt;strong&gt;lumpy&lt;/strong&gt;. This wave, everyone wants the deli; next wave, the pharmacy. &lt;strong&gt;So one counter gets mobbed while the rest stand idle — and the store can't close out the rush until that longest line clears.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That last clause is the whole problem, because the lanes do not finish independently. Every GPU has to meet at a sync barrier — the &lt;strong&gt;all-to-all&lt;/strong&gt; that ships tokens to their experts and the answers back — and that barrier waits for the slowest lane. &lt;strong&gt;The GPU holding this step's most popular expert therefore sets the pace for all of them, and the fast lanes burn the difference as idle time.&lt;/strong&gt; Add more GPUs and the imbalance can get &lt;em&gt;worse&lt;/em&gt;, not better, because the hot expert still lives on one lane while you have paid for more lanes to stand around.&lt;/p&gt;

&lt;p&gt;SGLang v0.5.14's fix is to stop letting one counter bottleneck the floor. It keeps &lt;strong&gt;redundant replicas&lt;/strong&gt; of the hot experts — duplicate deli counters on several lanes — and then, each wave, the floor manager solves a quick assignment problem: given how many customers want each counter &lt;em&gt;right now&lt;/em&gt;, divide every counter's line across its copies so the &lt;strong&gt;busiest lane does as little as possible&lt;/strong&gt;. That floor manager is &lt;strong&gt;LPLB&lt;/strong&gt;, and "as little as possible" is literal: it solves a small &lt;strong&gt;linear program&lt;/strong&gt; whose objective is to &lt;strong&gt;minimize the maximum per-GPU load&lt;/strong&gt; (a min-max). &lt;strong&gt;Waterfill&lt;/strong&gt; is the other balancer the release pairs it with, and SGLang does not spell out how it works. The name, though, points to a classic &lt;em&gt;water-filling&lt;/em&gt; heuristic — fill the least-loaded replica first — which would be a lighter alternative to running the LP every step.&lt;/p&gt;

&lt;p&gt;Hold the layout fixed and walk the imbalance math &lt;em&gt;(illustrative — the release reports only the end-to-end 5x)&lt;/em&gt;. Say &lt;strong&gt;8 GPUs&lt;/strong&gt; serve a batch, and the router sends &lt;strong&gt;40%&lt;/strong&gt; of this step's tokens to one hot expert that lives on a single GPU, while another GPU draws just &lt;strong&gt;5%&lt;/strong&gt;. The step can't end until that one GPU finishes its &lt;strong&gt;40%&lt;/strong&gt;, so the other seven idle for roughly a third of the step — you own 8 GPUs but move at the speed of the busiest one. Now place &lt;strong&gt;3 replicas&lt;/strong&gt; of that hot expert and let LPLB split its tokens across them: its share per GPU falls from &lt;strong&gt;40%&lt;/strong&gt; toward about &lt;strong&gt;14%&lt;/strong&gt;, the barrier wait shrinks sharply, and the lanes finish much closer together. &lt;strong&gt;The win isn't a faster kernel — it's deleting the idle time that imbalance was manufacturing.&lt;/strong&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Expert-parallel balancing&lt;/th&gt;
&lt;th&gt;How it assigns load&lt;/th&gt;
&lt;th&gt;Per-step cost&lt;/th&gt;
&lt;th&gt;Balance quality&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Static / hand-tuned placement&lt;/td&gt;
&lt;td&gt;fixed expert→GPU map, set before serving&lt;/td&gt;
&lt;td&gt;~none&lt;/td&gt;
&lt;td&gt;poor under shifting, data-dependent routing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Waterfill (this release)&lt;/td&gt;
&lt;td&gt;the release's second balancer; name implies water-filling, internals not detailed&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;a lighter companion to LPLB (inferred from the name)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;strong&gt;LPLB (this release)&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;solves a linear program to minimize the busiest GPU's load&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;&lt;strong&gt;a small solve each step&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;
&lt;strong&gt;tightest — a min-max optimum over replicas&lt;/strong&gt; &lt;a href="https://github.com/sgl-project/sglang/releases/tag/v0.5.14" rel="noopener noreferrer"&gt;(SGLang v0.5.14)&lt;/a&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Where it earns its keep is exactly the regime DeepSeek-V4 lives in: a &lt;strong&gt;large MoE&lt;/strong&gt; served with expert parallelism across many Blackwell GPUs, where the &lt;strong&gt;all-to-all&lt;/strong&gt; and its sync barrier are a leading cost in each decode step. The release's headline — &lt;strong&gt;5x higher throughput at the same interactivity&lt;/strong&gt; — is a goodput claim: more tokens per second &lt;em&gt;without&lt;/em&gt; making any single user wait longer. &lt;strong&gt;Read it as the lanes finishing together instead of seven of them waiting on one — the same hardware, far less idle time.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Related explainers
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://learnaivisually.com/ai-explained/sglang-v0-5-12-tokenspeed-mla" rel="noopener noreferrer"&gt;SGLang v0.5.12 — TokenSpeed MLA backend&lt;/a&gt; — the prior SGLang release, a &lt;strong&gt;kernel-level&lt;/strong&gt; cache-write win rather than a &lt;strong&gt;scheduling&lt;/strong&gt; one&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://learnaivisually.com/ai-explained/manifold-power-iteration-router-alignment" rel="noopener noreferrer"&gt;Manifold Power Iteration — MoE router alignment&lt;/a&gt; — the &lt;em&gt;other&lt;/em&gt; MoE balance problem: &lt;strong&gt;which&lt;/strong&gt; expert a token picks (router design), not &lt;strong&gt;where&lt;/strong&gt; that expert runs&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://learnaivisually.com/ai-explained/glm-5-2-active-vs-total-parameters" rel="noopener noreferrer"&gt;GLM-5.2 — active vs total parameters&lt;/a&gt; — why MoE serving is its own discipline: huge total weights, small active compute per token&lt;/li&gt;
&lt;/ul&gt;

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

&lt;h3&gt;
  
  
  What is LPLB (linear-programming load balancing)?
&lt;/h3&gt;

&lt;p&gt;LPLB is the Linear-Programming Load Balancer added in SGLang v0.5.14. When a mixture-of-experts model is served with expert parallelism — its experts split across many GPUs — the router sends an uneven, step-by-step-changing number of tokens to each expert, so some GPUs get swamped while others idle. LPLB keeps redundant replicas of the hot experts and, each step, solves a small linear program over the current token counts to divide every expert's load across its replicas so the maximum per-GPU load is minimized. Evening the load shrinks the wait at the all-to-all sync barrier that gates each decode step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does expert-parallel MoE serving need load balancing at all?
&lt;/h3&gt;

&lt;p&gt;Because expert parallelism makes the GPUs finish a step together, not independently. Every layer runs an all-to-all that ships tokens to their experts' GPUs and the results back, and that barrier waits for the slowest GPU. Since token-to-expert routing is data-dependent and shifts every batch, whichever GPU holds this step's most popular expert becomes the bottleneck for all of them — and the rest burn the difference as idle time. Without balancing, adding more GPUs can even make it worse, because the hot expert still lives on one GPU. SGLang reports a 5x throughput gain at the same interactivity for DeepSeek-V4 on NVIDIA GB300 once the load is evened.&lt;/p&gt;

&lt;h3&gt;
  
  
  How does LPLB differ from Waterfill, and from a MoE router?
&lt;/h3&gt;

&lt;p&gt;Waterfill and LPLB are the two expert-parallel balancers the release ships, both aimed at spreading each step's token load across expert replicas. SGLang details LPLB — it solves a linear program for a tight min-max balance at a small per-step cost — but does not spell out Waterfill's internals; the name points to a classic water-filling heuristic (fill the least-loaded replica first), which would be a lighter alternative to an LP solve. Both differ from the MoE router: the router decides which expert each token should go to (a quality choice about the model's output), whereas the balancers decide where, among the redundant copies of that chosen expert, the work actually runs (a serving choice about GPU utilization).&lt;/p&gt;




&lt;p&gt;Originally posted on &lt;a href="https://learnaivisually.com/ai-explained/sglang-v0-5-14-lplb-load-balancing" rel="noopener noreferrer"&gt;Learn AI Visually&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
      <category>devops</category>
    </item>
    <item>
      <title>Amazon Bedrock Deployment Guide: From Environment Setup to Production Operations</title>
      <dc:creator>Andy Tan</dc:creator>
      <pubDate>Tue, 30 Jun 2026 11:18:05 +0000</pubDate>
      <link>https://dev.to/combo-andy/amazon-bedrock-deployment-guide-from-environment-setup-to-production-operations-2hja</link>
      <guid>https://dev.to/combo-andy/amazon-bedrock-deployment-guide-from-environment-setup-to-production-operations-2hja</guid>
      <description>&lt;p&gt;Amazon Bedrock, AWS's fully managed service for foundation models, makes it much easier to build and deploy generative AI applications through a model-as-a-service (MaaS) approach. This guide outlines a structured deployment workflow that covers permissions, network architecture, model onboarding, API integration, and performance optimization, helping teams build AI services that are scalable, secure, and operationally reliable.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Core Benefits and Technical Context&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Organizations typically choose Amazon Bedrock for the following reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resource isolation and elastic scalability: Dedicated compute capacity helps reduce contention with other workloads, while scaling policies can adjust capacity based on demand. Under the right conditions, this can improve cost efficiency significantly.&lt;/li&gt;
&lt;li&gt;Security and compliance: Bedrock integrates with AWS security controls such as VPC networking and IAM, helping organizations meet strict security and compliance requirements, including standards such as SOC 2 Type II, HIPAA, and GDPR.&lt;/li&gt;
&lt;li&gt;Operational simplicity: Because AWS manages the underlying infrastructure, teams can reduce deployment time and lower operational overhead compared with self-managed model serving stacks.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Pre-Deployment Preparation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;2.1 AWS Account and Permission Setup&lt;/p&gt;

&lt;p&gt;For better security, use a dedicated IAM user or role instead of the root account, and enable AWS CloudTrail for auditing and operational traceability.&lt;/p&gt;

&lt;p&gt;Example IAM policy (JSON):&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;"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;"2012-10-17"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"Statement"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Effect"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Allow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"Action"&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="s2"&gt;"bedrock:*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"ec2:Describe*"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="s2"&gt;"s3:GetObject"&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;"Resource"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"*"&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: In production environments, always follow the principle of least privilege and scope &lt;code&gt;Resource&lt;/code&gt; permissions as narrowly as possible.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;2.2 Local Environment Configuration&lt;/p&gt;

&lt;p&gt;Install and configure the AWS CLI (version 2.15 or later is recommended) so that you can manage resources from the command line.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;aws configure
&lt;span class="c"&gt;# Enter your Access Key ID, Secret Access Key, Region (for example, us-west-2), and preferred output format (such as json)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.3 Network and Storage Architecture&lt;/p&gt;

&lt;p&gt;A three-tier architecture is commonly recommended to support high availability and security:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Frontend layer: Use an Application Load Balancer (ALB), ideally protected by AWS WAF against common web threats.&lt;/li&gt;
&lt;li&gt;  Application layer: Deploy Bedrock-related application components across multiple Availability Zones (AZs) for resilience.&lt;/li&gt;
&lt;li&gt;  Data layer: Use Amazon S3 for model artifacts, logs, and intermediate data. Where appropriate, use VPC endpoints or PrivateLink to reduce public internet exposure.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Model Deployment Workflow&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;3.1 Model Preparation and Conversion&lt;/p&gt;

&lt;p&gt;If you plan to work with a custom model such as DeepSeek-R1, prepare the model artifacts in a format compatible with your deployment pipeline, such as FP16 or FP8 where applicable.&lt;/p&gt;

&lt;p&gt;Example conversion code:&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;torch&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;deepseek_r1.converter&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;BedrockExporter&lt;/span&gt;

&lt;span class="n"&gt;model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;torch&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;deepseek_r1_base.pt&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;exporter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;BedrockExporter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;framework&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;pytorch&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;output_path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;s3://model-bucket/deepseek/&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;precision&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;fp16&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;  &lt;span class="c1"&gt;# supports fp32/fp16/bf16
&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;exporter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;convert&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is generally recommended to package model artifacts as a &lt;code&gt;.tar.gz&lt;/code&gt; file and keep the package size below 50 GB.&lt;/p&gt;

&lt;p&gt;3.2 Deployment Through the Console or API&lt;/p&gt;

&lt;p&gt;You can deploy model-related resources through the Bedrock console or via API-driven automation.&lt;/p&gt;

&lt;p&gt;Example API workflow:&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;boto3&lt;/span&gt;

&lt;span class="n"&gt;bedrock&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;boto3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;bedrock-runtime&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;region_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;us-west-2&lt;/span&gt;&lt;span class="sh"&gt;'&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;bedrock&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;model_name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;deepseek-r1-prod&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;base_model_identifier&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;deepseek-ai/deepseek-r1-6b&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;inference_configuration&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;preferred_compute_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;gpu_t4&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;min_worker_count&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;max_worker_count&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10&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;3.3 Auto Scaling Strategy&lt;/p&gt;

&lt;p&gt;To balance responsiveness and cost efficiency, define scaling rules such as the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Scale out when: Request queue depth exceeds 50, or latency rises above 2 seconds.&lt;/li&gt;
&lt;li&gt;  Scale in when: CPU utilization remains below 30% for 5 minutes.&lt;/li&gt;
&lt;li&gt;  Cooldown period: 300 seconds to avoid rapid scaling oscillation.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;API Integration Patterns&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;4.1 Basic Text Generation&lt;/p&gt;

&lt;p&gt;Use the &lt;code&gt;invoke_model&lt;/code&gt; API for synchronous inference requests.&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;boto3&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;botocore.config&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Config&lt;/span&gt;

&lt;span class="n"&gt;bedrock_config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Config&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;retries&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;max_attempts&lt;/span&gt;&lt;span class="sh"&gt;'&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;mode&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;adaptive&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;read_timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;
&lt;span class="p"&gt;)&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;boto3&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;bedrock-runtime&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;bedrock_config&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="nf"&gt;invoke_model&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;modelId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;deepseek-r1-prod&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;prompt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Explain the basic principles of quantum computing&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;max_tokens&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;512&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="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="mf"&gt;0.7&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;loads&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;body&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;())[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;generation&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;4.2 Streaming Responses and Multi-Turn Conversations&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Streaming output: Use &lt;code&gt;invoke_model_with_stream&lt;/code&gt; to deliver responses incrementally and improve the user experience.&lt;/li&gt;
&lt;li&gt;  Conversation handling: Use Bedrock conversation-oriented APIs or your own session layer to preserve context for assistants, customer support bots, and similar use cases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;4.3 Batch Processing Optimization&lt;/p&gt;

&lt;p&gt;For non-real-time workloads, dynamic batching can improve throughput substantially. A batch size of 32 to 64 requests is often a practical starting point.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Performance Optimization and Monitoring&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;5.1 Performance Tuning Approaches&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Model quantization: Moving from FP32 to FP16 or FP8 can reduce memory usage and improve inference speed.&lt;/li&gt;
&lt;li&gt;  Caching: Integrate ElastiCache Redis and apply an LRU strategy to frequently repeated queries.&lt;/li&gt;
&lt;li&gt;  Asynchronous processing: Route non-real-time requests through Amazon SQS to decouple frontend traffic from backend inference workloads.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;5.2 Example Benchmark Targets&lt;/p&gt;

&lt;p&gt;Metric  Test Method Target&lt;br&gt;
Time to First Token (TTFT)  Empty request test  &amp;lt; 800 ms&lt;br&gt;
Throughput  100 concurrent requests sustained for 5 minutes &amp;gt; 80 TPS&lt;br&gt;
Error rate  Measured across 1,000 consecutive requests  &amp;lt; 0.1%&lt;/p&gt;

&lt;p&gt;5.3 CloudWatch Monitoring and Alerts&lt;/p&gt;

&lt;p&gt;Set up alerts on key operational metrics such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  CPUUtilization: Above 85% for 5 minutes -&amp;gt; trigger an SNS notification and scale out automatically.&lt;/li&gt;
&lt;li&gt;  ModelLatency: P99 latency above 1000 ms -&amp;gt; investigate load levels or switch traffic to a backup endpoint.&lt;/li&gt;
&lt;li&gt;  Invocations 4xx: More than 10 per minute -&amp;gt; inspect client request formatting and permissions.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Security, Compliance, and Cost Management&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;6.1 Data Protection&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Network isolation: Use VPC endpoint policies to restrict traffic to private subnets where appropriate.&lt;/li&gt;
&lt;li&gt;  Encryption: Use AWS KMS customer-managed keys (CMKs) to protect sensitive data.&lt;/li&gt;
&lt;li&gt;  Auditability: Log API metadata to support investigation, traceability, and compliance review.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;6.2 Cost Structure and Optimization&lt;/p&gt;

&lt;p&gt;Running a model such as DeepSeek-R1 on Bedrock may involve compute, storage, and data transfer costs.&lt;/p&gt;

&lt;p&gt;Optimization ideas include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Use Lambda@Edge where low-latency global access is needed.&lt;/li&gt;
&lt;li&gt;  Cache frequent requests to reduce unnecessary inference traffic.&lt;/li&gt;
&lt;li&gt;  Review utilization regularly and adjust Reserved Instances or Savings Plans where applicable.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Troubleshooting&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Symptom Possible Cause  Recommended Action&lt;br&gt;
503 Service Unavailable Capacity overload   Increase &lt;code&gt;max_worker_count&lt;/code&gt; or enable auto scaling&lt;br&gt;
Garbled model output    Encoding mismatch   Verify that &lt;code&gt;Content-Type&lt;/code&gt; is &lt;code&gt;application/json&lt;/code&gt;&lt;br&gt;
Unstable latency    Network jitter  Consider AWS Direct Connect or review the network path&lt;br&gt;
Access Denied   Missing IAM permissions Check whether the IAM role includes &lt;code&gt;AmazonBedrockFullAccess&lt;/code&gt; or an equivalent custom policy&lt;/p&gt;

&lt;p&gt;By following the practices outlined above, teams can deploy AI capabilities on Amazon Bedrock in a way that is efficient, secure, and scalable, while accelerating integration into real business applications.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>aws</category>
      <category>llm</category>
    </item>
    <item>
      <title>The end of hardcoded model prompts: Building agents that discover their their own infrastructure</title>
      <dc:creator>Renato Marinho</dc:creator>
      <pubDate>Tue, 30 Jun 2026 11:16:48 +0000</pubDate>
      <link>https://dev.to/renato_marinho/the-end-of-hardcoded-model-prompts-building-agents-that-discover-their-their-own-infrastructure-42ek</link>
      <guid>https://dev.to/renato_marinho/the-end-of-hardcoded-model-prompts-building-agents-that-discover-their-their-own-infrastructure-42ek</guid>
      <description>&lt;p&gt;I was reading a thread recently about how MCP servers are burning 50k+ tokens before a user even types a single word, and it hit home. We're all obsessed with the 'intelligence' of these models, but we're ignoring the massive architectural debt we're creating by hardcoding tool definitions into our system prompts.&lt;/p&gt;

&lt;p&gt;If you've ever spent a Tuesday night debugging why an agent failed because a provider updated their model version or renamed an endpoint in their SDK, you know exactly what I'm talking about. We treat LLM capabilities like static constants, but the reality of modern inference—especially when dealing with something as dynamic as NVIDIA's Cloud Engine—is that the infrastructure is constantly shifting.&lt;/p&gt;

&lt;p&gt;This is why I think the industry needs to stop focusing on 'prompt engineering' and start focusing on 'discovery-driven architecture.'&lt;/p&gt;

&lt;p&gt;I've been playing with the &lt;a href="https://vinkius.com/mcp/nvidia-api-catalog" rel="noopener noreferrer"&gt;NVIDIA API Catalog MCP&lt;/a&gt; lately, and it highlights exactly where we're going. Instead of telling an agent, "You have access to Llama3," you give the agent a tool that lets it ask, "What is actually available in the NVIDIA matrix right now?"&lt;/p&gt;

&lt;h3&gt;
  
  
  The Death of the Static System Prompt
&lt;/h3&gt;

&lt;p&gt;Most developers approach MCP development by defining every possible tool in the JSON schema. It works fine for a demo. In production, it's a nightmare. You end up with massive context windows filled with documentation for models that might not even be active in your current region or quota tier.&lt;/p&gt;

&lt;p&gt;When you use the NVIDIA API Catalog via Vinkius, the paradigm shifts. The existence of &lt;code&gt;nvidia_list_foundation_models&lt;/code&gt; changes everything. An intelligent agent shouldn't start its loop by trying to guess which model is best; it should start by querying the catalog. By calling that tool, the agent gets a real-time dump of accessible paths. It sees exactly what NVIDIA has deployed—whether it's Nemotron or Llama3—and adjusts its subsequent &lt;code&gt;nvidia_chat_command&lt;/code&gt; calls based on actual availability.&lt;/p&gt;

&lt;p&gt;This isn't just about convenience; it's about preventing the exact token bloat that everyone is complaining about right now. If the agent discovers what's available via a tool call, you don't need to list every possible model configuration in your system instructions. You only pay for the context of the models currently active.&lt;/p&gt;

&lt;h3&gt;
  
  
  Managing the 'Runaway Agent' Problem
&lt;/h3&gt;

&lt;p&gt;One of the biggest fears I hear from CTOs when they look at agentic workflows is: "How do I stop this thing from burning my entire NVIDIA credit quota in twenty minutes?"&lt;/p&gt;

&lt;p&gt;If you're building a direct integration, you're likely manually tracking usage or setting hard limits in your orchestrator. It's clunky and usually reactive (meaning you find out about the bill after it arrives). The NVIDIA Catalog setup allows for a much more proactive approach using &lt;code&gt;nvidia_check_token_quota&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can instruct your agent to check its own constraints before initiating heavy inference tasks. If the quota is low, the agent can decide to switch from a massive instruction-heavy model to something smaller or simply pause and alert a human. It moves the governance from the 'policeman' (the orchestrator) into the 'worker' (the agent).&lt;/p&gt;

&lt;p&gt;This is exactly why we built Vinkius with an emphasis on production-grade execution. When you connect this MCP, it’s not just about passing through an API key. We run every execution in isolated V8 sandboxes with strict governance policies—DLP, SSRF prevention, and HMAC audit chains. Because when you give an agent the power to trigger &lt;code&gt;nvidia_chat_completion&lt;/code&gt; or process vision tasks via &lt;code&gt;nvidia_vision_inference&lt;/code&gt;, you're essentially giving it a credit card linked to your infrastructure. You can't treat that connection as a simple webhook.&lt;/p&gt;

&lt;h3&gt;
  
  
  Beyond Text: The Multimodal Pipeline
&lt;/h3&gt;

&lt;p&gt;What most people miss when they look at these MCPs is the depth of the utility beyond just chat completions. If you're working on RAG (Retrieval-Augmented Generation), you aren't just looking for text; you're looking for vectors.&lt;/p&gt;

&lt;p&gt;The ability to use &lt;code&gt;nvidia_generate_embeddings&lt;/code&gt; directly within the agentic loop means your agent can handle its own vectorization needs without needing a separate, hardcoded pipeline. It can take unstructured data, pass it through the NVIDIA proxy, and get back the numerical arrays needed for semantic search.&lt;/p&gt;

&lt;p&gt;Then you have tools like &lt;code&gt;nvidia_summarize_content&lt;/code&gt; or even vision-based inference. When an agent can pivot from reading text to analyzing graphical data via &lt;code&gt;nvidia_vision_inference&lt;/code&gt;, and then immediately check if there are any fine-tuned overrides available through &lt;code&gt;nvidia_list_lora_adapters&lt;/code&gt;, you're no longer building a chatbot. You're building a self-configuring compute engine.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Reality Check
&lt;/h3&gt;

&lt;p&gt;I am not saying this fixes everything. If you're running local Docker metrics and need absolute control over every micro-latency, you shouldn't be using a cloud proxy; you should be looking at &lt;code&gt;nvidia-nim-mcp&lt;/code&gt; for local boundaries. This catalog is for the engineers who want to leverage NVIDIA's massive compute matrix without building the entire plumbing themselves.&lt;/p&gt;

&lt;p&gt;But if your goal is to deploy an agent that actually works in the real world—where models change, quotas fluctuate, and security cannot be a secondary thought—then you need to stop hardcoding. You need tools that provide discovery, not just execution.&lt;/p&gt;

&lt;p&gt;If you want to see how this looks in practice without dealing with the headache of configuring OAuth callbacks or managing environment variables for every single provider, check it out on Vinkius. It's three steps: subscribe, grab your token, and paste it into Claude or Cursor. No friction, just execution.&lt;/p&gt;

&lt;p&gt;I've seen enough broken integrations to know that if a developer hits a configuration wall in the first five minutes, they're gone. We built this so you can focus on the logic, not the plumbing.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;MCPs are the music of AI Agents. We built the catalog. Discover &lt;a href="https://vinkius.com" rel="noopener noreferrer"&gt;Vinkius MCP Catalog&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>llm</category>
      <category>nvidia</category>
    </item>
  </channel>
</rss>
