Urgent.News

What's breaking now, across thousands of outlets.

AI

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

从 Demo 到生产:那些真正让 AI Agent 敢上线的护栏 开场钩子: 你在网上看到的多数「AI Agent」都是 demo。它们之所以上不了生产,原因往往 只有一个 —— 而下面这个开源的小脚手架,专门解决它。 我们已经过了「能调通大模型」就算赢的阶段。现在真正难的是那没人讲的 10%: 是什么阻止 Agent 做出伤害性的事? 我在微软跑过一套约 25 个 Agent 的生产平台,现在也帮团队把 Agent 从笔记本推进到真实用户面前。两边的体会是一致的。 一个不太舒服的真相:能调 5 个工具的聊天机器人, 不是产品 。周末项目和你敢放到客户面前的 系统之间,差的只有三件事 —— 而且全都是不酷、不性感的工程: 你怎么给输出质量打分 (质量门)。 你怎么决定什么时候必须人签字 (审批门)。 你如何让整套东西模型无关 ,不被某个厂商锁死。 所以我写了一个很小的…

The article discusses the key barriers that hinder AI agents from moving from a demo phase to production. It emphasizes that simply being able to connect to a large language model is no longer sufficient. The main challenges identified are quality assurance, approval processes, model neutrality, and defining the agent's workflow as a state machine rather than a chat loop.

The article presents an open-source scaffolding framework to address these issues. It introduces a QualityGate, an EvalReport class, and a QualityGate class to enforce predefined quality standards before allowing the agent to proceed. The QualityGate can be swapped out for alternative evaluation methods like LLM judges or test suites.

An ApprovalGate is also provided to handle human approval steps for sensitive actions like expediting orders or canceling subscriptions. The gate logs the approval decision and provides an audit trail for compliance purposes. The approval process can be triggered by marking actions as needing_approval=True.

To ensure model neutrality, the framework abstracts the model provider interface. Agents can be initialized with different model providers such as OpenAI, DeepSeek, or Qwen without modifying the core agent logic. A default provider with the OpenAI API is included, along with options for mock providers to run the agent locally without requiring API keys.

Finally, the article advocates for modeling business workflows as explicit state machines rather than free-form chat interactions. By defining clear state transitions and reasons for each transition, the agent's behavior becomes more predictable and auditable. The state machine example provided demonstrates the typical flow of a purchase order through states like OPEN, EXPEDITED, CANCELLED, EXECUTED, and CLOSED.

Overall, the scaffolding framework aims to provide a structured foundation for developing production-ready AI agents by addressing the three core challenges: quality assurance, approval processes, and model neutrality. By enforcing these principles, the framework helps ensure that AI agents can safely and reliably move from demonstration to real-world deployment.

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

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.

  • Output quality grading ensures safe shipping of AI agents
  • Human approval gate prevents unsafe actions without consent
  • Model-agnostic providers allow flexibility across multiple models

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.

More from Sunday 23 August →