{"id":1065,"date":"2026-06-15T12:00:00","date_gmt":"2026-06-15T12:00:00","guid":{"rendered":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/"},"modified":"2026-06-16T06:59:43","modified_gmt":"2026-06-16T06:59:43","slug":"ai-agent-tool-design-what-works-and-what-doesnt","status":"publish","type":"post","link":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/","title":{"rendered":"AI Agent Device Design: What Works and What Does not"},"content":{"rendered":"<p><br \/>\n<\/p>\n<div id=\"\">\n<p>On this article, you&#8217;ll find out how software design \u2014 not mannequin functionality \u2014 is the foundation explanation for most AI agent failures, and what concrete design patterns you&#8217;ll be able to apply to repair it.<\/p>\n<p>Matters we&#8217;ll cowl embody:<\/p>\n<p>Device design practices that enhance agent reliability, together with single-responsibility instruments, tight schemas, and structured error returns.<br \/>\nWidespread failure modes akin to unfiltered API publicity, silent partial success, and overlapping software names that break real-world workloads.<br \/>\nSchema and error dealing with patterns that cut back hallucination and unreliable conduct on the software boundary.<\/p>\n<p>Let\u2019s get into it.<\/p>\n<div style=\"width: 810px\" class=\"wp-caption aligncenter\"><img fetchpriority=\"high\" decoding=\"async\" src=\"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/mlm-agent-tool-design.png\" alt=\"AI Agent Tool Design: What Works and What Doesn't\" width=\"800\" height=\"706\"\/><\/p>\n<p class=\"wp-caption-text\">AI Agent Device Design: What Works and What Doesn\u2019t<\/p>\n<\/div>\n<h2>Introduction<\/h2>\n<p>Most AI agent failures appear like mannequin errors: selecting the incorrect software, passing dangerous arguments, or mishandling errors. However in follow, the mannequin is normally working with the interface it was given. The underlying situation is usually the software design itself.<\/p>\n<p>A mannequin can solely purpose from the knowledge uncovered by the software interface: the software title, its description, the parameter schema, and the parameter descriptions. These particulars form how the mannequin interprets intent, plans actions, and executes duties. When the software design is unclear, incomplete, or loosely structured, failures turn into predictable relatively than unintended.<\/p>\n<p>Issues like imprecise naming, ambiguous directions, inconsistent schemas, weak parameter definitions, and poor error dealing with all improve the chance of failures. Stronger fashions can cut back some errors, however they can not reliably compensate for a flawed interface. This text covers:<\/p>\n<p>Device design practices that enhance reliability<br \/>\nFailure modes that look wonderful in demos however break underneath actual workloads<br \/>\nSchema and error design that reduces hallucination on the software boundary<\/p>\n<p>Every sample is paired with its failure counterpart, as a result of understanding why a design fails is as essential as realizing what to interchange it with.<\/p>\n<h2>What Works in AI Agent Device Design<\/h2>\n<h3>1. One Device, One Accountability<\/h3>\n<p>In most agent techniques, a software ought to characterize a single, clear operation. When one software handles a number of behaviors by an motion parameter, the mannequin should first work out which mode to invoke earlier than it may possibly resolve the precise process.<\/p>\n<p>The distinction turns into clearer when evaluating a multi-action software towards devoted single-purpose instruments:<\/p>\n<div id=\"urvanov-syntax-highlighter-6a309df356de9508871030\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-monaco urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" touchscreen minimize scroll-mouseover disable-anim\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<p>\n# Keep away from: action-based multi-behavior software&#13;<br \/>\n@software&#13;<br \/>\ndef manage_customer(&#13;<br \/>\n    motion: str,&#13;<br \/>\n    customer_id: str | None = None,&#13;<br \/>\n    knowledge: dict | None = None&#13;<br \/>\n):&#13;<br \/>\n    &#8220;&#8221;&#8221;&#13;<br \/>\n    motion: create | get | replace | delete | droop&#13;<br \/>\n    &#8220;&#8221;&#8221;&#13;<br \/>\n    &#8230;&#13;<br \/>\n&#13;<br \/>\n# Desire: single-responsibility instruments&#13;<br \/>\n@software&#13;<br \/>\ndef create_customer(knowledge: CustomerInput) -&gt; Buyer:&#13;<br \/>\n    &#8220;&#8221;&#8221;Create a brand new buyer file.&#8221;&#8221;&#8221;&#13;<br \/>\n    &#8230;&#13;<br \/>\n&#13;<br \/>\n@software&#13;<br \/>\ndef get_customer(customer_id: str) -&gt; Buyer:&#13;<br \/>\n    &#8220;&#8221;&#8221;Retrieve a buyer by ID.&#8221;&#8221;&#8221;&#13;<br \/>\n    &#8230;&#13;<br \/>\n&#13;<br \/>\n@software&#13;<br \/>\ndef suspend_customer(customer_id: str, purpose: str) -&gt; SuspensionResult:&#13;<br \/>\n    &#8220;&#8221;&#8221;Droop a buyer account.&#8221;&#8221;&#8221;&#13;<br \/>\n    &#8230;<\/p>\n<div class=\"urvanov-syntax-highlighter-main\" style=\"\">\n<div class=\"urvanov-syntax-highlighter-nums-content\" style=\"font-size: 12px !important; line-height: 15px !important;\">\n<p>1<\/p>\n<p>2<\/p>\n<p>3<\/p>\n<p>4<\/p>\n<p>5<\/p>\n<p>6<\/p>\n<p>7<\/p>\n<p>8<\/p>\n<p>9<\/p>\n<p>10<\/p>\n<p>11<\/p>\n<p>12<\/p>\n<p>13<\/p>\n<p>14<\/p>\n<p>15<\/p>\n<p>16<\/p>\n<p>17<\/p>\n<p>18<\/p>\n<p>19<\/p>\n<p>20<\/p>\n<p>21<\/p>\n<p>22<\/p>\n<p>23<\/p>\n<p>24<\/p>\n<p>25<\/p>\n<p>26<\/p>\n<p>27<\/p>\n<\/div>\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<p><span class=\"crayon-p\"># Keep away from: action-based multi-behavior software<\/span><\/p>\n<p><span class=\"crayon-sy\">@<\/span><span class=\"crayon-e\">software<\/span><\/p>\n<p><span class=\"crayon-e\">def <\/span><span class=\"crayon-e\">manage_customer<\/span><span class=\"crayon-sy\">(<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">motion<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">customer_id<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">|<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">None<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">None<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">knowledge<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">dict<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">|<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">None<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-i\">None<\/span><\/p>\n<p><span class=\"crayon-sy\">)<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-s\">&#8220;<\/span><\/p>\n<p><span class=\"crayon-s\">\u00a0\u00a0\u00a0\u00a0motion: create | get | replace | delete | droop<\/span><\/p>\n<p><span class=\"crayon-s\">\u00a0\u00a0\u00a0\u00a0&#8220;<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-sy\">.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-p\"># Desire: single-responsibility instruments<\/span><\/p>\n<p><span class=\"crayon-sy\">@<\/span><span class=\"crayon-e\">software<\/span><\/p>\n<p><span class=\"crayon-e\">def <\/span><span class=\"crayon-e\">create_customer<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">knowledge<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">CustomerInput<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">-&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">Buyer<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-s\">&#8220;Create a brand new buyer file.&#8221;<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-sy\">.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-sy\">@<\/span><span class=\"crayon-e\">software<\/span><\/p>\n<p><span class=\"crayon-e\">def <\/span><span class=\"crayon-e\">get_customer<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">customer_id<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">-&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">Buyer<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-s\">&#8220;Retrieve a buyer by ID.&#8221;<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-sy\">.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-sy\">@<\/span><span class=\"crayon-e\">software<\/span><\/p>\n<p><span class=\"crayon-e\">def <\/span><span class=\"crayon-e\">suspend_customer<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">customer_id<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">purpose<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">-&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">SuspensionResult<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-s\">&#8220;Droop a buyer account.&#8221;<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-sy\">.<\/span><\/p>\n<\/div><\/div><\/div>\n<div style=\"width: 810px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" src=\"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/srp-tool-design.png\" alt=\"One Tool, One Responsibility\" width=\"800\" height=\"706\"\/><\/p>\n<p class=\"wp-caption-text\">One Device, One Accountability<\/p>\n<\/div>\n<p>Single-responsibility instruments give the mannequin an unambiguous operate and offer you cleaner error dealing with and simpler observability.<\/p>\n<p>\u26a0\ufe0f Be aware: It is a helpful default relatively than a common rule. Some domains \u2014 akin to shell, filesystem, browser, or calendar instruments \u2014 could profit from a constrained multi-action interface as a result of the motion area itself is a part of the underlying abstraction.<\/p>\n<h3>2. Schemas That Make Invalid States Inconceivable<\/h3>\n<p>In tool-calling brokers, the mannequin constructs software name arguments by reasoning out of your schema.<\/p>\n<p>A free schema means the mannequin guesses at constraints.<br \/>\nA decent schema encodes these constraints so no guessing is required.<\/p>\n<p>Right here\u2019s an instance:<\/p>\n<div id=\"urvanov-syntax-highlighter-6a309df356df6342304735\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-monaco urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" touchscreen minimize scroll-mouseover disable-anim\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<p>\nfrom pydantic import BaseModel, Discipline&#13;<br \/>\nfrom enum import Enum&#13;<br \/>\n&#13;<br \/>\nclass Precedence(str, Enum):&#13;<br \/>\n    LOW = &#8220;low&#8221;&#13;<br \/>\n    MEDIUM = &#8220;medium&#8221;&#13;<br \/>\n    HIGH = &#8220;excessive&#8221;&#13;<br \/>\n&#13;<br \/>\nclass CreateTaskInput(BaseModel):&#13;<br \/>\n    title: str = Discipline(&#13;<br \/>\n        description=&#8221;Brief, actionable process title. Use crucial type: &#8216;Overview PR&#8217;, not &#8216;PR Overview&#8217;.&#8221;,&#13;<br \/>\n        min_length=5,&#13;<br \/>\n        max_length=100&#13;<br \/>\n    )&#13;<br \/>\n    precedence: Precedence = Discipline(&#13;<br \/>\n        description=&#8221;Activity precedence. Use HIGH just for blockers affecting different work.&#8221;,&#13;<br \/>\n        default=Precedence.MEDIUM&#13;<br \/>\n    )&#13;<br \/>\n    due_date: str = Discipline(&#13;<br \/>\n        description=&#8221;Due date in ISO 8601 format: YYYY-MM-DD. Have to be a future date.&#8221;,&#13;<br \/>\n        sample=r&#8221;^d{4}-d{2}-d{2}$&#8221;&#13;<br \/>\n    )<\/p>\n<div class=\"urvanov-syntax-highlighter-main\" style=\"\">\n<div class=\"urvanov-syntax-highlighter-nums-content\" style=\"font-size: 12px !important; line-height: 15px !important;\">\n<p>1<\/p>\n<p>2<\/p>\n<p>3<\/p>\n<p>4<\/p>\n<p>5<\/p>\n<p>6<\/p>\n<p>7<\/p>\n<p>8<\/p>\n<p>9<\/p>\n<p>10<\/p>\n<p>11<\/p>\n<p>12<\/p>\n<p>13<\/p>\n<p>14<\/p>\n<p>15<\/p>\n<p>16<\/p>\n<p>17<\/p>\n<p>18<\/p>\n<p>19<\/p>\n<p>20<\/p>\n<p>21<\/p>\n<p>22<\/p>\n<\/div>\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<p><span class=\"crayon-e\">from <\/span><span class=\"crayon-e\">pydantic <\/span><span class=\"crayon-e\">import <\/span><span class=\"crayon-v\">BaseModel<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">Discipline<\/span><\/p>\n<p><span class=\"crayon-e\">from <\/span><span class=\"crayon-t\">enum<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">import <\/span><span class=\"crayon-t\">Enum<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-t\">class<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">Precedence<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-t\">Enum<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">LOW<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;low&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">MEDIUM<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;medium&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">HIGH<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;excessive&#8221;<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-t\">class<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">CreateTaskInput<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">BaseModel<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">title<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">Discipline<\/span><span class=\"crayon-sy\">(<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">description<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;Brief, actionable process title. Use crucial type: &#8216;Overview PR&#8217;, not &#8216;PR Overview&#8217;.&#8221;<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">min_length<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-cn\">5<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">max_length<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-cn\">100<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">precedence<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">Precedence<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">Discipline<\/span><span class=\"crayon-sy\">(<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">description<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;Activity precedence. Use HIGH just for blockers affecting different work.&#8221;<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">default<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-v\">Precedence<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-i\">MEDIUM<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">due_date<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">Discipline<\/span><span class=\"crayon-sy\">(<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">description<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;Due date in ISO 8601 format: YYYY-MM-DD. Have to be a future date.&#8221;<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">sample<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-i\">r<\/span><span class=\"crayon-s\">&#8220;^d{4}-d{2}-d{2}$&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<\/div><\/div><\/div>\n<p>Enums are notably helpful for fields with a small set of legitimate values as a result of they remove a category of plausible-but-invalid outputs. Validation failures floor on the software boundary relatively than as cryptic downstream errors.<\/p>\n<h3>3. Descriptions That Outline Scope, Not Simply Goal<\/h3>\n<p>Device descriptions are model-facing documentation. They should do two issues: clarify when to make use of the software, and clarify when to not. Most descriptions solely do the primary.<\/p>\n<div id=\"urvanov-syntax-highlighter-6a309df356e00852334959\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-monaco urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" touchscreen minimize scroll-mouseover disable-anim\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<p>\n# Weak: explains what it does, not when to not use it&#13;<br \/>\n&#8220;&#8221;&#8221;Seek for paperwork within the information base.&#8221;&#8221;&#8221;&#13;<br \/>\n&#13;<br \/>\n# Robust: defines function, scope, and limits&#13;<br \/>\n&#8220;&#8221;&#8221;&#13;<br \/>\nSearch the interior information base for paperwork, insurance policies, and reference materials.&#13;<br \/>\nUse this when the consumer asks about firm procedures, product specs, or documented workflows.&#13;<br \/>\nDo NOT use this for real-time knowledge (costs, availability, present standing) \u2014 use get_live_data() as an alternative.&#13;<br \/>\nReturns as much as 5 outcomes ranked by relevance. If no outcomes are returned, the knowledge is just not within the information base.&#13;<br \/>\n&#8220;&#8221;&#8221;<\/p>\n<div class=\"urvanov-syntax-highlighter-main\" style=\"\">\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<p><span class=\"crayon-p\"># Weak: explains what it does, not when to not use it<\/span><\/p>\n<p><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-s\">&#8220;Seek for paperwork within the information base.&#8221;<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-p\"># Robust: defines function, scope, and limits<\/span><\/p>\n<p><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-s\">&#8220;<\/span><\/p>\n<p><span class=\"crayon-s\">Search the interior information base for paperwork, insurance policies, and reference materials.<\/span><\/p>\n<p><span class=\"crayon-s\">Use this when the consumer asks about firm procedures, product specs, or documented workflows.<\/span><\/p>\n<p><span class=\"crayon-s\">Do NOT use this for real-time knowledge (costs, availability, present standing) \u2014 use get_live_data() as an alternative.<\/span><\/p>\n<p><span class=\"crayon-s\">Returns as much as 5 outcomes ranked by relevance. If no outcomes are returned, the knowledge is just not within the information base.<\/span><\/p>\n<p><span class=\"crayon-s\">&#8220;<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><\/p>\n<\/div><\/div><\/div>\n<p>With out the disambiguation, the mannequin infers scope from the software title alone, which is usually a dependable supply of choice errors at scale. A superb software definition consists of clear boundaries from different instruments, not simply utilization directions.<\/p>\n<h3>4. Structured, Actionable Error Returns<\/h3>\n<p>When a software fails, the mannequin reads the error and decides what to do subsequent. An unhandled exception or stack hint produces noise-driven follow-up conduct. A structured error provides the mannequin one thing to department on.<\/p>\n<p>Structured errors shouldn&#8217;t solely report what failed but additionally assist the agent determine what to do subsequent. A superb error format makes retry conduct express and provides the mannequin a transparent restoration path:<\/p>\n<div id=\"urvanov-syntax-highlighter-6a309df356e04593069694\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-monaco urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" touchscreen minimize scroll-mouseover disable-anim\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<p>\nclass ToolError(BaseModel):&#13;<br \/>\n    error_code: str       # machine-readable, for the mannequin to department on&#13;<br \/>\n    message: str          # human-readable description&#13;<br \/>\n    recoverable: bool     # can the agent retry?&#13;<br \/>\n    suggested_action: str # what the agent ought to do subsequent&#13;<br \/>\n&#13;<br \/>\n# Report not discovered: retryable&#13;<br \/>\nreturn ToolError(&#13;<br \/>\n    error_code=&#8221;RECORD_NOT_FOUND&#8221;,&#13;<br \/>\n    message=&#8221;No consumer file discovered with ID &#8216;usr_123&#8217;.&#8221;,&#13;<br \/>\n    recoverable=True,&#13;<br \/>\n    suggested_action=&#8221;Use list_users() to get legitimate consumer IDs earlier than calling get_user().&#8221;&#13;<br \/>\n)&#13;<br \/>\n&#13;<br \/>\n# Quota exceeded: not retryable&#13;<br \/>\nreturn ToolError(&#13;<br \/>\n    error_code=&#8221;QUOTA_EXCEEDED&#8221;,&#13;<br \/>\n    message=&#8221;API quota for this software has been reached for at this time.&#8221;,&#13;<br \/>\n    recoverable=False,&#13;<br \/>\n    suggested_action=&#8221;Notify the consumer and cease. Don&#8217;t retry this software at this time.&#8221;&#13;<br \/>\n)<\/p>\n<div class=\"urvanov-syntax-highlighter-main\" style=\"\">\n<div class=\"urvanov-syntax-highlighter-nums-content\" style=\"font-size: 12px !important; line-height: 15px !important;\">\n<p>1<\/p>\n<p>2<\/p>\n<p>3<\/p>\n<p>4<\/p>\n<p>5<\/p>\n<p>6<\/p>\n<p>7<\/p>\n<p>8<\/p>\n<p>9<\/p>\n<p>10<\/p>\n<p>11<\/p>\n<p>12<\/p>\n<p>13<\/p>\n<p>14<\/p>\n<p>15<\/p>\n<p>16<\/p>\n<p>17<\/p>\n<p>18<\/p>\n<p>19<\/p>\n<p>20<\/p>\n<p>21<\/p>\n<\/div>\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<p><span class=\"crayon-t\">class<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">ToolError<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">BaseModel<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">error_code<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-i\">str<\/span><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 <\/span><span class=\"crayon-p\"># machine-readable, for the mannequin to department on<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">message<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-i\">str<\/span><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-p\"># human-readable description<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">recoverable<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-t\">bool<\/span><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0 <\/span><span class=\"crayon-p\"># can the agent retry?<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">suggested_action<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-i\">str<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-p\"># what the agent ought to do subsequent<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-p\"># Report not discovered: retryable<\/span><\/p>\n<p><span class=\"crayon-st\">return<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">ToolError<\/span><span class=\"crayon-sy\">(<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">error_code<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;RECORD_NOT_FOUND&#8221;<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">message<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;No consumer file discovered with ID &#8216;usr_123&#8217;.&#8221;<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">recoverable<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-t\">True<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">suggested_action<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;Use list_users() to get legitimate consumer IDs earlier than calling get_user().&#8221;<\/span><\/p>\n<p><span class=\"crayon-sy\">)<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-p\"># Quota exceeded: not retryable<\/span><\/p>\n<p><span class=\"crayon-st\">return<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">ToolError<\/span><span class=\"crayon-sy\">(<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">error_code<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;QUOTA_EXCEEDED&#8221;<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">message<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;API quota for this software has been reached for at this time.&#8221;<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">recoverable<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-t\">False<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">suggested_action<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;Notify the consumer and cease. Don&#8217;t retry this software at this time.&#8221;<\/span><\/p>\n<p><span class=\"crayon-sy\">)<\/span><\/p>\n<\/div><\/div><\/div>\n<p>The recoverable flag and suggested_action subject are what change agent conduct. With out them, fashions retry non-retryable errors or abandon recoverable ones.<\/p>\n<h3>5. Idempotent State-Altering Operations<\/h3>\n<p>Each software that mutates state \u2014 creates a file, sends a message, transfers funds \u2014 should be protected to name twice. In follow, brokers retry, networks fail, and the LLM loop could situation a second name as a result of affirmation of the primary by no means arrived.<\/p>\n<p>A easy solution to forestall duplicate unwanted effects is to require an idempotency key for each write operation:<\/p>\n<div id=\"urvanov-syntax-highlighter-6a309df356e09593523935\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-monaco urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" touchscreen minimize scroll-mouseover disable-anim\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<p>\n@software&#13;<br \/>\ndef send_email(&#13;<br \/>\n    to: str,&#13;<br \/>\n    topic: str,&#13;<br \/>\n    physique: str,&#13;<br \/>\n    idempotency_key: str = Discipline(&#13;<br \/>\n        description=&#8221;Distinctive key for this ship operation. Use a hash of recipient + topic + timestamp. &#8220;&#13;<br \/>\n                    &#8220;Similar key on retry returns the unique end result with out re-sending.&#8221;&#13;<br \/>\n    )&#13;<br \/>\n) -&gt; dict:&#13;<br \/>\n    &#8220;&#8221;&#8221;Ship an e mail. Idempotent: the identical idempotency_key is not going to set off a second ship.&#8221;&#8221;&#8221;&#13;<br \/>\n    current = idempotency_store.get(idempotency_key)&#13;<br \/>\n    if current:&#13;<br \/>\n        return current&#13;<br \/>\n    end result = email_service.ship(to=to, topic=topic, physique=physique)&#13;<br \/>\n    idempotency_store.set(idempotency_key, end result, ttl=86400)&#13;<br \/>\n    return end result<\/p>\n<div class=\"urvanov-syntax-highlighter-main\" style=\"\">\n<div class=\"urvanov-syntax-highlighter-nums-content\" style=\"font-size: 12px !important; line-height: 15px !important;\">\n<p>1<\/p>\n<p>2<\/p>\n<p>3<\/p>\n<p>4<\/p>\n<p>5<\/p>\n<p>6<\/p>\n<p>7<\/p>\n<p>8<\/p>\n<p>9<\/p>\n<p>10<\/p>\n<p>11<\/p>\n<p>12<\/p>\n<p>13<\/p>\n<p>14<\/p>\n<p>15<\/p>\n<p>16<\/p>\n<p>17<\/p>\n<\/div>\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<p><span class=\"crayon-sy\">@<\/span><span class=\"crayon-e\">software<\/span><\/p>\n<p><span class=\"crayon-e\">def <\/span><span class=\"crayon-e\">send_email<\/span><span class=\"crayon-sy\">(<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">to<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">topic<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">physique<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">idempotency_key<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">Discipline<\/span><span class=\"crayon-sy\">(<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">description<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-s\">&#8220;Distinctive key for this ship operation. Use a hash of recipient + topic + timestamp. &#8220;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;Similar key on retry returns the unique end result with out re-sending.&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">-&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">dict<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-s\">&#8220;Ship an e mail. Idempotent: the identical idempotency_key is not going to set off a second ship.&#8221;<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">current<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">idempotency_store<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">get<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">idempotency_key<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">if<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">current<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">return<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">current<\/span><\/p>\n<p><span class=\"crayon-e\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">end result<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">email_service<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">ship<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-st\">to<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-st\">to<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">topic<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-v\">topic<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">physique<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-v\">physique<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">idempotency_store<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">set<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">idempotency_key<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">end result<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">ttl<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-cn\">86400<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">return<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">end result<\/span><\/p>\n<\/div><\/div><\/div>\n<p>With out idempotency ensures, transient failures can simply flip into duplicate actions.<\/p>\n<h2>What Doesn\u2019t Work in AI Agent Device Design<\/h2>\n<h3>1. Skinny Wrappers Round Unfiltered APIs<\/h3>\n<p>Pointing an agent at a REST API and surfacing it as a software is the most typical shortcut and the most typical supply of manufacturing failures. APIs constructed for builders typically expose way more element than brokers really want. Responses come full of lots of of fields, even when solely a handful are related. They depend on pagination, use opaque inside IDs with little contextual which means, and return error codes that require deep area information to interpret.<\/p>\n<p>A purpose-built wrapper handles pagination internally, initiatives solely the fields the agent wants, and maps API errors to the structured ToolError format mentioned above. The agent by no means constructs API paths or manages pages; it receives typed objects it may possibly purpose about.<\/p>\n<p>That stated, over-wrapping may also be dangerous. If each endpoint turns into a separate, narrowly outlined software with no shared construction, the software floor can turn into fragmented and tougher for the mannequin to navigate. The purpose is just not maximal abstraction, however a constant, agent-friendly abstraction layer.<\/p>\n<h3>2. Loading All Instruments Into Each Context<\/h3>\n<p>Accuracy degrades because the software catalog grows. LongFuncEval, a 2025 examine on tool-calling efficiency throughout lengthy contexts, discovered efficiency drops considerably because the software catalog measurement elevated \u2014 even in fashions with 128K context home windows. Loading each software into each system immediate compounds this by consuming token price range earlier than any process content material is processed.<\/p>\n<p>Dynamic software loading addresses each issues. Decide which instruments are related to the present step and embody solely these:<\/p>\n<div id=\"urvanov-syntax-highlighter-6a309df356e11657063095\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-monaco urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" touchscreen minimize scroll-mouseover disable-anim\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<p>\nSTEP_TOOL_MAP = {&#13;<br \/>\n    &#8220;analysis&#8221;: [&#8220;search_documents&#8221;, &#8220;search_web&#8221;, &#8220;get_url_content&#8221;],&#13;<br \/>\n    &#8220;write&#8221;:    [&#8220;create_document&#8221;, &#8220;update_document&#8221;, &#8220;format_text&#8221;],&#13;<br \/>\n    &#8220;ship&#8221;:     [&#8220;send_email&#8221;, &#8220;post_to_slack&#8221;, &#8220;create_calendar_event&#8221;],&#13;<br \/>\n}&#13;<br \/>\n&#13;<br \/>\ndef get_tools_for_step(step_type: str, available_tools: record) -&gt; record:&#13;<br \/>\n    relevant_names = STEP_TOOL_MAP.get(step_type, [])&#13;<br \/>\n    return [t for t in available_tools if t.name in relevant_names]<\/p>\n<div class=\"urvanov-syntax-highlighter-main\" style=\"\">\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<p><span class=\"crayon-v\">STEP_TOOL_MAP<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">{<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;analysis&#8221;<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-s\">&#8220;search_documents&#8221;<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;search_web&#8221;<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;get_url_content&#8221;<\/span><span class=\"crayon-sy\">]<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;write&#8221;<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-s\">&#8220;create_document&#8221;<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;update_document&#8221;<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;format_text&#8221;<\/span><span class=\"crayon-sy\">]<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;ship&#8221;<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0 <\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-s\">&#8220;send_email&#8221;<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;post_to_slack&#8221;<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;create_calendar_event&#8221;<\/span><span class=\"crayon-sy\">]<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-sy\">}<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-e\">def <\/span><span class=\"crayon-e\">get_tools_for_step<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">step_type<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">available_tools<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">record<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">-&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">record<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">relevant_names<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">STEP_TOOL_MAP<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">get<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">step_type<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-sy\">]<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">return<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-i\">t<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-st\">for<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-i\">t<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-st\">in<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">available_tools <\/span><span class=\"crayon-st\">if<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">t<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">name <\/span><span class=\"crayon-st\">in<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">relevant_names<\/span><span class=\"crayon-sy\">]<\/span><\/p>\n<\/div><\/div><\/div>\n<div style=\"width: 810px\" class=\"wp-caption aligncenter\"><img decoding=\"async\" src=\"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/dynamic-tool-loading.png\" alt=\"Dynamic Tool Loading\" width=\"800\" height=\"706\"\/><\/p>\n<p class=\"wp-caption-text\">Dynamic Device Loading<\/p>\n<\/div>\n<p>Exposing solely a small, related subset of instruments at every step \u2014 relatively than the complete toolset \u2014 usually improves choice accuracy and reduces per-call token value.<\/p>\n<h3>3. Silent Partial Success<\/h3>\n<p>Partial success turns into an issue when a software completes solely a part of the requested work however returns a response that appears totally profitable. The agent continues execution with an incomplete or deceptive view of the system state.<\/p>\n<p>This normally occurs when instruments suppress inside failures and return solely the profitable portion of the end result:<\/p>\n<div id=\"urvanov-syntax-highlighter-6a309df356e18101789179\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-monaco urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" touchscreen minimize scroll-mouseover disable-anim\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<p>\n# This model silently misleads the agent&#13;<br \/>\n@software&#13;<br \/>\ndef bulk_create_tasks(duties: record) -&gt; dict:&#13;<br \/>\n    created = []&#13;<br \/>\n    for process in duties:&#13;<br \/>\n        attempt:&#13;<br \/>\n            end result = task_api.create(process)&#13;<br \/>\n            created.append(end result.id)&#13;<br \/>\n        besides Exception:&#13;<br \/>\n            cross  # silent failure: that is the bug&#13;<br \/>\n    return {&#8220;created&#8221;: created}&#13;<br \/>\n&#13;<br \/>\n# This model makes partial success express&#13;<br \/>\n@software&#13;<br \/>\ndef bulk_create_tasks(duties: record) -&gt; BulkCreateResult:&#13;<br \/>\n    created, failed = [], []&#13;<br \/>\n    for process in duties:&#13;<br \/>\n        attempt:&#13;<br \/>\n            created.append(task_api.create(process).id)&#13;<br \/>\n        besides TaskCreationError as e:&#13;<br \/>\n            failed.append({&#8220;enter&#8221;: process.title, &#8220;purpose&#8221;: str(e)})&#13;<br \/>\n    return BulkCreateResult(&#13;<br \/>\n        created_ids=created,&#13;<br \/>\n        failed_items=failed,&#13;<br \/>\n        success=len(failed) == 0,&#13;<br \/>\n        partial_success=len(created) &gt; 0 and len(failed) &gt; 0&#13;<br \/>\n    )<\/p>\n<div class=\"urvanov-syntax-highlighter-main\" style=\"\">\n<div class=\"urvanov-syntax-highlighter-nums-content\" style=\"font-size: 12px !important; line-height: 15px !important;\">\n<p>1<\/p>\n<p>2<\/p>\n<p>3<\/p>\n<p>4<\/p>\n<p>5<\/p>\n<p>6<\/p>\n<p>7<\/p>\n<p>8<\/p>\n<p>9<\/p>\n<p>10<\/p>\n<p>11<\/p>\n<p>12<\/p>\n<p>13<\/p>\n<p>14<\/p>\n<p>15<\/p>\n<p>16<\/p>\n<p>17<\/p>\n<p>18<\/p>\n<p>19<\/p>\n<p>20<\/p>\n<p>21<\/p>\n<p>22<\/p>\n<p>23<\/p>\n<p>24<\/p>\n<p>25<\/p>\n<p>26<\/p>\n<p>27<\/p>\n<\/div>\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<p><span class=\"crayon-p\"># This model silently misleads the agent<\/span><\/p>\n<p><span class=\"crayon-sy\">@<\/span><span class=\"crayon-e\">software<\/span><\/p>\n<p><span class=\"crayon-e\">def <\/span><span class=\"crayon-e\">bulk_create_tasks<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">duties<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">record<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">-&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">dict<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">created<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-sy\">]<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">for<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">process <\/span><span class=\"crayon-st\">in<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">duties<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">attempt<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">end result<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">task_api<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">create<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">process<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">created<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">append<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">end result<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">id<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-e\">besides <\/span><span class=\"crayon-v\">Exception<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-i\">cross<\/span><span class=\"crayon-h\">\u00a0\u00a0<\/span><span class=\"crayon-p\"># silent failure: that is the bug<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">return<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">{<\/span><span class=\"crayon-s\">&#8220;created&#8221;<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">created<\/span><span class=\"crayon-sy\">}<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-p\"># This model makes partial success express<\/span><\/p>\n<p><span class=\"crayon-sy\">@<\/span><span class=\"crayon-e\">software<\/span><\/p>\n<p><span class=\"crayon-e\">def <\/span><span class=\"crayon-e\">bulk_create_tasks<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">duties<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">record<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">-&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">BulkCreateResult<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">created<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">failed<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-sy\">]<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-sy\">]<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">for<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">process <\/span><span class=\"crayon-st\">in<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">duties<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">attempt<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">created<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">append<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">task_api<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">create<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">process<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">id<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-e\">besides <\/span><span class=\"crayon-e\">TaskCreationError <\/span><span class=\"crayon-st\">as<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">e<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">failed<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">append<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-sy\">{<\/span><span class=\"crayon-s\">&#8220;enter&#8221;<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">process<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-v\">title<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;purpose&#8221;<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">str<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">e<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">}<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">return<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">BulkCreateResult<\/span><span class=\"crayon-sy\">(<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">created_ids<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-v\">created<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">failed_items<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-v\">failed<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">success<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-e\">len<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">failed<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">==<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-cn\">0<\/span><span class=\"crayon-sy\">,<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">partial_success<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-e\">len<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">created<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-cn\">0<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-st\">and<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">len<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">failed<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-cn\">0<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<\/div><\/div><\/div>\n<p>The partial_success flag provides the mannequin one thing to department on: retry the failed objects, floor the partial end result to the consumer, or halt the workflow.<\/p>\n<h3>4. Overlapping Device Names and Descriptions<\/h3>\n<p>When two instruments do related issues, the mannequin causes about which to make use of on each name. That reasoning prices tokens and introduces errors. Some frequent examples embody:<\/p>\n<p>search_documents and find_documents with an identical function<br \/>\nget_user and fetch_user_profile with unclear variations<br \/>\ncreate_task, add_task, and new_task as three instruments for one operation<\/p>\n<p>In such instances, renaming alone isn\u2019t the repair. Each software wants a function that may be described irrespective of different instruments within the set. If an outline requires \u201cin contrast to X, this one\u2026\u201d to make sense, that\u2019s a design downside. Device sprawl \u2014 too many instruments with overlapping scope \u2014 is a supply of unreliable agent conduct in enterprise deployments.<\/p>\n<h3>5. Damaging Actions With out a Affirmation Gate<\/h3>\n<p>Any software that takes an irreversible motion \u2014 deleting data, messaging actual customers, executing monetary transactions \u2014 wants a structural two-step affirmation, not an in-prompt \u201care you positive?\u201d A staged method introduces an express affirmation boundary that reduces the danger of unintended or unauthorized execution.<\/p>\n<p>The most secure sample is to separate staging from execution and require a short-lived affirmation token between the 2 steps:<\/p>\n<div id=\"urvanov-syntax-highlighter-6a309df356e21100326890\" class=\"urvanov-syntax-highlighter-syntax crayon-theme-classic urvanov-syntax-highlighter-font-monaco urvanov-syntax-highlighter-os-pc print-yes notranslate\" data-settings=\" touchscreen minimize scroll-mouseover disable-anim\" style=\" margin-top: 12px; margin-bottom: 12px; font-size: 12px !important; line-height: 15px !important;\">\n<p>\n@software&#13;<br \/>\ndef stage_deletion(record_ids: record[str], purpose: str) -&gt; StagedDeletion:&#13;<br \/>\n    &#8220;&#8221;&#8221;Stage data for deletion. Does NOT delete something.&#13;<br \/>\n    Returns a affirmation token that expires in 60 seconds.&#13;<br \/>\n    Name confirm_deletion() with this token to proceed.&#8221;&#8221;&#8221;&#13;<br \/>\n    token = generate_deletion_token(record_ids)&#13;<br \/>\n    staged_deletions[token] = {&#8220;ids&#8221;: record_ids, &#8220;expires&#8221;: now() + 60}&#13;<br \/>\n    return StagedDeletion(token=token, records_to_delete=len(record_ids), expires_in_seconds=60)&#13;<br \/>\n&#13;<br \/>\n@software&#13;<br \/>\ndef confirm_deletion(token: str) -&gt; DeletionResult:&#13;<br \/>\n    &#8220;&#8221;&#8221;Execute a staged deletion. IRREVERSIBLE. Affirm solely after express consumer approval.&#8221;&#8221;&#8221;&#13;<br \/>\n    staged = staged_deletions.get(token)&#13;<br \/>\n    if not staged or staged[&#8220;expires&#8221;] &lt; now():&#13;<br \/>\n        elevate ValueError(&#8220;Token invalid or expired. Stage the deletion once more.&#8221;)&#13;<br \/>\n    # proceed<\/p>\n<div class=\"urvanov-syntax-highlighter-main\" style=\"\">\n<div class=\"crayon-pre\" style=\"font-size: 12px !important; line-height: 15px !important; -moz-tab-size:4; -o-tab-size:4; -webkit-tab-size:4; tab-size:4;\">\n<p><span class=\"crayon-sy\">@<\/span><span class=\"crayon-e\">software<\/span><\/p>\n<p><span class=\"crayon-e\">def <\/span><span class=\"crayon-e\">stage_deletion<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">record_ids<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">record<\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">]<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">purpose<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">-&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">StagedDeletion<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-s\">&#8220;Stage data for deletion. Does NOT delete something.<\/span><\/p>\n<p><span class=\"crayon-s\">\u00a0\u00a0\u00a0\u00a0Returns a affirmation token that expires in 60 seconds.<\/span><\/p>\n<p><span class=\"crayon-s\">\u00a0\u00a0\u00a0\u00a0Name confirm_deletion() with this token to proceed.&#8221;<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">token<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">generate_deletion_token<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">record_ids<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">staged_deletions<\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-v\">token<\/span><span class=\"crayon-sy\">]<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-sy\">{<\/span><span class=\"crayon-s\">&#8220;ids&#8221;<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">record_ids<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-s\">&#8220;expires&#8221;<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">now<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">+<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-cn\">60<\/span><span class=\"crayon-sy\">}<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">return<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">StagedDeletion<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">token<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-v\">token<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">records_to_delete<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-e\">len<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">record_ids<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-sy\">,<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">expires_in_seconds<\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-cn\">60<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span class=\"crayon-sy\">@<\/span><span class=\"crayon-e\">software<\/span><\/p>\n<p><span class=\"crayon-e\">def <\/span><span class=\"crayon-e\">confirm_deletion<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">token<\/span><span class=\"crayon-o\">:<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">str<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">-&gt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">DeletionResult<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><span class=\"crayon-s\">&#8220;Execute a staged deletion. IRREVERSIBLE. Affirm solely after express consumer approval.&#8221;<\/span><span class=\"crayon-s\">&#8220;&#8221;<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-v\">staged<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">=<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">staged_deletions<\/span><span class=\"crayon-sy\">.<\/span><span class=\"crayon-e\">get<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-v\">token<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-st\">if<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-st\">not<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">staged <\/span><span class=\"crayon-st\">or<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-v\">staged<\/span><span class=\"crayon-sy\">[<\/span><span class=\"crayon-s\">&#8220;expires&#8221;<\/span><span class=\"crayon-sy\">]<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-o\">&lt;<\/span><span class=\"crayon-h\"> <\/span><span class=\"crayon-e\">now<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-sy\">)<\/span><span class=\"crayon-o\">:<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-e\">elevate <\/span><span class=\"crayon-e\">ValueError<\/span><span class=\"crayon-sy\">(<\/span><span class=\"crayon-s\">&#8220;Token invalid or expired. Stage the deletion once more.&#8221;<\/span><span class=\"crayon-sy\">)<\/span><\/p>\n<p><span class=\"crayon-h\">\u00a0\u00a0\u00a0\u00a0<\/span><span class=\"crayon-p\"># proceed<\/span><\/p>\n<\/div><\/div><\/div>\n<div style=\"width: 810px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/no-single-step-destruction.png\" alt=\"Destructive Actions Without a Confirmation Gate\" width=\"800\" height=\"706\"\/><\/p>\n<p class=\"wp-caption-text\">Damaging Actions With out a Affirmation Gate<\/p>\n<\/div>\n<p>Two distinct software calls imply the mannequin can not full a damaging operation in a single reasoning step, which is the purpose.<\/p>\n<p>\u26a0\ufe0f Be aware: Two-step security flows, nevertheless, are sometimes not ample on their very own in lots of techniques. Even when staging and affirmation are used, further safeguards \u2014 akin to short-lived, single-use tokens, strict session binding, and replay safety \u2014 are vital to stop token reuse, leakage, or cross-session execution that may bypass the meant security boundary.<\/p>\n<h2>AI Agent Device Design Selections at a Look<\/h2>\n<p>Each row represents a key resolution in AI agent software design:<\/p>\n<p>Design Space<br \/>\nWorks<br \/>\nDoesn\u2019t Work<\/p>\n<p>Device Scope<br \/>\nSingle accountability per software<br \/>\nMotion-parameter instruments like manage_database(motion=&#8221;create&#8221;)<\/p>\n<p>Schema<br \/>\nTight: enums, validators, typed fields<br \/>\nUnfastened: free strings, untyped dicts<\/p>\n<p>Descriptions<br \/>\nEmbody scope boundaries and when to not use<br \/>\nJoyful path solely<\/p>\n<p>Write Operations<br \/>\nIdempotent with idempotency keys<br \/>\nHearth-and-forget, no retry security<\/p>\n<p>Error Returns<br \/>\nStructured: error_code, recoverable, suggested_action<br \/>\nUnhandled exceptions or untyped strings<\/p>\n<p>Device Rely<br \/>\nDynamic loading per step<br \/>\nAll instruments in each context<\/p>\n<p>API Wrapping<br \/>\nGoal-built wrapper with agent-facing schema<br \/>\nUnfiltered API publicity<\/p>\n<p>Partial Success<br \/>\nSpecific partial_success subject in return<br \/>\nSilent exception swallowing<\/p>\n<p>Damaging Actions<br \/>\nTwo-step staging + affirmation<br \/>\nSingle-call delete\/ship\/execute<\/p>\n<p>Device Overlap<br \/>\nSemantically distinct, audited earlier than deploy<br \/>\nRelated names and descriptions competing<\/p>\n<p>Writing efficient instruments for AI brokers \u2014 utilizing AI brokers from Anthropic is a helpful reference on software design.<\/p>\n<\/p><\/div>\n<p><br \/>\n<br \/><a href=\"https:\/\/machinelearningmastery.com\/ai-agent-tool-design-what-works-and-what-doesnt\/\">Source link <\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>On this article, you&#8217;ll find out how software design \u2014 not mannequin functionality \u2014 is the foundation explanation for most AI agent failures, and what concrete design patterns you&#8217;ll be able to apply to repair it. Matters we&#8217;ll cowl embody: Device design practices that enhance agent reliability, together with single-responsibility instruments, tight schemas, and structured [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":1067,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/mlm-agent-tool-design.png","fifu_image_alt":"","jnews-multi-image_gallery":[],"jnews_single_post":[],"jnews_primary_category":[],"jnews_override_bookmark_settings":[],"jnews_social_meta":[],"jnews_override_counter":[],"footnotes":""},"categories":[7],"tags":[457,824,440,16,1444],"class_list":["post-1065","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-science-mlops","tag-agent","tag-design","tag-doesnt","tag-tool","tag-works"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>AI Agent Device Design: What Works and What Does not - Future News 24<\/title>\n<meta name=\"description\" content=\"In this article, we explore what makes AI agent tools work well and the common design mistakes that cause failures. Learn how tool design affects an agent&#039;s ability to complete tasks accurately and consistently.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"AI Agent Device Design: What Works and What Does not - Future News 24\" \/>\n<meta property=\"og:description\" content=\"In this article, we explore what makes AI agent tools work well and the common design mistakes that cause failures. Learn how tool design affects an agent&#039;s ability to complete tasks accurately and consistently.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/\" \/>\n<meta property=\"og:site_name\" content=\"Future News 24\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-15T12:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-16T06:59:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/mlm-agent-tool-design.png\" \/>\n<meta name=\"author\" content=\"Future News 24\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/mlm-agent-tool-design.png\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Future News 24\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"15 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/\"},\"author\":{\"name\":\"Future News 24\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#\\\/schema\\\/person\\\/cecad1bde21cfc357cf70128144d6c83\"},\"headline\":\"AI Agent Device Design: What Works and What Does not\",\"datePublished\":\"2026-06-15T12:00:00+00:00\",\"dateModified\":\"2026-06-16T06:59:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/\"},\"wordCount\":3057,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/machinelearningmastery.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/mlm-agent-tool-design.png\",\"keywords\":[\"Agent\",\"Design\",\"doesnt\",\"Tool\",\"Works\"],\"articleSection\":[\"Data Science &amp; MLOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/\",\"url\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/\",\"name\":\"AI Agent Device Design: What Works and What Does not - Future News 24\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/machinelearningmastery.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/mlm-agent-tool-design.png\",\"datePublished\":\"2026-06-15T12:00:00+00:00\",\"dateModified\":\"2026-06-16T06:59:43+00:00\",\"description\":\"In this article, we explore what makes AI agent tools work well and the common design mistakes that cause failures. Learn how tool design affects an agent&#039;s ability to complete tasks accurately and consistently.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/#primaryimage\",\"url\":\"https:\\\/\\\/machinelearningmastery.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/mlm-agent-tool-design.png\",\"contentUrl\":\"https:\\\/\\\/machinelearningmastery.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/mlm-agent-tool-design.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/2026\\\/06\\\/15\\\/ai-agent-tool-design-what-works-and-what-doesnt\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/futurenews24.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI Agent Device Design: What Works and What Does not\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#website\",\"url\":\"https:\\\/\\\/futurenews24.com\\\/\",\"name\":\"Future News 24\",\"description\":\"The Smart Hub for AI and Next-Gen Innovation\",\"publisher\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/futurenews24.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#organization\",\"name\":\"Future News 24\",\"url\":\"https:\\\/\\\/futurenews24.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/futurenews24.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/fn24-favicon.png\",\"contentUrl\":\"https:\\\/\\\/futurenews24.com\\\/wp-content\\\/uploads\\\/2026\\\/06\\\/fn24-favicon.png\",\"width\":250,\"height\":250,\"caption\":\"Future News 24\"},\"image\":{\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/futurenews24.com\\\/#\\\/schema\\\/person\\\/cecad1bde21cfc357cf70128144d6c83\",\"name\":\"Future News 24\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g\",\"caption\":\"Future News 24\"},\"sameAs\":[\"https:\\\/\\\/futurenews24.com\"],\"url\":\"https:\\\/\\\/futurenews24.com\\\/index.php\\\/author\\\/mridulpahuja20\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"AI Agent Device Design: What Works and What Does not - Future News 24","description":"In this article, we explore what makes AI agent tools work well and the common design mistakes that cause failures. Learn how tool design affects an agent&#039;s ability to complete tasks accurately and consistently.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/","og_locale":"en_US","og_type":"article","og_title":"AI Agent Device Design: What Works and What Does not - Future News 24","og_description":"In this article, we explore what makes AI agent tools work well and the common design mistakes that cause failures. Learn how tool design affects an agent&#039;s ability to complete tasks accurately and consistently.","og_url":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/","og_site_name":"Future News 24","article_published_time":"2026-06-15T12:00:00+00:00","article_modified_time":"2026-06-16T06:59:43+00:00","og_image":[{"url":"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/mlm-agent-tool-design.png","type":"","width":"","height":""}],"author":"Future News 24","twitter_card":"summary_large_image","twitter_image":"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/mlm-agent-tool-design.png","twitter_misc":{"Written by":"Future News 24","Est. reading time":"15 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/#article","isPartOf":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/"},"author":{"name":"Future News 24","@id":"https:\/\/futurenews24.com\/#\/schema\/person\/cecad1bde21cfc357cf70128144d6c83"},"headline":"AI Agent Device Design: What Works and What Does not","datePublished":"2026-06-15T12:00:00+00:00","dateModified":"2026-06-16T06:59:43+00:00","mainEntityOfPage":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/"},"wordCount":3057,"commentCount":0,"publisher":{"@id":"https:\/\/futurenews24.com\/#organization"},"image":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/#primaryimage"},"thumbnailUrl":"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/mlm-agent-tool-design.png","keywords":["Agent","Design","doesnt","Tool","Works"],"articleSection":["Data Science &amp; MLOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/","url":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/","name":"AI Agent Device Design: What Works and What Does not - Future News 24","isPartOf":{"@id":"https:\/\/futurenews24.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/#primaryimage"},"image":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/#primaryimage"},"thumbnailUrl":"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/mlm-agent-tool-design.png","datePublished":"2026-06-15T12:00:00+00:00","dateModified":"2026-06-16T06:59:43+00:00","description":"In this article, we explore what makes AI agent tools work well and the common design mistakes that cause failures. Learn how tool design affects an agent&#039;s ability to complete tasks accurately and consistently.","breadcrumb":{"@id":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/#primaryimage","url":"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/mlm-agent-tool-design.png","contentUrl":"https:\/\/machinelearningmastery.com\/wp-content\/uploads\/2026\/06\/mlm-agent-tool-design.png"},{"@type":"BreadcrumbList","@id":"https:\/\/futurenews24.com\/index.php\/2026\/06\/15\/ai-agent-tool-design-what-works-and-what-doesnt\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/futurenews24.com\/"},{"@type":"ListItem","position":2,"name":"AI Agent Device Design: What Works and What Does not"}]},{"@type":"WebSite","@id":"https:\/\/futurenews24.com\/#website","url":"https:\/\/futurenews24.com\/","name":"Future News 24","description":"The Smart Hub for AI and Next-Gen Innovation","publisher":{"@id":"https:\/\/futurenews24.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/futurenews24.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/futurenews24.com\/#organization","name":"Future News 24","url":"https:\/\/futurenews24.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/futurenews24.com\/#\/schema\/logo\/image\/","url":"https:\/\/futurenews24.com\/wp-content\/uploads\/2026\/06\/fn24-favicon.png","contentUrl":"https:\/\/futurenews24.com\/wp-content\/uploads\/2026\/06\/fn24-favicon.png","width":250,"height":250,"caption":"Future News 24"},"image":{"@id":"https:\/\/futurenews24.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/futurenews24.com\/#\/schema\/person\/cecad1bde21cfc357cf70128144d6c83","name":"Future News 24","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d57f07142d73cb5503ab2446ea7bc9ef3d0a5ba378d64a6157692311e42bf097?s=96&d=mm&r=g","caption":"Future News 24"},"sameAs":["https:\/\/futurenews24.com"],"url":"https:\/\/futurenews24.com\/index.php\/author\/mridulpahuja20\/"}]}},"_links":{"self":[{"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/posts\/1065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/comments?post=1065"}],"version-history":[{"count":1,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/posts\/1065\/revisions"}],"predecessor-version":[{"id":1066,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/posts\/1065\/revisions\/1066"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/media\/1067"}],"wp:attachment":[{"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/media?parent=1065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/categories?post=1065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/futurenews24.com\/index.php\/wp-json\/wp\/v2\/tags?post=1065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}