{
  "id": 2814362,
  "title": "从 Demo 到生产：那些真正让 AI Agent 敢上线的护栏",
  "url": "https://urgent.news/2026/08/23/demo-ai-agent",
  "topic": "ai",
  "section": "AI",
  "published": "2026-08-23T15:41:42.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/sunny_1024k/cong-demo-dao-sheng-chan-na-xie-zhen-zheng-rang-ai-agent-gan-shang-xian-de-hu-lan-3p6e"
  },
  "original_language": "zh",
  "account": "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.\n\nThe 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.\n\nAn 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.\n\nTo 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.\n\nFinally, 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.\n\nOverall, 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.",
  "summary": "从 Demo 到生产：那些真正让 AI Agent 敢上线的护栏 开场钩子： 你在网上看到的多数「AI Agent」都是 demo。它们之所以上不了生产，原因往往 只有一个 —— 而下面这个开源的小脚手架，专门解决它。 我们已经过了「能调通大模型」就算赢的阶段。现在真正难的是那没人讲的 10%： 是什么阻止 Agent 做出伤害性的事？ 我在微软跑过一套约 25 个 Agent 的生产平台，现在也帮团队把 Agent 从笔记本推进到真实用户面前。两边的体会是一致的。 一个不太舒服的真相：能调 5 个工具的聊天机器人， 不是产品 。周末项目和你敢放到客户面前的 系统之间，差的只有三件事 —— 而且全都是不酷、不性感的工程： 你怎么给输出质量打分 （质量门）。 你怎么决定什么时候必须人签字 （审批门）。 你如何让整套东西模型无关 ，不被某个厂商锁死。 所以我写了一个很小的…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}