Urgent.News

What's breaking now, across thousands of outlets.

AI

From Demo to Production: The Guardrails That Make an AI Agent Safe to Ship

From Demo to Production: The Guardrails That Make an AI Agent Safe to Ship Hook: Most "AI agents" you see on the internet are demos. Here's the single most common reason they never reach production — and a small, open-source harness that gets past it. We are past the phase where the hard part of building an AI agent was calling the model. The hard part now is the 10% nobody talks about: what…

Title: Guardrails That Make AI Agents Production-Ready

Most AI agents you see online are demos. The hard part of building an AI agent is ensuring it is safe for production use. As someone who built and ran a 25-agent platform at Microsoft and now helps teams deploy agent ideas, I can confirm that the difference between a weekend project and a system ready for customers is three essential elements: output quality grading, human approval, and model-agnostic providers.

The quality gate ensures that an agent's output is graded before it is shipped. In the harness, this is a pluggable QualityGate that can be swapped with an LLM judge or a test suite. If the gate fails, the loop refuses to execute and logs the block, which can be tracked in production observability stacks. The quality gate rejects 12% of agent proposals, demonstrating its effectiveness in maintaining safety.

The approval gate is the step that often gets overlooked in enterprises. When an agent wants to perform critical actions like expediting an order or canceling a subscription, it must ask a human for approval. Silence is not consent. By implementing an ApprovalGate, the agent is routed through a human review process, creating an audit trail that helps compliance teams understand who made changes and why. In the scaffold, marking a tool as needing_approval = True routes it through the approval gate.

The third element is model-agnostic providers. AI agent loops should never know which vendor they are talking to, as models and prices change frequently. The harness provides a ModelProvider protocol that allows an agent to communicate with various models, such as OpenAI, Azure OpenAI, DeepSeek, or Qwen, simply by changing the configuration.

A MockProvider can be used for offline testing without an API key. This flexibility is not only good engineering practice but also a cost-saving measure and a hedge against vendor instability.

Finally, business workflows should be modeled as state machines rather than a free-flowing chat loop. State machines help ensure that an agent does not stray from critical processes. For example, a purchase-order exception state machine is a common use case in supply chain and ERP copilot scenarios. By modeling the workflow explicitly, you can maintain control and prevent unintended actions.

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

从 Demo 到生产:那些真正让 AI Agent 敢上线的护栏

从 Demo 到生产:那些真正让 AI Agent 敢上线的护栏 开场钩子: 你在网上看到的多数「AI Agent」都是 demo。它们之所以上不了生产,原因往往 只有一个 —— 而下面这个开源的小脚手架,专门解决它。 我们已经过了「能调通大模型」就算赢的阶段。现在真正难的是那没人讲的 10%: 是什么阻止 Agent 做出伤害性的事? 我在微软跑过一套约 25 个 Agent…

Your agent's p99 is a different animal

Originally published on Loop & Retry — field notes on building LLM agents that survive production. The demo felt instant. The agent answered in about four seconds, every time you ran it on stage.

Why real-time AI at scale is so hard

Real-time AI at scale is harder than it looks. Pipelines that hum along in development routinely hit problems in production. The post Why real-time AI at scale is so hard appeared first on The New Stack .

More from Sunday 23 August →