调试 AI Agent 的一个月:我如何构建了 10 个 Agent,以及我为什么不得不删除它
1 分•作者: xor01•8 个月前
想象一下,你雇佣了 10 位专家,给他们 1000 行的指令,结果得到的却是混乱而不是协同工作。欢迎来到我构建 AI 智能体框架的这个月。<p>我的目标是雄心勃勃:一个完全自主的系统,其中由 AI 智能体组成的团队,包括研究员、架构师、TDD 测试员等等,将接手一项任务,并处理从规划到部署的所有事情。我设计了一个复杂的多阶段工作流程,其中包含 `ESCALATION` 等协议和详细的“任务简报”。在纸面上,它是一个完美的、自我管理的机器。<p>但实际上,它却是一场代价高昂的噩梦。该系统饱受文件编辑错误、消耗数万个 token 的无限循环以及“幽灵执行”的困扰,即编排器在没有编写任何代码的情况下将任务标记为已完成。我的工作从开发人员变成了全职的提示调试员。<p>在绝望之下,我在 Reddit 上发帖求助,而解决方案并非更好的提示。而是一个评论,它让我禁用了工具设置中的两个“实验性”复选框。奇迹般地,90% 的文件编辑问题消失了。<p>这导致了一个痛苦但至关重要的实验:如果我删除了所有精心设计、超级详细的提示,并恢复到默认设置会怎样?结果令人沮丧:系统表现几乎完全相同。<p>阅读完整故事,包括详细的架构图和我的最终简化工作流程:https://xor01.substack.com/p/my-war-with-ai-agents
查看原文
Imagine hiring 10 specialists, giving them 1000-line instructions, and getting chaos instead of coordinated work. Welcome to my month of building an AI agent framework.<p>My goal was ambitious: a fully autonomous system where an army of AI agents: a Researcher, an Architect, a TDD-tester, and more—would take a task and handle everything from planning to deployment. I designed a complex, multi-phase workflow with protocols like `ESCALATION` and detailed "Mission Briefs". On paper, it was a perfect, self-managing machine.<p>In reality, it was an expensive nightmare. The system was plagued by constant file editing errors, infinite loops that burned through tens of thousands of tokens, and "phantom executions" where the orchestrator would mark a task as complete without writing a single line of code. My job turned from developer to full-time prompt debugger.<p>In desperation, I posted on Reddit, and the solution wasn't a better prompt. It was a single comment that led me to disable two "experimental" checkboxes in the tool's settings. Miraculously, 90% of the file editing problems vanished.<p>This led to a painful but crucial experiment: what if I removed all my carefully crafted, super-detailed prompts and went back to the default settings? The result was disheartening: the system performed almost exactly the same.<p>Read the full story with detailed architecture diagrams and my final, simplified workflow: https://xor01.substack.com/p/my-war-with-ai-agents