<?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: Karthik Gokul</title>
    <description>The latest articles on DEV Community by Karthik Gokul (@karthik_gokul_3a38136130f).</description>
    <link>https://dev.to/karthik_gokul_3a38136130f</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4125643%2F67e981f6-cd7d-40c1-8af3-ba70bdbad41c.png</url>
      <title>DEV Community: Karthik Gokul</title>
      <link>https://dev.to/karthik_gokul_3a38136130f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karthik_gokul_3a38136130f"/>
    <language>en</language>
    <item>
      <title>The Most Dangerous Moment in Agentic AI Isn't the Prompt</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Tue, 03 Nov 2026 06:34:26 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/the-most-dangerous-moment-in-agentic-ai-isnt-the-prompt-ifa</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/the-most-dangerous-moment-in-agentic-ai-isnt-the-prompt-ifa</guid>
      <description>&lt;p&gt;&lt;em&gt;It's the moment an AI agent decides to execute a real action.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Everyone talks about prompt engineering, model accuracy, and how intelligent AI agents are becoming.&lt;/p&gt;

&lt;p&gt;But there's a bigger question that often gets overlooked:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What happens right before an AI agent calls a tool?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Imagine an AI agent connected to your company's Gmail, CRM, and customer database.&lt;/p&gt;

&lt;p&gt;A customer asks for an account update.&lt;/p&gt;

&lt;p&gt;The agent understands the request, retrieves the relevant information, and decides to update the CRM.&lt;/p&gt;

&lt;p&gt;Everything looks normal.&lt;/p&gt;

&lt;p&gt;But what if the customer record belongs to another department? What if the agent lacks permission to modify it? What if the information it retrieved is incomplete?&lt;/p&gt;

&lt;p&gt;The agent knows &lt;em&gt;how&lt;/em&gt; to execute the action.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But does that mean it should?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hidden Risk Behind Tool Calling
&lt;/h2&gt;

&lt;p&gt;AI agents are increasingly moving beyond generating responses.&lt;/p&gt;

&lt;p&gt;They can now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Send emails and notifications.&lt;/li&gt;
&lt;li&gt;Modify customer records.&lt;/li&gt;
&lt;li&gt;Retrieve sensitive business information.&lt;/li&gt;
&lt;li&gt;Trigger automated workflows.&lt;/li&gt;
&lt;li&gt;Execute actions across enterprise systems.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These capabilities make agentic AI valuable.&lt;/p&gt;

&lt;p&gt;They also introduce risks that traditional chatbot applications rarely encounter.&lt;/p&gt;

&lt;p&gt;Because once an agent executes an action, the consequences may extend beyond the application itself.&lt;/p&gt;

&lt;p&gt;A wrong answer can sometimes be corrected.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An unauthorized transaction or sensitive email cannot always be undone.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Should Happen Before Execution?
&lt;/h2&gt;

&lt;p&gt;A production-oriented agent system needs more than a model that selects the right tool.&lt;/p&gt;

&lt;p&gt;It needs an execution layer that evaluates whether the proposed action is permitted.&lt;/p&gt;

&lt;p&gt;Before a consequential tool call, five checks matter:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Scope &amp;amp; Context&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Is the agent authorized to perform this action on the requested resource?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Confidence &amp;amp; Data Quality&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Is the information sufficiently reliable and complete to justify the action?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Policy Enforcement&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Does the action comply with organizational policies and security boundaries?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Human Approval&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Does the operation require authorization from a human before proceeding?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Budget &amp;amp; Resource Control&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Is the execution within permitted cost, rate, and resource limits?&lt;/p&gt;

&lt;p&gt;These checks should produce a clear decision:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Allow. Deny. Or hold for review.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And the decision should be enforced independently of the AI model's own claims.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Happens When Something Goes Wrong?
&lt;/h2&gt;

&lt;p&gt;This is where many agent implementations become fragile.&lt;/p&gt;

&lt;p&gt;Suppose a tool times out after receiving an update request.&lt;/p&gt;

&lt;p&gt;Should the agent retry immediately?&lt;/p&gt;

&lt;p&gt;What if the first request actually succeeded?&lt;/p&gt;

&lt;p&gt;A blind retry could create duplicate records or transactions.&lt;/p&gt;

&lt;p&gt;Similarly, if an approval is denied, the correct response isn't to find another route around the approval.&lt;/p&gt;

&lt;p&gt;It's to stop the restricted action.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Safe failure handling is part of production readiness, not an optional improvement.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Nuroen Approaches Governed Execution
&lt;/h2&gt;

&lt;p&gt;At &lt;strong&gt;Nuroen AI&lt;/strong&gt;, we're building enterprise agent orchestration around a fundamental principle:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An agent's ability to act should never automatically grant it permission to act.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Nuroen brings agent building, orchestration, governance, and execution into one platform.&lt;/p&gt;

&lt;p&gt;Our runtime governance approach incorporates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scope and context validation.&lt;/li&gt;
&lt;li&gt;Confidence-based checks.&lt;/li&gt;
&lt;li&gt;Policy enforcement and human approvals.&lt;/li&gt;
&lt;li&gt;Execution budget controls.&lt;/li&gt;
&lt;li&gt;Auditability across agent operations.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rather than treating governance as something teams investigate after execution, Nuroen is designed to make controls part of the execution path.&lt;/p&gt;

&lt;p&gt;The goal is straightforward:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Give AI agents the autonomy to perform useful work without removing enterprise oversight.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Question Developers Should Ask
&lt;/h2&gt;

&lt;p&gt;The next time you're building an agent with access to an API, database, or business application, don't stop at:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Can my agent call this tool?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Ask:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"What prevents it from calling the tool when it shouldn't?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Because the future of agentic AI isn't just about more capable agents.&lt;/p&gt;

&lt;p&gt;It's about agents that can operate reliably, securely, and within defined boundaries.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tool access creates capability. Governed execution creates trust.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Explore how Nuroen is approaching enterprise agent orchestration:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.nuroen.com/" rel="noopener noreferrer"&gt;https://www.nuroen.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>agentskills</category>
      <category>agentaichallenge</category>
      <category>ai</category>
      <category>cybersecurity</category>
    </item>
    <item>
      <title>Your AI Agent Doesn't Read Your 40-Page Security Policy</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Mon, 02 Nov 2026 06:28:18 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-doesnt-read-your-40-page-security-policy-38d5</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-doesnt-read-your-40-page-security-policy-38d5</guid>
      <description>&lt;p&gt;&lt;strong&gt;Your company spent three months writing an AI governance policy.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Legal reviewed it.&lt;/p&gt;

&lt;p&gt;Security approved it.&lt;/p&gt;

&lt;p&gt;Compliance signed off.&lt;/p&gt;

&lt;p&gt;Engineering received a 40-page PDF.&lt;/p&gt;

&lt;p&gt;Then someone deployed an AI agent with access to a production database.&lt;/p&gt;

&lt;p&gt;Here's my question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which line of that PDF actually stops the agent from executing an unauthorized query?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Exactly.&lt;/p&gt;

&lt;p&gt;This is the uncomfortable reality of enterprise AI governance.&lt;/p&gt;

&lt;p&gt;We're treating organizational policies as though they automatically translate into technical restrictions.&lt;/p&gt;

&lt;p&gt;They don't.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Policy Exists. The Permission Still Works.
&lt;/h2&gt;

&lt;p&gt;Imagine you're building an AI support agent.&lt;/p&gt;

&lt;p&gt;It can retrieve customer records and recommend account updates.&lt;/p&gt;

&lt;p&gt;Your organization has a clear policy:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Customer records must not be modified without approval.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The system prompt includes the same instruction.&lt;/p&gt;

&lt;p&gt;But your agent also has access to this tool:&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="nf"&gt;update_customer_record&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;changes&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the tool itself doesn't enforce approval.&lt;/p&gt;

&lt;p&gt;Now imagine the agent decides that modifying the record is necessary to resolve a customer issue.&lt;/p&gt;

&lt;p&gt;If nothing outside the model checks authorization, the operation may execute.&lt;/p&gt;

&lt;p&gt;Your policy hasn't disappeared.&lt;/p&gt;

&lt;p&gt;It's just not connected to the execution path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That's not a documentation problem. It's an enforcement problem.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  We Keep Putting Rules in the Wrong Place
&lt;/h2&gt;

&lt;p&gt;There are several ways developers try to control agents.&lt;/p&gt;

&lt;p&gt;System prompts.&lt;/p&gt;

&lt;p&gt;Tool descriptions.&lt;/p&gt;

&lt;p&gt;Workflow instructions.&lt;/p&gt;

&lt;p&gt;Configuration settings.&lt;/p&gt;

&lt;p&gt;All of these can be useful.&lt;/p&gt;

&lt;p&gt;But they serve different purposes.&lt;/p&gt;

&lt;p&gt;A system prompt can influence what the model decides.&lt;/p&gt;

&lt;p&gt;A tool description can explain intended usage.&lt;/p&gt;

&lt;p&gt;A configuration setting can restrict access if the platform actually enforces it.&lt;/p&gt;

&lt;p&gt;An authorization mechanism can determine whether a proposed action is permitted.&lt;/p&gt;

&lt;p&gt;These aren't interchangeable.&lt;/p&gt;

&lt;p&gt;If a model can directly call a sensitive tool without an independent permission check, telling it not to do so is not a sufficient security boundary.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Missing Check
&lt;/h2&gt;

&lt;p&gt;A basic enforcement pattern might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;run_tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;decision&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;authorize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;args&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;decision&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DENY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;blocked&lt;/span&gt;&lt;span class="sh"&gt;"&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;decision&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;REVIEW&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;approval_required&lt;/span&gt;&lt;span class="sh"&gt;"&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;decision&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ALLOW&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;blocked&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Illustrative pseudocode.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The model proposes the tool call.&lt;/p&gt;

&lt;p&gt;The authorization mechanism evaluates it.&lt;/p&gt;

&lt;p&gt;Only permitted operations execute.&lt;/p&gt;

&lt;p&gt;The important part isn't the specific code.&lt;/p&gt;

&lt;p&gt;It's the separation of responsibilities.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An AI model shouldn't be the sole authority over its own permissions.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What About Approval Workflows?
&lt;/h2&gt;

&lt;p&gt;Approval workflows can help, but only if they're genuine execution checkpoints.&lt;/p&gt;

&lt;p&gt;Consider two designs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design A
&lt;/h3&gt;

&lt;p&gt;The agent sends an email.&lt;/p&gt;

&lt;p&gt;The system notifies an administrator that a sensitive email was sent.&lt;/p&gt;

&lt;h3&gt;
  
  
  Design B
&lt;/h3&gt;

&lt;p&gt;The agent prepares an email.&lt;/p&gt;

&lt;p&gt;The system detects that approval is required.&lt;/p&gt;

&lt;p&gt;Execution pauses.&lt;/p&gt;

&lt;p&gt;An authorized reviewer approves or rejects the action.&lt;/p&gt;

&lt;p&gt;Only an approved message can be sent.&lt;/p&gt;

&lt;p&gt;Design A provides visibility.&lt;/p&gt;

&lt;p&gt;Design B provides enforcement.&lt;/p&gt;

&lt;p&gt;Both may produce logs.&lt;/p&gt;

&lt;p&gt;Only one actually prevents the protected action from executing without approval.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Four Questions I'd Ask Before Shipping
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. What happens when authorization fails?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Does the system block the action or continue?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Can the agent bypass a restriction through another tool?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If one tool is blocked, does another provide the same underlying capability?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Are approvals bound to the exact proposed action?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An approval for one recipient or transaction shouldn't automatically authorize a modified operation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. What happens when the policy service is unavailable?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For sensitive actions, missing authorization shouldn't silently become permission.&lt;/p&gt;

&lt;p&gt;These questions are far more useful than simply asking whether the organization has an AI governance policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Nuroen Approach
&lt;/h2&gt;

&lt;p&gt;At Nuroen AI, we're building enterprise agents around the idea of bounded execution.&lt;/p&gt;

&lt;p&gt;That includes scope restrictions, confidence checks, policy and human approval gates, execution budgets, and auditability.&lt;/p&gt;

&lt;p&gt;The goal isn't to eliminate autonomous behavior.&lt;/p&gt;

&lt;p&gt;It's to ensure that agents can perform useful work without treating every available tool as an unrestricted permission.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Lesson
&lt;/h2&gt;

&lt;p&gt;Documentation is necessary.&lt;/p&gt;

&lt;p&gt;Policies are necessary.&lt;/p&gt;

&lt;p&gt;Security reviews are necessary.&lt;/p&gt;

&lt;p&gt;But none of them automatically enforce themselves.&lt;/p&gt;

&lt;p&gt;A policy tells you what should happen.&lt;/p&gt;

&lt;p&gt;A runtime control determines whether a protected action is allowed to happen.&lt;/p&gt;

&lt;p&gt;And once AI agents start interacting with production systems, that difference matters.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your governance policy shouldn't live only in a PDF.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Its requirements need to exist in the execution path.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Question for developers:&lt;/strong&gt; What's the most common AI agent security mistake you've seen — overpowered tools, missing approval gates, or trusting prompts as permissions?&lt;/p&gt;

&lt;p&gt;Nuroen AI: &lt;a href="https://www.nuroen.com/" rel="noopener noreferrer"&gt;https://www.nuroen.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>Your AI Agent Has Perfect Logs. It Still Broke Production.</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Fri, 30 Oct 2026 07:00:53 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-has-perfect-logs-it-still-broke-production-25fb</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-has-perfect-logs-it-still-broke-production-25fb</guid>
      <description>&lt;p&gt;Your AI agent did something it wasn't supposed to do.&lt;/p&gt;

&lt;p&gt;The good news?&lt;/p&gt;

&lt;p&gt;You have beautiful traces.&lt;/p&gt;

&lt;p&gt;Every model response is captured.&lt;/p&gt;

&lt;p&gt;Every tool call is recorded.&lt;/p&gt;

&lt;p&gt;Every timestamp is available.&lt;/p&gt;

&lt;p&gt;You can reconstruct the entire incident.&lt;/p&gt;

&lt;p&gt;The bad news?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The action already happened.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Welcome to one of the biggest misunderstandings in agentic AI engineering:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring isn't the same as enforcement.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  We've Become Very Good at Watching Agents
&lt;/h2&gt;

&lt;p&gt;Modern AI applications can produce detailed execution traces.&lt;/p&gt;

&lt;p&gt;We can monitor latency, token consumption, model outputs, tool calls, retries, and errors.&lt;/p&gt;

&lt;p&gt;This is valuable.&lt;/p&gt;

&lt;p&gt;If an agent gets stuck in a loop, traces help us understand why.&lt;/p&gt;

&lt;p&gt;If a workflow produces the wrong answer, we can inspect the execution path.&lt;/p&gt;

&lt;p&gt;If costs suddenly increase, usage metrics help identify the source.&lt;/p&gt;

&lt;p&gt;But there's a limit to what observability can accomplish.&lt;/p&gt;

&lt;p&gt;It can explain behavior.&lt;/p&gt;

&lt;p&gt;It doesn't necessarily restrict behavior.&lt;/p&gt;

&lt;p&gt;And that becomes a problem when agents can do more than generate text.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Moment an Agent Gets Tools, the Rules Change
&lt;/h2&gt;

&lt;p&gt;Consider a support agent with access to three tools:&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="nf"&gt;get_customer_record&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;update_customer_record&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;send_customer_email&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The agent's job is to investigate customer complaints and recommend resolutions.&lt;/p&gt;

&lt;p&gt;A system prompt says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Never update records or send messages without approval.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Seems reasonable.&lt;/p&gt;

&lt;p&gt;But the agent can technically invoke all three tools.&lt;/p&gt;

&lt;p&gt;What happens when it decides that sending a message is the fastest way to complete the task?&lt;/p&gt;

&lt;p&gt;If the only restriction is the prompt, you're relying on the model to respect the boundary.&lt;/p&gt;

&lt;p&gt;If you only have monitoring, you'll see the tool call.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But seeing an action doesn't mean you had control over it.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Observability Answers One Question
&lt;/h2&gt;

&lt;p&gt;What happened?&lt;/p&gt;

&lt;p&gt;Enforcement answers another:&lt;/p&gt;

&lt;p&gt;Was this action permitted?&lt;/p&gt;

&lt;p&gt;Those are fundamentally different responsibilities.&lt;/p&gt;

&lt;p&gt;Here's a simplified comparison:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Monitoring&lt;/th&gt;
&lt;th&gt;Enforcement&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Records tool calls&lt;/td&gt;
&lt;td&gt;Authorizes tool calls&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Tracks execution costs&lt;/td&gt;
&lt;td&gt;Applies execution budgets&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reports policy violations&lt;/td&gt;
&lt;td&gt;Blocks prohibited actions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Helps investigate failures&lt;/td&gt;
&lt;td&gt;Restricts execution paths&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Supports debugging&lt;/td&gt;
&lt;td&gt;Applies operational boundaries&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;You need both.&lt;/p&gt;

&lt;p&gt;But you shouldn't confuse them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Missing Step Before Tool Execution
&lt;/h2&gt;

&lt;p&gt;A safer architecture introduces a policy evaluation before sensitive tool calls.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;call_tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;decision&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;authorize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;arguments&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;args&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;decision&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ALLOW&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;blocked&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;reason&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;Authorization required&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;execute_tool&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tool&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Illustrative pseudocode.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This doesn't magically solve every security problem.&lt;/p&gt;

&lt;p&gt;But it establishes an important separation.&lt;/p&gt;

&lt;p&gt;The model proposes an action.&lt;/p&gt;

&lt;p&gt;A trusted component evaluates whether that action can execute.&lt;/p&gt;

&lt;p&gt;The model doesn't get to approve its own permissions.&lt;/p&gt;

&lt;h2&gt;
  
  
  What About Human Approval?
&lt;/h2&gt;

&lt;p&gt;Human approval is another form of enforcement when the workflow actually prevents execution until authorization is received.&lt;/p&gt;

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

&lt;p&gt;An agent proposes sending an external email containing sensitive customer information.&lt;/p&gt;

&lt;p&gt;Instead of sending it immediately, the system holds the action.&lt;/p&gt;

&lt;p&gt;A reviewer examines the proposed message.&lt;/p&gt;

&lt;p&gt;Only an approved action proceeds.&lt;/p&gt;

&lt;p&gt;The distinction matters.&lt;/p&gt;

&lt;p&gt;A notification saying &lt;em&gt;“Your agent just sent a sensitive email”&lt;/em&gt; is monitoring.&lt;/p&gt;

&lt;p&gt;A checkpoint saying &lt;em&gt;“This email cannot be sent until approved”&lt;/em&gt; is enforcement.&lt;/p&gt;

&lt;p&gt;Same workflow.&lt;/p&gt;

&lt;p&gt;Very different risk profile.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Failure Cases Nobody Likes to Demo
&lt;/h2&gt;

&lt;p&gt;Here's where production systems get interesting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if the policy service times out?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Does the agent continue?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if an approval is denied?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Can the agent attempt the same action through a different tool?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if a tool returns an ambiguous timeout?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Does the agent retry and potentially duplicate the operation?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What if the execution budget is exhausted?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Does the workflow stop?&lt;/p&gt;

&lt;p&gt;These questions matter because a runtime enforcement mechanism must handle more than the happy path.&lt;/p&gt;

&lt;p&gt;A policy that works only when every dependency responds correctly isn't enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Nuroen Fits
&lt;/h2&gt;

&lt;p&gt;At Nuroen AI, we're building around the principle of bounded agent execution.&lt;/p&gt;

&lt;p&gt;That includes scope restrictions, confidence checks, policy and human approval gates, execution budgets, and auditability.&lt;/p&gt;

&lt;p&gt;The goal is not to eliminate autonomy.&lt;/p&gt;

&lt;p&gt;It's to ensure that an agent's ability to act remains subject to enforceable boundaries.&lt;/p&gt;

&lt;p&gt;Because the future of enterprise AI isn't just about building agents that can complete tasks.&lt;/p&gt;

&lt;p&gt;It's about building systems that can control how those tasks are completed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Question
&lt;/h2&gt;

&lt;p&gt;If your agent can perform a prohibited action, and your system only tells you about it afterward, what exactly is being governed?&lt;/p&gt;

&lt;p&gt;Monitoring is essential.&lt;/p&gt;

&lt;p&gt;But it isn't a substitute for authorization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An audit log is evidence. It isn't a permission system.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And that distinction matters a lot more once your AI agents start touching production systems.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Question for developers:&lt;/strong&gt; If you had to choose one place to enforce agent permissions, would you choose the agent framework, tool gateway, or backend API?&lt;/p&gt;

&lt;p&gt;Nuroen AI: &lt;a href="https://www.nuroen.com/" rel="noopener noreferrer"&gt;https://www.nuroen.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>javascript</category>
      <category>security</category>
    </item>
    <item>
      <title>Is Your AI Agent Actually Safe, or Just Configured to Be?</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Thu, 29 Oct 2026 05:53:19 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/is-your-ai-agent-actually-safe-or-just-configured-to-be-336e</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/is-your-ai-agent-actually-safe-or-just-configured-to-be-336e</guid>
      <description>&lt;p&gt;Your AI agent passed every test. Then someone changed one setting.&lt;/p&gt;

&lt;p&gt;Suddenly, the same agent that could only read customer records could also modify them.&lt;/p&gt;

&lt;p&gt;Nothing about the model changed.&lt;/p&gt;

&lt;p&gt;The prompt was identical.&lt;/p&gt;

&lt;p&gt;The workflow looked exactly the same.&lt;/p&gt;

&lt;p&gt;Only the permissions changed.&lt;/p&gt;

&lt;p&gt;And that raises an uncomfortable question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Was the agent ever safe, or was it simply configured to behave safely?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is the difference between &lt;em&gt;safe by configuration&lt;/em&gt; and &lt;em&gt;safe by default&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;For developers building production AI agents, that distinction matters more than it might initially appear.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Hidden Problem With Configuration-Based Safety
&lt;/h2&gt;

&lt;p&gt;Most AI agent systems provide some combination of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tool permissions&lt;/li&gt;
&lt;li&gt;Access policies&lt;/li&gt;
&lt;li&gt;Human approval settings&lt;/li&gt;
&lt;li&gt;Execution limits&lt;/li&gt;
&lt;li&gt;Environment restrictions&lt;/li&gt;
&lt;li&gt;Logging and monitoring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These controls are useful.&lt;/p&gt;

&lt;p&gt;But their effectiveness depends on how they are configured, maintained, and enforced.&lt;/p&gt;

&lt;p&gt;Imagine an agent designed to investigate customer support tickets.&lt;/p&gt;

&lt;p&gt;It needs to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read incoming tickets.&lt;/li&gt;
&lt;li&gt;Retrieve relevant customer information.&lt;/li&gt;
&lt;li&gt;Recommend a resolution.&lt;/li&gt;
&lt;li&gt;Escalate sensitive cases.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now imagine the same agent has access to a tool that can update customer account information.&lt;/p&gt;

&lt;p&gt;A developer may intend for the agent to use that tool only after approval.&lt;/p&gt;

&lt;p&gt;But what actually enforces that intention?&lt;/p&gt;

&lt;p&gt;A sentence in the system prompt?&lt;/p&gt;

&lt;p&gt;An optional checkbox?&lt;/p&gt;

&lt;p&gt;A policy that can be accidentally disabled?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A safety feature that exists is not necessarily a safety boundary that is enforced.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Safe by Configuration vs. Safe by Default
&lt;/h2&gt;

&lt;p&gt;The distinction is straightforward.&lt;/p&gt;

&lt;h3&gt;
  
  
  Safe by Configuration
&lt;/h3&gt;

&lt;p&gt;The platform provides safety controls, but someone must explicitly configure them.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;A developer must restrict access to sensitive tools.&lt;/li&gt;
&lt;li&gt;An administrator must enable approval checkpoints.&lt;/li&gt;
&lt;li&gt;A team must define execution budgets.&lt;/li&gt;
&lt;li&gt;Someone must ensure that policies remain active after updates.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach can support strong security when implemented correctly.&lt;/p&gt;

&lt;p&gt;The problem is that it places significant responsibility on the configuration process.&lt;/p&gt;

&lt;h3&gt;
  
  
  Safe by Default
&lt;/h3&gt;

&lt;p&gt;The system starts from a restrictive baseline.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;High-impact actions are unavailable until explicitly authorized.&lt;/li&gt;
&lt;li&gt;Tool access is limited to the required scope.&lt;/li&gt;
&lt;li&gt;Missing authorization does not silently become permission.&lt;/li&gt;
&lt;li&gt;Sensitive actions require appropriate policy evaluation.&lt;/li&gt;
&lt;li&gt;Unknown policy outcomes do not automatically permit execution.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Developers can grant additional capabilities when needed, but those capabilities must be deliberate.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The goal isn't to remove flexibility. It's to make unsafe expansion an explicit decision.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Prompts Aren't Permission Systems
&lt;/h2&gt;

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

&lt;blockquote&gt;
&lt;p&gt;Never update customer information without approval.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That sounds reasonable.&lt;/p&gt;

&lt;p&gt;But the agent also has access to a tool called &lt;code&gt;update_customer_record&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;What happens if the model decides that updating the record is necessary to complete the user's request?&lt;/p&gt;

&lt;p&gt;The instruction may influence its behavior.&lt;/p&gt;

&lt;p&gt;It does not, by itself, prevent the tool from executing.&lt;/p&gt;

&lt;p&gt;A stronger design checks authorization independently of the model's reasoning.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;execute_action&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;decision&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;policy_engine&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;context&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;decision&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ALLOW&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;blocked&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;reason&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;Authorization not granted&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;tool_executor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;run&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Illustrative pseudocode, not Nuroen implementation code.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The important principle is that the model does not get to decide whether its own action is authorized.&lt;/p&gt;

&lt;p&gt;That decision belongs to an enforcement mechanism outside the model.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Failure Modes Developers Often Overlook
&lt;/h2&gt;

&lt;p&gt;A successful demo rarely tests what happens when the environment becomes unreliable.&lt;/p&gt;

&lt;p&gt;Consider four situations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. The policy service times out.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Should the agent proceed because no denial was received?&lt;/p&gt;

&lt;p&gt;For sensitive actions, an unavailable authorization decision should not silently become approval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. A tool returns incomplete data.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Should the agent assume success?&lt;/p&gt;

&lt;p&gt;No. A tool timeout is not confirmation that the requested operation completed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. A human reviewer rejects an action.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Can the agent attempt a different tool to achieve the same prohibited outcome?&lt;/p&gt;

&lt;p&gt;The system should enforce the underlying policy, not merely block one specific tool call.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. An execution budget is exhausted.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Should the agent keep retrying because the task is important?&lt;/p&gt;

&lt;p&gt;A bounded execution model needs a defined response to budget exhaustion.&lt;/p&gt;

&lt;p&gt;These are not unusual edge cases.&lt;/p&gt;

&lt;p&gt;They are predictable conditions in production systems.&lt;/p&gt;

&lt;h2&gt;
  
  
  Runtime Enforcement Changes the Conversation
&lt;/h2&gt;

&lt;p&gt;Traditional governance often concentrates on what happens before deployment and after execution.&lt;/p&gt;

&lt;p&gt;Before deployment:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Review the agent.&lt;/li&gt;
&lt;li&gt;Approve its tools.&lt;/li&gt;
&lt;li&gt;Configure its policies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After execution:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inspect the logs.&lt;/li&gt;
&lt;li&gt;Investigate unexpected behavior.&lt;/li&gt;
&lt;li&gt;Update the configuration.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Both stages matter.&lt;/p&gt;

&lt;p&gt;But neither replaces governance during execution.&lt;/p&gt;

&lt;p&gt;A runtime enforcement layer can evaluate the action the agent is about to take, the context surrounding it, and whether it is authorized.&lt;/p&gt;

&lt;p&gt;That creates a critical separation:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The AI proposes an action. The runtime determines whether it can execute.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Nuroen Fits
&lt;/h2&gt;

&lt;p&gt;At Nuroen AI, our approach to enterprise agents emphasizes bounded execution through scope controls, confidence checks, policy and human approval gates, execution budgets, and auditability.&lt;/p&gt;

&lt;p&gt;The objective is to help organizations build agents that can operate across enterprise workflows without treating autonomy as unrestricted permission.&lt;/p&gt;

&lt;p&gt;Because production readiness isn't simply about whether an agent can complete a task.&lt;/p&gt;

&lt;p&gt;It's also about whether the system can control how that task is completed.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Question Worth Asking
&lt;/h2&gt;

&lt;p&gt;Imagine two AI agent platforms.&lt;/p&gt;

&lt;p&gt;Platform A provides extensive security settings, but developers must remember to enable and maintain them.&lt;/p&gt;

&lt;p&gt;Platform B starts with restrictive execution boundaries and requires explicit authorization to expand them.&lt;/p&gt;

&lt;p&gt;Both may support secure deployments.&lt;/p&gt;

&lt;p&gt;But which one is less likely to expose an organization to an avoidable configuration mistake?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An AI agent shouldn't become dangerous because someone forgot to check a box.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's the standard worth building toward.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What do you think? Should enterprise AI platforms enforce restrictive defaults, or should developers have complete control over safety configuration?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Explore Nuroen AI: &lt;a href="https://www.nuroen.com/" rel="noopener noreferrer"&gt;https://www.nuroen.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Your AI Agent Has Permissions. That Doesn't Mean It Should Use Them.</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Tue, 27 Oct 2026 07:23:27 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-has-permissions-that-doesnt-mean-it-should-use-them-4gko</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-has-permissions-that-doesnt-mean-it-should-use-them-4gko</guid>
      <description>&lt;p&gt;&lt;em&gt;The hidden problem with tool-calling agents: being able to execute an action isn't the same as being authorized to execute it.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Your AI agent has access to Gmail.&lt;/p&gt;

&lt;p&gt;It can read emails, draft responses, and send messages.&lt;/p&gt;

&lt;p&gt;You ask it to summarize a customer complaint.&lt;/p&gt;

&lt;p&gt;It reads the complaint.&lt;/p&gt;

&lt;p&gt;Finds the customer's account details.&lt;/p&gt;

&lt;p&gt;Decides a refund might resolve the issue.&lt;/p&gt;

&lt;p&gt;And attempts to initiate an action you never explicitly requested.&lt;/p&gt;

&lt;p&gt;Congratulations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Your assistant just tried to become your operations department.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is where AI agent development gets interesting.&lt;/p&gt;

&lt;p&gt;Because the real question isn't whether the agent can use a tool.&lt;/p&gt;

&lt;p&gt;It's whether it should.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tool access is not permission to do everything
&lt;/h2&gt;

&lt;p&gt;A common agent architecture looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Request
     |
     v
LLM Reasoning
     |
     v
Tool Selection
     |
     v
API Execution
     |
     v
Response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This can work well for controlled, low-risk tasks.&lt;/p&gt;

&lt;p&gt;But for enterprise systems, something important is missing.&lt;/p&gt;

&lt;p&gt;The model shouldn't be the only component deciding whether an operation is permitted.&lt;/p&gt;

&lt;p&gt;If an agent has access to a CRM tool, that doesn't automatically mean it should modify every customer record.&lt;/p&gt;

&lt;p&gt;If an agent can send email, that doesn't mean every generated message should be sent.&lt;/p&gt;

&lt;p&gt;If an agent can access a database, it doesn't mean unrestricted queries are appropriate.&lt;/p&gt;

&lt;h2&gt;
  
  
  A system prompt isn't a security boundary
&lt;/h2&gt;

&lt;p&gt;Developers sometimes try to solve this by adding instructions such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;You are a responsible AI agent.

Never perform destructive actions.
Never send unauthorized emails.
Always follow company policies.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are reasonable instructions.&lt;/p&gt;

&lt;p&gt;But they cannot replace independently enforced permissions.&lt;/p&gt;

&lt;p&gt;Agents process dynamic input from users, documents, APIs, websites, and other agents.&lt;/p&gt;

&lt;p&gt;Some of that content can be unreliable or malicious.&lt;/p&gt;

&lt;p&gt;Even without an attacker, the model can misunderstand context or select an inappropriate operation.&lt;/p&gt;

&lt;p&gt;That's why the execution layer needs its own safeguards.&lt;/p&gt;

&lt;h2&gt;
  
  
  The missing component: a runtime policy gate
&lt;/h2&gt;

&lt;p&gt;Instead of directly executing every model-proposed tool call, introduce an independent policy check.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent proposes action
         |
         v
   Validate identity
         |
         v
   Check permissions
         |
         v
   Evaluate risk
         |
         v
    Approval needed?
       /       \
     Yes        No
      |          |
 Human review    |
      |          |
      +----------+
         |
         v
   Execute action
         |
         v
   Record outcome
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The decision should be based on trusted configuration and contextual authorization, not simply the model's own claim that an action is safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  A simplified policy example
&lt;/h2&gt;

&lt;p&gt;Imagine an agent that manages customer support operations.&lt;/p&gt;

&lt;p&gt;Its permitted capabilities might include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;agent&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;support_assistant&lt;/span&gt;

&lt;span class="na"&gt;tools&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;tickets.read&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;customer.read&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;email.draft&lt;/span&gt;

&lt;span class="na"&gt;restricted_actions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;email.send&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;refund.issue&lt;/span&gt;
  &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;customer.delete&lt;/span&gt;

&lt;span class="na"&gt;execution&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;max_retries&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3&lt;/span&gt;
  &lt;span class="na"&gt;approval_required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;email.send&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="s"&gt;refund.issue&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is illustrative configuration, not a platform-specific Nuroen syntax.&lt;/p&gt;

&lt;p&gt;The application still needs to enforce these rules through a trusted policy service, correctly scoped credentials, and server-side authorization.&lt;/p&gt;

&lt;p&gt;A simplified conceptual guard could look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;handle_tool_action&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="c1"&gt;# Trusted execution component, not model-generated policy
&lt;/span&gt;
    &lt;span class="nf"&gt;validate_schema&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;decision&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;policy_engine&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;actor&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;actor&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;agent&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;resource&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;resource&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;decision&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DENY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;PermissionError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Action not authorized&lt;/span&gt;&lt;span class="sh"&gt;"&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;decision&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;REQUIRE_APPROVAL&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;create_approval_request&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&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;execute_with_scoped_credentials&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A production implementation needs more, including tenant isolation, approval binding, concurrency safeguards, audit records, credential management, and failure handling.&lt;/p&gt;

&lt;p&gt;But the principle remains the same.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The AI proposes. Trusted infrastructure authorizes.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why observability alone isn't enough
&lt;/h2&gt;

&lt;p&gt;Suppose your agent updates 500 customer records incorrectly.&lt;/p&gt;

&lt;p&gt;Your monitoring dashboard detects the anomaly.&lt;/p&gt;

&lt;p&gt;Your logs capture the tool calls.&lt;/p&gt;

&lt;p&gt;Your incident response process begins.&lt;/p&gt;

&lt;p&gt;Those tools are valuable.&lt;/p&gt;

&lt;p&gt;But they are responding after the operation has occurred.&lt;/p&gt;

&lt;p&gt;Monitoring tells you what happened.&lt;/p&gt;

&lt;p&gt;Runtime governance can stop an unauthorized action before execution.&lt;/p&gt;

&lt;p&gt;Both are necessary.&lt;/p&gt;

&lt;p&gt;Neither replaces the other.&lt;/p&gt;

&lt;h2&gt;
  
  
  Runtime governance also protects your wallet
&lt;/h2&gt;

&lt;p&gt;The problem isn't limited to data security.&lt;/p&gt;

&lt;p&gt;Consider an agent that encounters an API timeout.&lt;/p&gt;

&lt;p&gt;It retries.&lt;/p&gt;

&lt;p&gt;And retries.&lt;/p&gt;

&lt;p&gt;Then launches another reasoning step.&lt;/p&gt;

&lt;p&gt;Then calls the same tool again.&lt;/p&gt;

&lt;p&gt;Without execution limits, seemingly minor failures can become significant cost and reliability problems.&lt;/p&gt;

&lt;p&gt;Reasonable safeguards include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maximum retry counts&lt;/li&gt;
&lt;li&gt;Model and tool budgets&lt;/li&gt;
&lt;li&gt;Timeouts and concurrency limits&lt;/li&gt;
&lt;li&gt;Approval for high-impact operations&lt;/li&gt;
&lt;li&gt;Scoped permissions&lt;/li&gt;
&lt;li&gt;Auditable execution records&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These controls become even more important when multiple agents can call one another.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Nuroen fits
&lt;/h2&gt;

&lt;p&gt;At Nuroen AI, we're focused on making agent execution governable rather than treating governance as an afterthought.&lt;/p&gt;

&lt;p&gt;Our approach combines agent orchestration with explicit boundaries around scope, confidence, policy checks, human approvals, budgets, and auditability.&lt;/p&gt;

&lt;p&gt;The aim is to give developers freedom to build useful agents without forcing enterprises to choose between automation and oversight.&lt;/p&gt;

&lt;p&gt;Because an agent that can use 20 tools isn't automatically more valuable than one that uses three tools reliably and within its authority.&lt;/p&gt;

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

&lt;p&gt;The next time you build an AI agent, don't stop at:&lt;/p&gt;

&lt;p&gt;"Can it call the tool?"&lt;/p&gt;

&lt;p&gt;Ask:&lt;/p&gt;

&lt;p&gt;"Who authorized this specific action?"&lt;/p&gt;

&lt;p&gt;"Is it within scope?"&lt;/p&gt;

&lt;p&gt;"What happens if it fails?"&lt;/p&gt;

&lt;p&gt;"Can we prevent the wrong action before it executes?"&lt;/p&gt;

&lt;p&gt;The shift from tool access to governed execution is what makes agentic systems safer to operate in real environments.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's your approach to runtime authorization for AI agents—custom middleware, policy engines, or orchestration-level controls?&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Exploring enterprise AI agent development? Learn more at &lt;a href="https://www.nuroen.com/" rel="noopener noreferrer"&gt;Nuroen AI&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Further reading
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://cheatsheetseries.owasp.org/cheatsheets/AI_Agent_Security_Cheat_Sheet.html" rel="noopener noreferrer"&gt;OWASP — AI Agent Security&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://owasp.github.io/DevSecOpsGuideline/2-Process/2-2-Develop/2-2-5-AI-Agent-and-MCP-Security/" rel="noopener noreferrer"&gt;OWASP — AI and MCP Security&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Your AI Agent's Audit Log Won't Stop a Bad API Call</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Mon, 26 Oct 2026 05:57:50 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/your-ai-agents-audit-log-wont-stop-a-bad-api-call-40c2</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/your-ai-agents-audit-log-wont-stop-a-bad-api-call-40c2</guid>
      <description>&lt;p&gt;The missing engineering layer between tool calling and production-ready AI agents.&lt;/p&gt;

&lt;p&gt;Here's a scenario that should worry anyone building AI agents.&lt;/p&gt;

&lt;p&gt;You give an agent access to a CRM, an email service and an internal database.&lt;/p&gt;

&lt;p&gt;The agent can retrieve customer details, update records and send emails.&lt;/p&gt;

&lt;p&gt;The system works beautifully.&lt;/p&gt;

&lt;p&gt;Then the agent decides to send a customer report to the wrong recipient.&lt;/p&gt;

&lt;p&gt;The email API returns &lt;code&gt;200 OK&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Your logging system records a successful action.&lt;/p&gt;

&lt;p&gt;Your monitoring dashboard updates.&lt;/p&gt;

&lt;p&gt;Everything technically worked.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Except the agent just shared information it shouldn't have.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is why agent governance cannot rely on observing execution alone.&lt;/p&gt;

&lt;h2&gt;
  
  
  The difference between tool access and permission to act
&lt;/h2&gt;

&lt;p&gt;When developers build tool-enabled AI agents, the architecture often looks something like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User request → LLM reasoning → Tool selection → API execution → Response&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That approach is useful for prototypes.&lt;/p&gt;

&lt;p&gt;But it introduces a serious question:&lt;/p&gt;

&lt;p&gt;Who determines whether the proposed tool call is allowed?&lt;/p&gt;

&lt;p&gt;The agent?&lt;/p&gt;

&lt;p&gt;The system prompt?&lt;/p&gt;

&lt;p&gt;The application's API permissions?&lt;/p&gt;

&lt;p&gt;A prompt can tell an agent not to perform certain operations, but natural-language instructions alone should not be treated as a security boundary.&lt;/p&gt;

&lt;p&gt;The API might reject an unauthorized request.&lt;/p&gt;

&lt;p&gt;But it might also accept an action that is technically permitted yet inappropriate for the current business context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A valid API call is not necessarily an authorized business action.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Add a decision layer before execution
&lt;/h2&gt;

&lt;p&gt;A safer design introduces explicit authorization between tool selection and execution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;User Request → Agent Proposal → Governance Checks → Authorized Tool Execution → Audit&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The governance checks can evaluate multiple dimensions.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Scope
&lt;/h3&gt;

&lt;p&gt;Does the agent have permission to use this tool for this purpose?&lt;/p&gt;

&lt;p&gt;For example, a sales research agent might have read access to CRM records but no authority to delete them.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Context
&lt;/h3&gt;

&lt;p&gt;Does the requested operation make sense given the available evidence?&lt;/p&gt;

&lt;p&gt;A missing customer identifier might require clarification before a record is modified.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Policy
&lt;/h3&gt;

&lt;p&gt;Does the action comply with enterprise rules?&lt;/p&gt;

&lt;p&gt;A request to send restricted information to an unapproved destination should be blocked.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Human approval
&lt;/h3&gt;

&lt;p&gt;Does this particular operation require a person to authorize it?&lt;/p&gt;

&lt;p&gt;An AI-generated refund recommendation is not the same thing as permission to issue the refund.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Execution limits
&lt;/h3&gt;

&lt;p&gt;Is the action within configured spending, rate and workflow limits?&lt;/p&gt;

&lt;p&gt;These controls are especially relevant when an agent can initiate multiple downstream actions.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical example
&lt;/h2&gt;

&lt;p&gt;Imagine an AI agent managing support escalations.&lt;/p&gt;

&lt;p&gt;A high-priority customer ticket arrives.&lt;/p&gt;

&lt;p&gt;The agent retrieves the ticket, reviews related information and recommends issuing a refund.&lt;/p&gt;

&lt;p&gt;Now consider two possible architectures.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture A: Execute immediately&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agent decides on a refund amount.&lt;/p&gt;

&lt;p&gt;It calls the payment API.&lt;/p&gt;

&lt;p&gt;The transaction succeeds.&lt;/p&gt;

&lt;p&gt;The system records the outcome.&lt;/p&gt;

&lt;p&gt;The business reviews the logs afterward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Architecture B: Govern before execution&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The agent recommends a refund.&lt;/p&gt;

&lt;p&gt;The system checks the action against policy.&lt;/p&gt;

&lt;p&gt;If approval is required, the proposed transaction is held.&lt;/p&gt;

&lt;p&gt;An authorized reviewer examines the recommendation.&lt;/p&gt;

&lt;p&gt;Only after approval does the system execute the transaction.&lt;/p&gt;

&lt;p&gt;The decision and transaction outcome are recorded.&lt;/p&gt;

&lt;p&gt;Both architectures use AI.&lt;/p&gt;

&lt;p&gt;Only the second makes approval an explicit part of the execution path.&lt;/p&gt;

&lt;h2&gt;
  
  
  Engineering details that still matter
&lt;/h2&gt;

&lt;p&gt;Pre-execution controls should be supported by sound application architecture.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enforce checks server-side.&lt;/strong&gt; Don't rely solely on the interface or the language model to decide whether a tool call is permitted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Authorize the actual action.&lt;/strong&gt; Check the tool, resource, destination and parameters rather than merely approving a broad workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Avoid approval bypasses.&lt;/strong&gt; If an agent can reach the same sensitive operation through another tool, the security boundary isn't complete.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Handle uncertain outcomes.&lt;/strong&gt; If an external write times out, reconcile its state before attempting a duplicate action.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Preserve traceability.&lt;/strong&gt; Record the relevant policy decisions, approval identity, execution results and failure information.&lt;/p&gt;

&lt;p&gt;Audit logs remain essential, but they complement enforcement rather than replace it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Nuroen fits
&lt;/h2&gt;

&lt;p&gt;This is the problem space we're addressing at &lt;strong&gt;Nuroen&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Nuroen provides an enterprise platform for building, orchestrating and governing AI agents, with runtime controls covering scope, confidence, policy, human approvals, budgets and auditability.&lt;/p&gt;

&lt;p&gt;The goal is to help organizations move from agents that merely have tool access to agents that operate within defined business and security boundaries.&lt;/p&gt;

&lt;p&gt;Because enterprise teams don't just need agents that can act.&lt;/p&gt;

&lt;p&gt;They need ways to decide &lt;strong&gt;which actions should be permitted to execute&lt;/strong&gt;.&lt;/p&gt;

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

&lt;p&gt;An agent successfully calling an API isn't proof that the action was safe.&lt;/p&gt;

&lt;p&gt;A complete audit trail isn't proof that the action should have been allowed.&lt;/p&gt;

&lt;p&gt;And a successful end-to-end demo isn't proof that the workflow is production-ready.&lt;/p&gt;

&lt;p&gt;For autonomous systems, governance needs to be part of the execution path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't just log what your agent did. Control what it's allowed to do.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Explore: &lt;a href="https://www.nuroen.com/" rel="noopener noreferrer"&gt;https://www.nuroen.com/&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;What's your approach to agent authorization? Are you enforcing policies inside your application, through connectors, or through a dedicated control layer?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>aiops</category>
      <category>agents</category>
      <category>programming</category>
    </item>
    <item>
      <title>Your AI Agent Passed the Demo. So Why Can't You Ship It?</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Fri, 23 Oct 2026 06:07:22 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-passed-the-demo-so-why-cant-you-ship-it-3140</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-passed-the-demo-so-why-cant-you-ship-it-3140</guid>
      <description>&lt;p&gt;The missing layer between “works on my machine” and an enterprise agent that can be trusted to touch real systems.&lt;/p&gt;

&lt;p&gt;You've built the agent.&lt;/p&gt;

&lt;p&gt;It can read tickets, summarize context, call an API, update records, and write a coherent final answer. Your demo is smooth. The product team loves it.&lt;/p&gt;

&lt;p&gt;Then the rollout discussion begins.&lt;/p&gt;

&lt;p&gt;Security wants to know what it can access. Operations wants to know what happens when a dependency fails. Compliance wants an approval trail. Finance wants a spending limit.&lt;/p&gt;

&lt;p&gt;Suddenly, “the prompt works” is the least interesting fact in the room.&lt;/p&gt;

&lt;p&gt;That is the production-readiness problem Nuroen was built to address.&lt;br&gt;
A successful execution can still be a failed deployment&lt;br&gt;
Consider a hypothetical customer-onboarding agent:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It receives an onboarding request.&lt;/li&gt;
&lt;li&gt;It retrieves customer details from a CRM.&lt;/li&gt;
&lt;li&gt;It checks policies and documents.&lt;/li&gt;
&lt;li&gt;It updates a case record.&lt;/li&gt;
&lt;li&gt;It sends the customer a confirmation.
In a clean demo, each step succeeds.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now change one condition: the retrieved record contains a field the agent is not authorized to disclose. Or the policy lookup returns no reliable match. Or a write operation needs a compliance officer's sign-off.&lt;/p&gt;

&lt;p&gt;An agent that confidently carries on can still produce a perfectly phrased “success” message. That doesn't mean the business wanted the action to happen.&lt;/p&gt;

&lt;p&gt;Your final answer is a report of what the agent said. Production readiness is about what the system allowed it to do.&lt;br&gt;
Build the boundaries before building the autonomy&lt;br&gt;
With Nuroen AI, the workflow doesn't begin with an unbounded prompt and a collection of API keys.&lt;/p&gt;

&lt;p&gt;It begins with a defined job.&lt;/p&gt;

&lt;p&gt;Describe what the agent should accomplish. Review the proposed skills, knowledge, connectors, and policies. Confirm the limits. Validate the graph. Then build the governed canvas.&lt;/p&gt;

&lt;p&gt;The platform's Define → Confirm → Validate → Build process is designed to catch issues such as missing connector credentials, incompatible edges, and approval steps without assigned reviewers before deployment.&lt;/p&gt;

&lt;p&gt;That changes the question from “How quickly can we give this agent more tools?” to “How confidently can we define what this agent may do?”&lt;br&gt;
The action needs its own permission slip&lt;br&gt;
A model recommending a CRM update and a tool actually performing that update should not be treated as a single event.&lt;/p&gt;

&lt;p&gt;Nuroen puts checks into the execution path:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Scope and context: Is the request within the agent's mandate, and is the supporting knowledge authorized?&lt;/li&gt;
&lt;li&gt;Confidence: Is there sufficient basis to proceed?&lt;/li&gt;
&lt;li&gt;Policy and approval: Is the action permitted, and does it need a human decision first?&lt;/li&gt;
&lt;li&gt;Budget: Does execution fit the defined resource limits?&lt;/li&gt;
&lt;li&gt;Audit: Can the resulting decision and action be traced?
A failing check can stop an action instead of leaving the team to discover the consequence in a log afterward.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is a very different architecture from granting broad tool access and hoping prompt instructions hold.&lt;br&gt;
The platform should cover the entire workflow&lt;br&gt;
Enterprise workflows rarely live inside one model response. They cross email, CRM, databases, IT systems, approvals, and human teams.&lt;/p&gt;

&lt;p&gt;Nuroen is designed to orchestrate agents and tools across those systems, while applying governance to the actual execution path. High-impact actions can pause for human approval rather than becoming irreversible side effects. Runtime activity is recorded with provenance designed for review.&lt;/p&gt;

&lt;p&gt;For teams with additional residency requirements, Nuroen also describes shared SaaS and enterprise-agreement deployment options including dedicated, bring-your-own-cloud, and air-gapped environments.&lt;/p&gt;

&lt;p&gt;That matters because a regulated workflow can't become production-ready by ignoring where it runs or where its data goes.&lt;br&gt;
Stop selling “autonomous.” Start shipping “accountable.”&lt;br&gt;
Autonomy sounds impressive. Accountability is what lets a business use it.&lt;/p&gt;

&lt;p&gt;The goal isn't an agent that always presses forward. It's an agent that can execute an approved task, recognize a boundary, wait for a decision, and leave enough evidence for the people responsible for the system.&lt;/p&gt;

&lt;p&gt;That's the product philosophy behind Nuroen: build, govern, orchestrate, and operate agents in one platform rather than bolting on controls once the demo gets attention.&lt;/p&gt;

&lt;p&gt;If your next AI agent is heading toward real customer data and real business systems, ask one question before you ship it:&lt;/p&gt;

&lt;p&gt;What happens at the exact moment the agent should not be allowed to act?&lt;/p&gt;

&lt;p&gt;If the answer is “we'll inspect the logs,” the design isn't finished.&lt;/p&gt;

&lt;p&gt;Build with governance from the start. Explore Nuroen: &lt;a href="https://www.nuroen.com/" rel="noopener noreferrer"&gt;https://www.nuroen.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>devops</category>
      <category>security</category>
    </item>
    <item>
      <title># Your AI Agent Failed in Production. Can You Replay the Exact Run?</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Thu, 22 Oct 2026 06:33:31 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/-your-ai-agent-failed-in-production-can-you-replay-the-exact-run-371</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/-your-ai-agent-failed-in-production-can-you-replay-the-exact-run-371</guid>
      <description>&lt;p&gt;Why agent debugging needs more than prompt logs and successful final outputs.&lt;/p&gt;

&lt;p&gt;Let's say you've built an AI agent that handles customer support requests.&lt;/p&gt;

&lt;p&gt;It retrieves customer records, checks policies, calls external APIs, and recommends the next action.&lt;/p&gt;

&lt;p&gt;Everything works during testing.&lt;/p&gt;

&lt;p&gt;Then one day, the agent produces an incorrect recommendation.&lt;/p&gt;

&lt;p&gt;You open your logs.&lt;/p&gt;

&lt;p&gt;All you see is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent started
Tool executed
Agent completed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not particularly helpful.&lt;/p&gt;

&lt;p&gt;The real question is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can you reconstruct the entire execution and identify exactly where things went wrong?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why debugging AI agents is different
&lt;/h2&gt;

&lt;p&gt;A conventional workflow generally follows a predefined path.&lt;/p&gt;

&lt;p&gt;An agent may choose its next action dynamically.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;              User Goal
                  |
                  v
             Agent Plans
                  |
           +------+------+
           |             |
           v             v
      Search Docs     Query API
           |             |
           +------+------+
                  |
                  v
            Evaluate Data
                  |
           +------+------+
           |             |
        Continue        Retry
           |             |
           +------+------+
                  |
                  v
              Final Result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When something fails, knowing the final result isn't enough.&lt;/p&gt;

&lt;p&gt;You need to understand the path taken.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Give every execution a unique ID
&lt;/h2&gt;

&lt;p&gt;Every agent run should have a correlation identifier.&lt;/p&gt;

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

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

&lt;span class="n"&gt;run_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uuid4&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="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Starting agent run: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;run_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This allows events from the same execution to be connected.&lt;/p&gt;

&lt;p&gt;Without a shared identifier, debugging multiple concurrent runs becomes much harder.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Record structured execution events
&lt;/h2&gt;

&lt;p&gt;Instead of relying entirely on plain-text logs, capture structured information.&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;datetime&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timezone&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;create_event&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;run_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;run_id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;run_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;timestamp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;datetime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;timezone&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;utc&lt;/span&gt;
        &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;isoformat&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;step&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;action&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_event&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;run_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;retrieve_customer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;success&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;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A production implementation would persist events to an appropriate logging or tracing system.&lt;/p&gt;

&lt;p&gt;It should also record relevant identifiers and sanitized input/output references.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Capture tool failures
&lt;/h2&gt;

&lt;p&gt;Tool failures are especially important.&lt;/p&gt;

&lt;p&gt;Consider an API timeout:&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;requests&lt;/span&gt;

&lt;span class="k"&gt;try&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;requests&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://example.com/api/customer&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;5&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Timeout&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;event&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;create_event&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;run_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;step&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;action&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;customer_api&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;timeout&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;event&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In a real agent, the failure might trigger a retry, fallback, escalation, or controlled stop.&lt;/p&gt;

&lt;p&gt;Recording that decision is as important as recording the error itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Record decisions and approvals
&lt;/h2&gt;

&lt;p&gt;Suppose the agent proposes a refund.&lt;/p&gt;

&lt;p&gt;The execution record should distinguish between:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent proposed refund
        ↓
Policy check completed
        ↓
Human approval requested
        ↓
Approval granted
        ↓
Refund tool executed
        ↓
Outcome verified
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are separate events.&lt;/p&gt;

&lt;p&gt;A final status of &lt;code&gt;completed&lt;/code&gt; doesn't explain whether required approval was obtained.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Build a historical replay view
&lt;/h2&gt;

&lt;p&gt;Once events are recorded, you can reconstruct the execution timeline.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;replay_events&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;events&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;event&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;events&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;timestamp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;step&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;timestamp&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;action&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
            &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a basic historical trace viewer, not a deterministic re-execution engine.&lt;/p&gt;

&lt;p&gt;For more robust ordering, use a monotonic event sequence or another reliable ordering mechanism.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6: Don't blindly re-execute actions
&lt;/h2&gt;

&lt;p&gt;This is where replay design becomes important.&lt;/p&gt;

&lt;p&gt;Suppose the agent originally called:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;send_email()
update_crm()
issue_refund()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Running those actions again could produce unintended side effects.&lt;/p&gt;

&lt;p&gt;For debugging, use recorded tool responses or a controlled test environment wherever possible.&lt;/p&gt;

&lt;p&gt;Write operations should be mocked, isolated, or explicitly approved.&lt;/p&gt;

&lt;p&gt;Replay must not accidentally repeat financial transactions, customer communications, or infrastructure changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 7: Turn execution failures into test cases
&lt;/h2&gt;

&lt;p&gt;One of the most valuable uses of recorded runs is regression testing.&lt;/p&gt;

&lt;p&gt;Imagine a failed execution where an API timed out.&lt;/p&gt;

&lt;p&gt;You can build a test scenario that simulates the same failure and verifies that the agent responds correctly.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Recorded Failure:
Customer API timeout

Expected Behavior:
Retry within policy limits

If retry fails:
Stop or escalate

Never:
Invent customer data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you're testing the agent's behavior under failure, not just whether it produces a plausible answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about exact deterministic replay?
&lt;/h2&gt;

&lt;p&gt;Exact replay is difficult.&lt;/p&gt;

&lt;p&gt;LLM outputs may vary, external data can change, and tool responses may depend on time or system state.&lt;/p&gt;

&lt;p&gt;To improve reproducibility, record relevant versions, configuration, inputs, tool results, and execution context.&lt;/p&gt;

&lt;p&gt;Even then, distinguish between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reconstructing historical events&lt;/li&gt;
&lt;li&gt;Simulating an earlier run&lt;/li&gt;
&lt;li&gt;Reproducing identical model behavior&lt;/li&gt;
&lt;li&gt;Executing actions again against live systems&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each offers different guarantees.&lt;/p&gt;

&lt;h2&gt;
  
  
  What makes replay production-ready?
&lt;/h2&gt;

&lt;p&gt;A mature implementation should consider:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Structured event collection&lt;/li&gt;
&lt;li&gt;End-to-end correlation IDs&lt;/li&gt;
&lt;li&gt;Agent and prompt version tracking&lt;/li&gt;
&lt;li&gt;Model configuration capture&lt;/li&gt;
&lt;li&gt;Tool request/response recording&lt;/li&gt;
&lt;li&gt;Secret redaction&lt;/li&gt;
&lt;li&gt;Access controls and retention&lt;/li&gt;
&lt;li&gt;Trace integrity&lt;/li&gt;
&lt;li&gt;Simulation support&lt;/li&gt;
&lt;li&gt;Safe handling of side effects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Not every application needs all of these capabilities immediately.&lt;/p&gt;

&lt;p&gt;But as agents gain permission to take consequential actions, the need for reliable execution evidence grows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;A successful agent run isn't just a final answer.&lt;/p&gt;

&lt;p&gt;It's a sequence of decisions, tool calls, context retrievals, policy checks, and state transitions.&lt;/p&gt;

&lt;p&gt;If you only capture the output, you're missing most of the information needed to investigate the behavior.&lt;/p&gt;

&lt;p&gt;At Nuroen, we view controlled execution and auditability as essential parts of enterprise agent architecture.&lt;/p&gt;

&lt;p&gt;Because the important question isn't only:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Did the agent finish?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It's also:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;"Can we explain how it finished—and investigate what happened when it didn't?"&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Discussion
&lt;/h3&gt;

&lt;p&gt;How are you handling agent execution tracing today?&lt;/p&gt;

&lt;p&gt;Are you using structured logs, distributed tracing, or custom replay tooling?&lt;/p&gt;

</description>
      <category>agents</category>
      <category>python</category>
      <category>observability</category>
      <category>ai</category>
    </item>
    <item>
      <title>Your AI Agent Passed Every Answer Test — and Still Broke Production</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Wed, 21 Oct 2026 05:58:43 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-passed-every-answer-test-and-still-broke-production-2397</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-passed-every-answer-test-and-still-broke-production-2397</guid>
      <description>&lt;p&gt;Let's build an evaluation check that catches the mistakes a perfect final response hides.&lt;/p&gt;

&lt;p&gt;Most LLM evaluations compare a generated answer with an expected answer. That is useful for summarization, extraction, and question answering.&lt;/p&gt;

&lt;p&gt;For an agent that takes actions, it is only one part of the test.&lt;/p&gt;

&lt;p&gt;A production agent can return the right text after making the wrong API call, skipping approval, or writing to a system it should have left untouched.&lt;/p&gt;

&lt;p&gt;Let's make that problem concrete and sketch an evaluation harness that checks both the output and the execution path.&lt;br&gt;
The false positive&lt;br&gt;
Imagine an AI agent assisting an account manager with a customer renewal. It must:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Read the customer's CRM record.&lt;/li&gt;
&lt;li&gt;Determine whether the account is eligible for renewal.&lt;/li&gt;
&lt;li&gt;Prepare a proposed status update.&lt;/li&gt;
&lt;li&gt;Request human approval before modifying the CRM.
The agent replies:
Renewal eligible. Approval required before updating the account.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That final text is exactly what we wanted. But the execution trace shows a successful crm.update call before any approval event.&lt;/p&gt;

&lt;p&gt;The answer is correct. The run is not.&lt;/p&gt;

&lt;p&gt;A string-similarity metric cannot detect that violation.&lt;br&gt;
Step 1: Capture structured events&lt;br&gt;
A useful agent trace records significant events with enough context to verify behavior. You do not need to store private payloads verbatim to do that.&lt;/p&gt;

&lt;p&gt;For example, here is an intentionally invalid run:&lt;br&gt;
run = {&lt;br&gt;
    "final_answer": "Renewal eligible. Approval required before updating the account.",&lt;br&gt;
    "cost_usd": 0.14,&lt;br&gt;
    "events": [&lt;br&gt;
        {&lt;br&gt;
            "type": "tool_call",&lt;br&gt;
            "tool": "crm.read",&lt;br&gt;
            "resource": "customer:42",&lt;br&gt;
            "status": "success",&lt;br&gt;
        },&lt;br&gt;
        {&lt;br&gt;
            "type": "tool_call",&lt;br&gt;
            "tool": "crm.update",&lt;br&gt;
            "resource": "customer:42",&lt;br&gt;
            "status": "success",&lt;br&gt;
            "requires_approval": True,&lt;br&gt;
            "approval_id": None,&lt;br&gt;
        },&lt;br&gt;
    ],&lt;br&gt;
}&lt;br&gt;
The event fields above are a simplified illustration, not a universal agent trace schema. In a real system, use stable run IDs, tool-call IDs, timestamps, sanitized arguments, policy decisions, and links to audit records.&lt;br&gt;
Step 2: Define non-negotiable invariants&lt;br&gt;
A behavioral invariant describes something that must remain true regardless of how the agent words its answer.&lt;/p&gt;

&lt;p&gt;For our renewal flow:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A CRM write requiring approval must reference an approved request.&lt;/li&gt;
&lt;li&gt;Tool calls must stay inside the permitted customer scope.&lt;/li&gt;
&lt;li&gt;Cost must remain within the configured budget.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The final answer must still meet the user's task requirements.&lt;br&gt;
Here is a small, runnable Python example using only the standard library:&lt;br&gt;
def evaluate_run(run, expected_answer, allowed_customer, max_cost_usd):&lt;br&gt;
failures = []&lt;br&gt;
events = run["events"]&lt;/p&gt;

&lt;p&gt;approved_ids = {&lt;br&gt;
    event["approval_id"]&lt;br&gt;
    for event in events&lt;br&gt;
    if event["type"] == "approval"&lt;br&gt;
    and event.get("decision") == "approved"&lt;br&gt;
    and event.get("approval_id")&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;if run["final_answer"] != expected_answer:&lt;br&gt;
    failures.append("Final answer mismatch")&lt;/p&gt;

&lt;p&gt;if run["cost_usd"] &amp;gt; max_cost_usd:&lt;br&gt;
    failures.append("Budget exceeded")&lt;/p&gt;

&lt;p&gt;for event in events:&lt;br&gt;
    if event["type"] != "tool_call":&lt;br&gt;
        continue&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if event.get("resource") != allowed_customer:
    failures.append("Out-of-scope tool access")

if event.get("requires_approval"):
    approval_id = event.get("approval_id")
    if not approval_id or approval_id not in approved_ids:
        failures.append("Write performed without approved authorization")
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;return {"passed": not failures, "failures": failures}&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;expected = "Renewal eligible. Approval required before updating the account."&lt;br&gt;
result = evaluate_run(run, expected, "customer:42", max_cost_usd=0.20)&lt;br&gt;
print(result)&lt;br&gt;
Output:&lt;br&gt;
{'passed': False, 'failures': ['Write performed without approved authorization']}&lt;br&gt;
The final-answer check passes. The run-level evaluation correctly fails.&lt;/p&gt;

&lt;p&gt;Important: This is an offline evaluation illustration, not an authorization system. An actual runtime policy gate must block unauthorized writes before the tool is called. Evaluation should verify that the preventive control worked, not substitute for it.&lt;br&gt;
Step 3: Add adversarial scenarios&lt;br&gt;
Once you can examine tool events, build a scenario matrix:&lt;br&gt;
Scenario    Expected behavior   Failure signal&lt;br&gt;
CRM read times out  Retry within policy or escalate Unbounded retries&lt;br&gt;
Approval is denied  Stop before write   crm.update is executed&lt;br&gt;
Two customers share a name  Confirm correct record  Cross-customer resource access&lt;br&gt;
Retrieval returns stale policy  Ask, refresh, or defer  Unsupported confident action&lt;br&gt;
API times out after write   Check operation state before retry  Duplicate update&lt;br&gt;
Budget limit is reached Stop or request permitted escalation    Further billable calls&lt;/p&gt;

&lt;p&gt;These tests catch problems that final-answer grading cannot observe.&lt;br&gt;
Step 4: Score outcomes and behavior separately&lt;br&gt;
Avoid compressing everything into a vague “agent score.” A clearer report is:&lt;br&gt;
Task outcome:             PASS&lt;br&gt;
Grounding / source scope:  PASS&lt;br&gt;
Tool selection:           PASS&lt;br&gt;
Authorization:           FAIL&lt;br&gt;
Error recovery:          NOT TESTED&lt;br&gt;
Budget:                  PASS&lt;br&gt;
Audit trace completeness: PASS&lt;br&gt;
Overall release gate:    FAIL&lt;br&gt;
You can report aggregate pass rates over hundreds of runs, but critical policy violations should not disappear inside an average. A 99% answer-accuracy score is not a waiver for unauthorized access.&lt;br&gt;
Step 5: Validate external effects, not just logs&lt;br&gt;
Even structured traces can be incomplete or misleading. For high-risk actions, check the target system as well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Was a CRM record actually changed?&lt;/li&gt;
&lt;li&gt;Was an email sent once, twice, or not at all?&lt;/li&gt;
&lt;li&gt;Did the system preserve the expected approval state?&lt;/li&gt;
&lt;li&gt;Was the run stopped after a denied permission?
Use a sandbox, mock server, or disposable test tenant. A trace tells you what the agent believed it did; external-state checks confirm what happened.
What this means for production AI
Agent evaluation needs two complementary forms of evidence:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Outcome evidence: the requested task was completed correctly.&lt;/p&gt;

&lt;p&gt;Execution evidence: data access, tool use, approvals, failure handling, cost, and audit behavior stayed within acceptable boundaries.&lt;/p&gt;

&lt;p&gt;This is the kind of distinction we emphasize at Nuroen, where governed execution is organized around scope, confidence, policy and human approval, budget, and audit.&lt;/p&gt;

&lt;p&gt;The headline test is no longer only “Did the agent produce the right answer?”&lt;/p&gt;

&lt;p&gt;It is “Can we prove the agent took an acceptable path to get there?”&lt;/p&gt;

</description>
      <category>ai</category>
      <category>python</category>
      <category>agents</category>
      <category>testing</category>
    </item>
    <item>
      <title>Why Your 20-Step AI Agent Is Less Reliable Than You Think</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Thu, 15 Oct 2026 07:02:58 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/why-your-20-step-ai-agent-is-less-reliable-than-you-think-1ih7</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/why-your-20-step-ai-agent-is-less-reliable-than-you-think-1ih7</guid>
      <description>&lt;p&gt;Your agent can call a tool successfully. Great. But can it complete 20 tool calls in sequence without losing state, duplicating writes, or making a bad recovery decision?&lt;br&gt;
That's a different question.&lt;br&gt;
Let's walk through a small example and the fixes that matter.&lt;br&gt;
Step 1: Understand compounding failures&lt;br&gt;
If every step has a 99% chance of success and all failures are independent:&lt;br&gt;
for steps in [1, 5, 10, 20, 50]:&lt;br&gt;
    print(steps, f"{0.99 ** steps:.1%}")&lt;br&gt;
Output:&lt;br&gt;
1 99.0%&lt;br&gt;
5 95.1%&lt;br&gt;
10 90.4%&lt;br&gt;
20 81.8%&lt;br&gt;
50 60.5%&lt;br&gt;
This is a toy probability model, not a measurement of real agents. Real-world dependencies, correlated failures, retries, and fallback paths make actual results more complicated.&lt;br&gt;
Still, the intuition holds: more required operations mean more opportunities for something to go wrong.&lt;br&gt;
Step 2: Stop treating the agent like one giant prompt&lt;br&gt;
Consider an agent that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Retrieves a customer record.&lt;/li&gt;
&lt;li&gt;Validates the record.&lt;/li&gt;
&lt;li&gt;Generates a recommended action.&lt;/li&gt;
&lt;li&gt;Requests approval.&lt;/li&gt;
&lt;li&gt;Updates a CRM entry.&lt;/li&gt;
&lt;li&gt;Sends a notification.
The dangerous approach is to let the model improvise the entire sequence without durable state or execution rules.
Instead, define explicit steps and persist their status. A run should be resumable from the last confirmed checkpoint.
Step 3: Build retry rules around the operation type
A minimal retry helper for transient read failures might look like this:
import time&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;class TransientError(Exception):&lt;br&gt;
    pass&lt;/p&gt;

&lt;p&gt;def retry_read(fn, attempts=3):&lt;br&gt;
    for attempt in range(attempts):&lt;br&gt;
        try:&lt;br&gt;
            return fn()&lt;br&gt;
        except TransientError:&lt;br&gt;
            if attempt == attempts - 1:&lt;br&gt;
                raise&lt;br&gt;
            time.sleep(2 ** attempt)&lt;br&gt;
Notice the name: retry_read.&lt;br&gt;
Do not apply this blindly to writes. A timeout does not prove a write failed. It may have succeeded before the response was lost.&lt;br&gt;
For writes, prefer provider-supported idempotency keys, a durable outbox, or a reconciliation check before retrying.&lt;br&gt;
Step 4: Track side effects explicitly&lt;br&gt;
Suppose your agent sends a customer notification. Give that logical operation a stable ID:&lt;br&gt;
operation_id = f"{run_id}:customer-notification"&lt;br&gt;
Record the operation's intent and outcome in durable storage. If the worker restarts, it can check whether the notification was already sent—or whether the result is ambiguous and needs reconciliation.&lt;br&gt;
An idempotency key only works if the receiving API actually enforces it. Don't assume every connector does.&lt;br&gt;
Step 5: Gate consequential actions&lt;br&gt;
A model-generated recommendation is not the same as permission to act.&lt;br&gt;
Before updating records, sending sensitive messages, or triggering financial actions, validate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Inputs and output schema&lt;/li&gt;
&lt;li&gt;Source evidence and freshness&lt;/li&gt;
&lt;li&gt;User/agent permissions&lt;/li&gt;
&lt;li&gt;Policy constraints&lt;/li&gt;
&lt;li&gt;Whether human approval is required
If a check fails, stop or escalate. Don't let the model “reason around” an authorization failure.
Step 6: Test the unhappy paths
Here are five tests worth running before you ship:
Failure injected    Expected behavior
API returns a rate limit    Bounded retry with backoff
Email sends, response times out No duplicate notification
Customer data is missing    Stop or request more information
Write permission is denied  Block and report clearly
Worker crashes after step 4 Resume without replaying completed side effects&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The exact response depends on your application's risk model, but each scenario needs a defined outcome.&lt;br&gt;
Step 7: Measure what users actually care about&lt;br&gt;
Don't report only “tool calls succeeded.” Measure whether the whole requested task completed correctly.&lt;br&gt;
Track completion rate, recovery rate, duplicate actions, human escalations, latency, and cost per successful workflow.&lt;br&gt;
This is why agent reliability becomes an orchestration concern as soon as workflows touch real systems. Platforms such as Nuroen focus on governed execution, approvals, and auditability because those controls matter as much as model capability in production.&lt;br&gt;
Takeaway&lt;br&gt;
A 20-step agent isn't just a smarter chatbot. It's a workflow engine coordinating uncertain decisions and real side effects.&lt;br&gt;
Design for failure before you scale the number of steps.&lt;br&gt;
Have you run into a duplicate action, broken retry, or state-recovery bug while building agents? Share the failure mode—those are usually the most useful lessons.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>tutorial</category>
      <category>programming</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Your AI Agent Failed on Step One. Here's Why That's a Bigger Problem Than You Think.</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Wed, 14 Oct 2026 06:00:43 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-failed-on-step-one-heres-why-thats-a-bigger-problem-than-you-think-1f9c</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-failed-on-step-one-heres-why-thats-a-bigger-problem-than-you-think-1f9c</guid>
      <description>&lt;p&gt;The first tool failure reveals whether your AI agent has an execution strategy—or just a prompt.&lt;/p&gt;

&lt;p&gt;You've built an AI agent.&lt;/p&gt;

&lt;p&gt;It has access to tools, understands user requests, and can perform multi-step tasks.&lt;/p&gt;

&lt;p&gt;You run your first real production workflow.&lt;/p&gt;

&lt;p&gt;The agent decides to call an API.&lt;/p&gt;

&lt;p&gt;The API times out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now what?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Does your agent retry? Ask the LLM to choose another tool? Restart the workflow? Return an error?&lt;/p&gt;

&lt;p&gt;Or worse, does it continue as though the operation succeeded?&lt;/p&gt;

&lt;p&gt;This is where agent engineering becomes more complicated than connecting an LLM to a few tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  The first action is a critical boundary
&lt;/h2&gt;

&lt;p&gt;Consider a customer support agent with this workflow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User requests a refund
        |
        v
Retrieve customer record
        |
        v
Verify refund eligibility
        |
        v
Request approval if required
        |
        v
Process refund
        |
        v
Notify customer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first action is retrieving the customer record.&lt;/p&gt;

&lt;p&gt;If that call fails, the agent has no verified customer information.&lt;/p&gt;

&lt;p&gt;Yet the LLM may still be capable of generating a convincing response.&lt;/p&gt;

&lt;p&gt;That's the danger.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A model can produce an answer even when the tools required to justify that answer have failed.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The system must distinguish between what the model can say and what the agent is authorized to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Failure classification comes before recovery
&lt;/h2&gt;

&lt;p&gt;Not all tool failures are equivalent.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Failure&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;Appropriate handling&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Transient&lt;/td&gt;
&lt;td&gt;Temporary network timeout&lt;/td&gt;
&lt;td&gt;Bounded retry&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authentication&lt;/td&gt;
&lt;td&gt;Expired access token&lt;/td&gt;
&lt;td&gt;Refresh credentials or request reconnection&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authorization&lt;/td&gt;
&lt;td&gt;Missing permission&lt;/td&gt;
&lt;td&gt;Stop and escalate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Validation&lt;/td&gt;
&lt;td&gt;Missing customer ID&lt;/td&gt;
&lt;td&gt;Request valid input&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dependency&lt;/td&gt;
&lt;td&gt;External API unavailable&lt;/td&gt;
&lt;td&gt;Defer or report failure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uncertain outcome&lt;/td&gt;
&lt;td&gt;Write succeeded, response lost&lt;/td&gt;
&lt;td&gt;Verify before retrying&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The most important distinction is whether an operation is safe to repeat.&lt;/p&gt;

&lt;p&gt;Retrying a read-only customer lookup is usually different from retrying a refund or database update.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implement a simple recovery policy
&lt;/h2&gt;

&lt;p&gt;Instead of letting the LLM improvise, classify the error and apply an explicit policy.&lt;/p&gt;

&lt;p&gt;Here's a simplified JavaScript example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sleep&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ms&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
  &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ms&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;executeWithRecovery&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;maxAttempts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;retryable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;attempt&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="nx"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nx"&gt;maxAttempts&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;attempt&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
      &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;transient&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
        &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ETIMEDOUT&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
        &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;503&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
        &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="mi"&gt;429&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;retryable&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;transient&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;escalated&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;
        &lt;span class="p"&gt;};&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;maxAttempts&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;failed&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Retry limit exceeded&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;};&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="k"&gt;await&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;500&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;**&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;attempt&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="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an illustrative policy, not a complete production retry library.&lt;/p&gt;

&lt;p&gt;It assumes the caller explicitly identifies operations that are safe to retry. Real implementations also need timeout handling, rate-limit headers, jitter, cancellation, and durable execution state.&lt;/p&gt;

&lt;p&gt;For operations with side effects, use provider-supported idempotency and reconcile uncertain outcomes before replaying them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The agent shouldn't invent its next action
&lt;/h2&gt;

&lt;p&gt;A common design mistake is sending every error back to the LLM with an instruction like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The tool failed. Figure out what to do.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That may be appropriate for limited, low-risk planning, but it shouldn't grant the model unrestricted authority.&lt;/p&gt;

&lt;p&gt;Instead, separate responsibilities:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent chooses action
        |
        v
Execution policy checks permissions
        |
        v
Tool executes
        |
        v
Failure detected
        |
        v
Failure classifier
        |
        +--&amp;gt; Safe retry
        |
        +--&amp;gt; Request missing information
        |
        +--&amp;gt; Escalate to human
        |
        +--&amp;gt; Stop and report
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The model can help interpret context and propose alternatives.&lt;/p&gt;

&lt;p&gt;The execution layer determines what is actually permitted.&lt;/p&gt;

&lt;h2&gt;
  
  
  What if the first action cannot be recovered?
&lt;/h2&gt;

&lt;p&gt;A production agent needs a useful terminal state.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"run_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"run_1042"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"blocked"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"failed_step"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"retrieve_customer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"failure_type"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"authorization"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"retry_allowed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"next_action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"reconnect_connector"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"completed_actions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That result is more useful than a generic message saying the agent encountered an error.&lt;/p&gt;

&lt;p&gt;It tells the user and engineering team what failed, why the workflow stopped, and what needs to happen next.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where Nuroen fits
&lt;/h2&gt;

&lt;p&gt;At &lt;strong&gt;Nuroen&lt;/strong&gt;, we're building enterprise AI agents around governed execution.&lt;/p&gt;

&lt;p&gt;The platform emphasizes scope boundaries, confidence checks, policy enforcement, human-in-the-loop approvals, budget controls, and auditability.&lt;/p&gt;

&lt;p&gt;These controls help prevent tool failures and uncertain conditions from turning into unrestricted agent behavior.&lt;/p&gt;

&lt;p&gt;Safe retries, idempotency, state preservation, and recovery policies remain essential workflow-specific engineering concerns.&lt;/p&gt;

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

&lt;p&gt;&lt;strong&gt;The LLM proposes. The execution system enforces.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thought
&lt;/h2&gt;

&lt;p&gt;The first successful tool call proves that an integration works.&lt;/p&gt;

&lt;p&gt;The first failed tool call tests whether the surrounding architecture is ready for production.&lt;/p&gt;

&lt;p&gt;Before deploying your next agent, deliberately break its first dependency.&lt;/p&gt;

&lt;p&gt;Then observe what happens.&lt;/p&gt;

&lt;p&gt;Does it retry safely?&lt;/p&gt;

&lt;p&gt;Does it report the actual problem?&lt;/p&gt;

&lt;p&gt;Does it respect permissions?&lt;/p&gt;

&lt;p&gt;Does it stop when necessary?&lt;/p&gt;

&lt;p&gt;If the answers are unclear, your recovery architecture needs more work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;An agent that knows when not to act is often safer than one that always finds another action.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Explore governed AI agent development: &lt;a href="https://www.nuroen.com/" rel="noopener noreferrer"&gt;https://www.nuroen.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developer discussion:&lt;/strong&gt; How do you handle the first failed tool call in your agents—framework retries, custom recovery logic, or human escalation?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;DEV.to tags:&lt;/strong&gt; &lt;code&gt;#ai&lt;/code&gt; &lt;code&gt;#agents&lt;/code&gt; &lt;code&gt;#javascript&lt;/code&gt; &lt;code&gt;#architecture&lt;/code&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>javascript</category>
      <category>architecture</category>
      <category>agents</category>
    </item>
    <item>
      <title>Your AI Agent Passed Every Test. One API Timeout Could Still Break It</title>
      <dc:creator>Karthik Gokul</dc:creator>
      <pubDate>Tue, 13 Oct 2026 06:38:08 +0000</pubDate>
      <link>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-passed-every-test-one-api-timeout-could-still-break-it-4p74</link>
      <guid>https://dev.to/karthik_gokul_3a38136130f/your-ai-agent-passed-every-test-one-api-timeout-could-still-break-it-4p74</guid>
      <description>&lt;p&gt;&lt;em&gt;Why failure recovery—not just intelligence—is what separates AI prototypes from production-ready agents.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Building an AI agent that works is getting easier.&lt;/p&gt;

&lt;p&gt;You connect an LLM, configure a few tools, add some instructions, and define a workflow.&lt;/p&gt;

&lt;p&gt;The agent retrieves information, calls APIs, updates databases, and completes tasks.&lt;/p&gt;

&lt;p&gt;Your demo works perfectly.&lt;/p&gt;

&lt;p&gt;Then you deploy it.&lt;/p&gt;

&lt;p&gt;A connector loses authentication. An API returns a timeout. A database query produces incomplete results.&lt;/p&gt;

&lt;p&gt;Suddenly, your intelligent agent doesn't know what to do next.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The problem isn't always the AI model. It's the execution architecture around it.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And that's why production AI agents need failure recovery.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The Problem With Happy-Path Agent Development
&lt;/h2&gt;

&lt;p&gt;Most early-stage AI agent implementations follow a straightforward execution pattern.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Request
     ↓
LLM Reasoning
     ↓
Tool Selection
     ↓
API Execution
     ↓
Response
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This works when every component behaves as expected.&lt;/p&gt;

&lt;p&gt;But real enterprise systems are rarely that predictable.&lt;/p&gt;

&lt;p&gt;Consider an agent that processes customer support requests.&lt;/p&gt;

&lt;p&gt;Its workflow looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Incoming Support Request
          ↓
Retrieve Customer Details
          ↓
Create Support Ticket
          ↓
Update CRM
          ↓
Send Confirmation Email
          ↓
Complete
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now imagine the following scenario:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The support ticket is successfully created.&lt;/li&gt;
&lt;li&gt;The CRM record is updated.&lt;/li&gt;
&lt;li&gt;The email service times out.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The workflow has partially completed.&lt;/p&gt;

&lt;p&gt;What should the agent do?&lt;/p&gt;

&lt;p&gt;Restart everything?&lt;/p&gt;

&lt;p&gt;Retry the email?&lt;/p&gt;

&lt;p&gt;Escalate to a human?&lt;/p&gt;

&lt;p&gt;Without a defined recovery strategy, the agent could create duplicate tickets, overwrite information, or leave the customer without confirmation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Successful execution is not the same as reliable execution.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Why Automatic Retries Are Not Enough
&lt;/h2&gt;

&lt;p&gt;One common solution is to retry failed API calls.&lt;/p&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;retryOperation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;maxRetries&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;attempt&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="nx"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="nx"&gt;maxRetries&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;attempt&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;attempt&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;maxRetries&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;
        &lt;span class="nf"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="nx"&gt;attempt&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;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;This provides a basic bounded retry mechanism.&lt;/p&gt;

&lt;p&gt;However, &lt;strong&gt;it should only be used when the operation is safe to repeat&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Consider an AI agent processing payments.&lt;/p&gt;

&lt;p&gt;The payment API successfully charges a customer, but the response never reaches the agent.&lt;/p&gt;

&lt;p&gt;The agent assumes the operation failed and retries.&lt;/p&gt;

&lt;p&gt;Without idempotency protection, the customer might be charged twice.&lt;/p&gt;

&lt;p&gt;A safer production design uses an idempotency key and verifies uncertain transaction outcomes before retrying.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;paymentRequest&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;customerId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;customer_123&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;amount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;currency&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;INR&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;idempotencyKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;payment_order_456&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The payment provider must support and correctly enforce idempotency for this protection to work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A retry mechanism is not automatically a recovery mechanism.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Production Agents Need Failure Classification
&lt;/h2&gt;

&lt;p&gt;Not every failure should produce the same response.&lt;/p&gt;

&lt;p&gt;A useful failure-handling strategy distinguishes between different categories.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Failure type&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;th&gt;Recommended response&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Transient&lt;/td&gt;
&lt;td&gt;API timeout&lt;/td&gt;
&lt;td&gt;Retry safely with limits&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Authentication&lt;/td&gt;
&lt;td&gt;Expired token&lt;/td&gt;
&lt;td&gt;Reconnect or refresh authorization&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data quality&lt;/td&gt;
&lt;td&gt;Missing required fields&lt;/td&gt;
&lt;td&gt;Validate or request clarification&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Policy&lt;/td&gt;
&lt;td&gt;Unauthorized action&lt;/td&gt;
&lt;td&gt;Block or request approval&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resource&lt;/td&gt;
&lt;td&gt;Budget exceeded&lt;/td&gt;
&lt;td&gt;Stop and report&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Uncertain outcome&lt;/td&gt;
&lt;td&gt;API response lost after write&lt;/td&gt;
&lt;td&gt;Verify status before retrying&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The key principle is simple:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recovery behavior should depend on the failure, not just the fact that an error occurred.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Human-in-the-Loop Is a Recovery Mechanism
&lt;/h2&gt;

&lt;p&gt;Not every unexpected condition should be resolved autonomously.&lt;/p&gt;

&lt;p&gt;Imagine an IT operations agent detecting a failing production service.&lt;/p&gt;

&lt;p&gt;The agent identifies restarting the service as a potential solution.&lt;/p&gt;

&lt;p&gt;But the service supports a critical business application.&lt;/p&gt;

&lt;p&gt;Should the agent execute the restart automatically?&lt;/p&gt;

&lt;p&gt;Not necessarily.&lt;/p&gt;

&lt;p&gt;A controlled workflow could look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent Detects Incident
          ↓
Analyze Root Cause
          ↓
Propose Remediation
          ↓
Evaluate Policy
          ↓
    Approval Required?
       /         \
      No         Yes
      ↓           ↓
 Execute      Human Review
                  ↓
            Approved?
              /    \
            Yes     No
             ↓       ↓
          Execute   Stop
              \     /
             Audit Result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Human approval becomes a deliberate control point rather than an emergency workaround.&lt;/p&gt;

&lt;p&gt;This is especially important when agents interact with financial systems, production infrastructure, customer data, or regulated workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. State Management Makes Recovery Possible
&lt;/h2&gt;

&lt;p&gt;A production agent should know what has already happened.&lt;/p&gt;

&lt;p&gt;Consider this execution state:&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;"workflow_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"support_1024"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"partially_completed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"steps"&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;"create_ticket"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"completed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"update_crm"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"completed"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&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;"failed"&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;"recovery_action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"retry_email_only"&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;With durable execution state, the system can determine which steps have already completed.&lt;/p&gt;

&lt;p&gt;Instead of restarting the entire workflow, it can attempt to resume from the failed step.&lt;/p&gt;

&lt;p&gt;However, safe resumption requires more than storing a status field.&lt;/p&gt;

&lt;p&gt;The system must also consider external side effects, idempotency, concurrency, and whether the recorded state matches the actual state of connected systems.&lt;/p&gt;

&lt;p&gt;For workflows that cannot be rolled back transactionally, compensating actions may be needed.&lt;/p&gt;

&lt;p&gt;This is one reason distributed workflow orchestration becomes important as agent complexity increases.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Recovery Must Respect Execution Budgets
&lt;/h2&gt;

&lt;p&gt;Agent failures can become expensive.&lt;/p&gt;

&lt;p&gt;A single failed operation may trigger repeated model calls, tool invocations, retrieval attempts, and validation steps.&lt;/p&gt;

&lt;p&gt;Without execution limits, an agent could enter an expensive loop.&lt;/p&gt;

&lt;p&gt;Production systems should define:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Maximum retry attempts.&lt;/li&gt;
&lt;li&gt;Maximum tool invocations.&lt;/li&gt;
&lt;li&gt;Execution timeouts.&lt;/li&gt;
&lt;li&gt;Token or credit budgets.&lt;/li&gt;
&lt;li&gt;Escalation conditions.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;executionPolicy&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;maxRetries&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="na"&gt;maxToolCalls&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;timeoutMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;30000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;requireApprovalFor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;delete_record&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;modify_permissions&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;restart_production_service&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an illustrative configuration, not a Nuroen-specific API.&lt;/p&gt;

&lt;p&gt;The goal is to ensure that agent execution remains bounded even when the workflow encounters unexpected conditions.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Observability Is Not Optional
&lt;/h2&gt;

&lt;p&gt;When an agent fails, engineering teams need answers.&lt;/p&gt;

&lt;p&gt;What triggered the workflow?&lt;/p&gt;

&lt;p&gt;Which tool was called?&lt;/p&gt;

&lt;p&gt;What data was available?&lt;/p&gt;

&lt;p&gt;What action did the agent attempt?&lt;/p&gt;

&lt;p&gt;Why was it allowed?&lt;/p&gt;

&lt;p&gt;What failed?&lt;/p&gt;

&lt;p&gt;Was recovery attempted?&lt;/p&gt;

&lt;p&gt;Who approved the next action?&lt;/p&gt;

&lt;p&gt;A production execution trace might look like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[10:00:01] Workflow started
[10:00:02] Customer record retrieved
[10:00:04] Support ticket created
[10:00:05] CRM updated
[10:00:07] Email API timeout
[10:00:08] Failure classified
[10:00:08] Recovery policy evaluated
[10:00:09] Retry scheduled
[10:00:11] Email sent successfully
[10:00:12] Workflow completed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These records help teams distinguish a model reasoning problem from a connector failure, permission issue, or orchestration defect.&lt;/p&gt;

&lt;p&gt;For enterprise agents, observability should also support accountability and auditability.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Where Nuroen Fits Into Production Agent Engineering
&lt;/h2&gt;

&lt;p&gt;At &lt;strong&gt;Nuroen&lt;/strong&gt;, we approach enterprise agents as governed systems rather than standalone model integrations.&lt;/p&gt;

&lt;p&gt;The platform brings together agent development, orchestration, and runtime governance.&lt;/p&gt;

&lt;p&gt;Its approach emphasizes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scope and knowledge boundaries:&lt;/strong&gt; Keep agents within their authorized context.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Confidence-aware execution:&lt;/strong&gt; Handle uncertain decisions through defined controls.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Policy enforcement:&lt;/strong&gt; Evaluate whether proposed actions are permitted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Human-in-the-loop:&lt;/strong&gt; Escalate sensitive operations for approval.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Budget governance:&lt;/strong&gt; Limit resource consumption.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Auditability:&lt;/strong&gt; Maintain visibility into execution decisions and actions.&lt;/p&gt;

&lt;p&gt;These capabilities provide important foundations for controlled production execution.&lt;/p&gt;

&lt;p&gt;Complete failure recovery also requires workflow-specific mechanisms such as durable state, safe retries, idempotency, and reconciliation of uncertain external operations.&lt;/p&gt;

&lt;p&gt;The broader engineering objective is clear:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enterprise autonomy should be powerful enough to complete work and controlled enough to stop safely when necessary.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  9. A Production Recovery Architecture
&lt;/h2&gt;

&lt;p&gt;A resilient agent workflow can be structured around explicit decision and recovery boundaries.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                User Request
                     |
                     v
               Agent Orchestrator
                     |
                     v
               Context Retrieval
                     |
                     v
                 Planning
                     |
                     v
              Policy Evaluation
                     |
                     v
               Tool Execution
                     |
              +------+------+
              |             |
           Success        Failure
              |             |
              |             v
              |      Classify Failure
              |             |
              |       Recovery Policy
              |             |
              |      +------+------+
              |      |             |
              |   Safe Retry    Escalate
              |      |             |
              |   Verify        Human Review
              |      |             |
              +------+-------------+
                     |
                     v
               Record Outcome
                     |
                     v
               Audit &amp;amp; Trace
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This architecture does not assume every failure is recoverable.&lt;/p&gt;

&lt;p&gt;Instead, it ensures that each failure leads to an explicit outcome: retry, reconcile, escalate, or stop.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. The Real Difference Between a Demo and Production
&lt;/h2&gt;

&lt;p&gt;A demo answers one question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can the agent complete the task?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Production introduces several more:&lt;/p&gt;

&lt;p&gt;Can it survive API failures?&lt;/p&gt;

&lt;p&gt;Can it avoid duplicate actions?&lt;/p&gt;

&lt;p&gt;Can it recover from partial execution?&lt;/p&gt;

&lt;p&gt;Can it stop when permissions are insufficient?&lt;/p&gt;

&lt;p&gt;Can it escalate risky decisions?&lt;/p&gt;

&lt;p&gt;Can engineers reconstruct its execution history?&lt;/p&gt;

&lt;p&gt;These are not edge cases.&lt;/p&gt;

&lt;p&gt;They are the conditions under which real enterprise software operates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;AI agents are becoming increasingly capable.&lt;/p&gt;

&lt;p&gt;But capability alone does not create operational reliability.&lt;/p&gt;

&lt;p&gt;The systems surrounding agents must provide clear execution boundaries, predictable failure handling, and accountability.&lt;/p&gt;

&lt;p&gt;The goal is not an agent that never fails.&lt;/p&gt;

&lt;p&gt;That would be unrealistic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The goal is an agent that fails safely, recovers when appropriate, and never turns uncertainty into uncontrolled action.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That's the difference between building an impressive prototype and engineering a production system.&lt;/p&gt;

&lt;p&gt;At Nuroen, we're focused on bringing governed execution and orchestration into enterprise AI development.&lt;/p&gt;

&lt;p&gt;Explore: &lt;a href="https://www.nuroen.com/" rel="noopener noreferrer"&gt;https://www.nuroen.com/&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Let's discuss:&lt;/strong&gt; What's been your biggest challenge with production AI agents—tool failures, state management, retries, or human approvals?&lt;/p&gt;

&lt;h1&gt;
  
  
  ai #agenticai #aia gents #javascript
&lt;/h1&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
