今日已更新 84 条资讯 | 累计 37333 条内容
关于我们

Stop Blaming the LLM: Why Your AI Agents Keep Failing (And How to Fix Them)

Abdullah Ahmad 2026年08月23日 02:08 2 次阅读 来源:Dev.to

I was staring at a broken Next.js and Express backend integration late at night, convinced my AI agent had lost its mind. It was supposed to be a straightforward n8n automation pipeline. Yet, every time it ran, it hallucinated non-existent packages and dumped its context halfway through. My System 1 intuitive reaction flared up immediately: The LLM just isn't smart enough. I sat there, exhausted, ready to rewrite the prompt for the twentieth time. Engaging System 2 Taking a step back, I forced myself to engage my analytical System 2 brain. I wasn't dealing with a lack of model intelligence; I was dealing with a lack of infrastructure. I was running a massive, powerful AI model with zero guardrails. No persistent memory. No verification. Just dumping a giant Mongoose schema into a prompt and hoping for the best. I was essentially dropping a Formula 1 engine onto a wooden skateboard and wondering why it crashed at the first turn. What is Harness Engineering? I stopped obsessing over prompt engineering and started focusing on Harness Engineering. The model is just the engine; the harness provides the chassis, the steering, and the brakes. Here is how I completely restructured my agentic workflow: Context Management: Instead of flooding the context window with raw codebase dumps, I implemented targeted retrieval. The agent now only sees the specific files required for the immediate task. Standardized Tools: I integrated Model Context Protocol (MCP) servers, giving the model bounded, secure ways to execute actions rather than just generating text. Durable State: If a long-running workflow pauses or fails, the system now checkpoints its progress. It resumes exactly where it left off instead of starting from scratch. Strict Verification: "Looks good to me" is no longer an acceptable output. The agent is forced to run tests and verify the CLI output before concluding a task. Learn to Break the System The results were immediate. The hallucinations stopped, and the agent shif

本文内容来源于互联网,版权归原作者所有
查看原文