Urgent.News

What's breaking now, across thousands of outlets.

AI

AI Agents Work in Demos. So Why Do They Fail in Production?

I've noticed something interesting about AI agent development. Building an agent that works in a demo is no longer particularly difficult. Connect an LLM to a few tools, give it a task, add some memory, and you can get something impressive running surprisingly quickly. But take that same agent into a real environment, and things become different. Sometimes it calls the wrong tool. Sometimes it…

Developing AI agents for demos has become relatively easy, but scaling them to real-world production environments presents significant challenges. While the initial agent may impress users with its capabilities, deploying it in a live setting often reveals new issues. One key problem is the leap from a controlled demo environment to a dynamic, real-world application.

Agents sometimes call the wrong tools, repeat actions, or become stuck on simple tasks. This highlights that the difficulty lies not just in the AI model itself, but in the underlying architecture designed to make the agent autonomous.

A common mistake in agent design is granting the model excessive control. While it can understand a request, make decisions, and execute tools, it's often better to separate these responsibilities. For instance, when handling customer refunds, the AI should recommend a refund, but the actual transaction should be managed by deterministic application logic that enforces business rules and verifies results. This approach simplifies debugging and reduces the risk of unintended actions.

Another issue arises when connecting APIs to the agent. Developers often underestimate the complexity of integrating with external systems. If an agent sends a payment request and the API times out, the agent may not know if the operation succeeded. Blindly retrying could lead to duplicate transactions. This is a distributed systems problem, requiring proper timeouts, bounded retries, idempotency keys, structured error handling, and execution tracking.

Memory management also poses challenges. Developers often assume that giving agents more historical context will make them smarter. However, irrelevant or outdated data can actually degrade decision-making. For a coding agent working with a large codebase, it's crucial to only retrieve relevant files, dependencies, and current implementation details. The focus should be on ensuring that the agent retrieves the right information at the right time, rather than simply increasing its memory capacity.

Finally, evaluation is an area where many overlook potential pitfalls. An agent completing a task doesn't necessarily mean it performed the task correctly. For example, a workflow that generates a report might use outdated information or violate data access policies. To truly assess an agent's performance, we need to evaluate more than just the final response.

This includes checking task correctness, tool execution, unnecessary retries, latency, token usage, and adherence to safety protocols. Importantly, evaluation should involve an independent verification process, not solely relying on the same AI model that performed the task.

Before deploying an agent in production, several critical questions should be addressed. What happens when an API fails? Can the agent prevent irreversible actions? Who validates the agent's decisions? Can we track and reconstruct the agent's execution history? And how does the agent handle incorrect retrieved context? Does it recognize when to seek human intervention?

While these questions may not make for a compelling demo, they are essential for ensuring the agent's reliability and safety in a production environment. The ultimate goal is to balance the benefits of AI autonomy with the need for robust, reliable, and safe execution.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

How to Give an AI Agent a Spending Limit (and the Tools That Do It)

Quick answer: There are four ways to cap what an AI agent can spend: give it a virtual card with network-enforced limits (Stripe Issuing for agents); give it a wallet with per-transaction and…

  • Four main methods to cap AI agent spending: virtual cards, wallets, policy layers, x402
  • Virtual cards through Stripe enforce limits per authorization or time period
  • Wallets like Coinbase Agentic Wallets set per-transaction and per-session caps

GPT-6 Astra Passed 69.9% of Hidden Checks. It Fully Finished 26.4% of Real Edit Tasks

Book: Ship It — the pragmatic startup tech stack Also by me: Thinking in Go (2-book series) — Complete Guide to Go Programming + Hexagonal Architecture in Go My project: Hermes IDE | GitHub — an IDE…

  • GPT-6 Astra achieved 69.9% success in hidden acceptance checks
  • 26.4% of tasks fully passed real edit tasks
  • Co-Design Bench paper submitted to arXiv on October 26

Claude Meets Copilot Studio

This is the one I've been building toward. Over the last few posts we deployed Claude in Microsoft Foundry, said hello to it from code, and taught it to turn a messy support ticket into clean…

  • Claude model integrated into Microsoft Copilot Studio
  • Admin enables Anthropic models in Microsoft 365 Admin Center
  • Agent created with system prompt and knowledge sources

Write a Claude Code skill in 10 minutes

Written by an AI agent (Claude), posted from its operator's account. Field names and behaviour were checked against the official Claude Code skills docs; I could not run the example on a live install…

  • Create a folder with SKILL.md file
  • Add YAML frontmatter in SKILL.md
  • Specify name, description, arguments

More from Sunday 8 November →