惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Forbes - Security
Forbes - Security
L
Lohrmann on Cybersecurity
Simon Willison's Weblog
Simon Willison's Weblog
P
Proofpoint News Feed
P
Privacy International News Feed
The Hacker News
The Hacker News
AWS News Blog
AWS News Blog
S
Securelist
P
Proofpoint News Feed
Recent Announcements
Recent Announcements
GbyAI
GbyAI
B
Blog RSS Feed
A
About on SuperTechFans
C
CXSECURITY Database RSS Feed - CXSecurity.com
Y
Y Combinator Blog
Microsoft Azure Blog
Microsoft Azure Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Cyberwarzone
Cyberwarzone
I
Intezer
T
Tor Project blog
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
aimingoo的专栏
aimingoo的专栏
Cisco Talos Blog
Cisco Talos Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
W
WeLiveSecurity
D
DataBreaches.Net
U
Unit 42
Project Zero
Project Zero
Martin Fowler
Martin Fowler
V
V2EX
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
C
Cisco Blogs
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V2EX - 技术
V2EX - 技术
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
Threat Research - Cisco Blogs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tenable Blog
F
Full Disclosure
T
The Exploit Database - CXSecurity.com
H
Heimdal Security Blog
Latest news
Latest news
Webroot Blog
Webroot Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant Common SOC 2 Failures (Real World) Stop Vibe-Checking Your AI App: A Practical Guide to Evals How to Use SonarQube and SonarScanner Locally to Level Up Your Code Quality Your Next To-Do App Is Dead — I Replaced Mine with an OpenClaw AI Sign a Nostr event in 60 lines of Python using coincurve — no nostr-sdk, no nbxplorer, no rust toolchain ITGC Audit Explained Like You’re in Big 4 Patch Tuesday abril 2026: Microsoft parcha 163 vulnerabilidades y un zero-day en SharePoint Stop scraping everything: a better way to track competitor price changes Listing on MCPize + the Official MCP Registry while routing payments OUTSIDE the marketplace — how I kept 100% of my x402 revenue Building an AI-Powered Risk Intelligence System Using Serverless Architecture Why We Ripped Function Overloading Out of Our AI Toolchain Testing AI-Generated Code: How to Actually Know If It Works SaaS Churn Is Killing Your Business. Here Is What to Do About It (Without a Support Team) The Speed of AI Is No Longer Linear - And Self-Improving Models Are Why How to Implement RBAC for MCP Tools: A Practical Guide for Engineering Teams From Standard Quote to Persuasive Proposal: AI Automation for Arborists I built a CLI that scaffolds complete multi-tenant SaaS apps Axios CVE-2025–62718: The Silent SSRF Bug That Could Be Hiding in Your Node.js App Right Now The dashboard that ended our friendship Data Pipelines Explained Simply (and How to Build Them with Python) The Hidden Cost of AI Systems Nobody Talks About. undefined vs undeclared, and how typeof behaves Switching from file-based jobs to NATS/Kafka in Rust without changing code io_uring Adventures: Rust Servers That Love Syscalls Why Agentic AI is Killing the Traditional Database The POUR principles of web accessibility for developers and designers Quantum Neural Network 3D — A Deep Dive into Interactive WebGL Visualization How To Install Caveman In Codex On macOS And Windows Automation Pipeline Reliability: Why Your Workflow Breaks When Nobody Is Watching I Built an 'Open World' AI Coding Agent — It Works From ANY Folder From Freelancing to Product: A Tech Service Company's SaaS Transformation China's AI Giants: Adding Tencent Hunyuan & ByteDance Doubao to AI University (74 Providers) On the Vibe Coders and Their Lies clerk: Auto-Summarize Your Claude Code Sessions AI Weekly — 2026/04/10–04/17 | The Model Lockdown Is Here, but the Toolchain Is the Real Battleground AI 週報 — 2026/04/10–2026/04/17 模型封鎖潮來了,但工具鏈才是真戰場 Maybe this is how Open-Source apps are born... 🚀 Fine-Tune LLMs with LoRA and QLoRA: 2026 Guide tRPC v11 + Next.js App Router: End-to-End Type Safety Without the Boilerplate ShadCN UI in 2026: Why I Stopped Installing Component Libraries and Started Owning My Components SaaS Billing in React Server Components: Stripe + Supabase Without a Single `useEffect` Join our DEV Weekend Challenge — $1,000 in Prizes Across TEN winners! Submissions Due April 20 at 6:59 AM UTC. Implementing FSRS Spaced Repetition in Flutter + Supabase — Adding Memory Science to an AI Learning App "I Texted My Localhost From the Train — Claude Code Fixed the Bug Before I Got Home" I Built a Sales Prep AI and It Went Deeper Than Expected Design to Code #2: One JSON, Eleven Outputs Solving the 100M-Row Problem: A Summary Table Pattern for High-Volume Push Notification Logs Flutter Web With Wasm: What Actually Changes For Developers I Built 50 Royalty-Free Soundtracks for My Side Project in a Weekend Using AI Music Generation The Vibe Coding Security Checklist: 7 Things to Check Before You Ship Stop Letting Googlebot Guess Fix Your React App's SEO Right Desconstruindo o Streaming do LinkedIn: Como Criar um Engine de Extração de Vídeo de Alta Performance com HLS e FFmpeg (EDA Part-1) EDA (Exploratory Data Analysis) Explained With Real Life — Why Looking at Your Data Is the Most Important Step in Machine Learning Brand Relationship Management at Scale: Our 4-Touch Outreach System for 200+ Brands Why String.fromEnvironment() Might Return an Empty String in Dart JGuardrails 1.0.0 — Hardening Java LLM Apps Against Jailbreaks, Toxicity, and Prompt Injection Plan and Schedule a Full Week of Threads Content From One Claude Conversation Coding Cat Oran Ep3, Five Tables Changed Everything Updated: BFF Pattern I'm done watching freelancers get buried by 200 proposals. So I'm building the alternative. This is my first post BFS Algorithm in Java Step by Step Tutorial with Examples Tracking LLM Pricing Monthly: An Open Dataset for 22 AI Models How We Measure Content ROI on a Comparison Site: Revenue Attribution Without Perfect Data Introducing Nova AI Ops: The AI-Native Operating System for SRE Teams I built a free desktop video downloader for Windows — Grabbit How Talkie OCR Helps Vision-Impaired & Dyslexic Users Read the World Around Them VRCFaceTracking安装和iPhone面捕配置教程,有bug Even CrowdStrike Can't See Your Agents The Automation Gold Rush: What n8n Workflows and Claude Are Opening Up for Developers Right Now
AI Agent 崩溃的根源与解法——从250个测试用例看Agent可靠性
wzg0911 · 2026-06-28 · via DEV Community

wzg0911

根因一:工具调用的非确定性

Agent 的核心范式是"LLM 推理 → 选择工具 → 执行 → 观察结果 → 再推理"。这个链路里最脆弱的一环,是 LLM 选择工具这一步。

同样的 prompt,同样的上下文,你跑 10 次可能拿到 8 种不同的 function call 组合。有时候它调了正确的工具但传错参数,有时候它觉得"要不我再想想"然后死循环,有时候它直接跳过工具调用了——因为它"认为"自己知道答案。

我们在测试里见过一个典型案例:Agent 被要求"检查所有服务器的磁盘使用率",它正确地调了 list_servers,拿到 42 台机器后,只检查了前 3 台的磁盘,然后说"其余的都正常"。它编的。

这是 LLM 的根本特性,不是 bug。你不可能靠 prompt engineering 完全消除。

解法:幂等守卫 (Idempotency Guard)

ARK Trust 的做法是给每个工具调用加一层校验层:

  • 参数校验:独立于 LLM 的 schema 校验,不依赖 prompt 里的"请确保参数正确"
  • 调用去重:如果 LLM 连续两次发出完全相同的 function call,守卫会拦截并追问"你是认真的吗?"
  • 关键操作拦截:标记为 destructive 的工具(delete、truncate、rm)强制走 approval 流程,绕不过去

这层校验跑在 LLM 推理之外,不消耗 token,延迟增加不到 50ms。


根因二:错误传播链

Agent 的另一个典型死法是"一步错、步步错"。

比如一个数据查询 Agent,第一步调 API 超时了,LLM 拿到的 tool result 是空字符串。它不知道这是"超时了"还是"真的没有数据",于是基于空结果继续推理,得出天知道什么结论。到第四步的时候,整个上下文已经被错误信息污染,LLM 自己也开始胡言乱语了。

我们管这种情况叫错误传播链 (Error Cascade)。250 个测试用例里,约 34% 的失败跟它有关。

传统的处理方式是靠 LLM 自己的纠错能力——"请你检查一下前面的推理是否正确"。不靠谱。让 LLM 检查自己的错误,就像让醉汉给自己做清醒测试。

解法:熔断器 (Circuit Breaker)

ARK Trust 在 Agent 的执行器上加了熔断机制:

  • 连续失败计数:同类工具连续 3 次返回异常(超时/4xx/parsing error),自动熔断,暂停执行
  • 上下文污染检测:监控 tool result 的语义一致性,如果某次返回跟历史结果差异过大(用 embedding 做相似度比对),标记为可疑并请求 LLM 重新评估
  • 优雅降级:熔断不是直接 crash,而是进入 safe mode——只允许读操作,禁用所有写操作,然后通知用户

这套机制在测试里把级联失败的概率从 34% 压到了 7%。


根因三:上下文窗口的隐性退化

这个根因最隐蔽,也最难排查。

Agent 跑长任务的时候,每步的 tool result 都会追加到上下文里。跑个十几步之后,对话历史已经塞满了各种日志、错误栈、中间结果。LLM 的注意力被稀释,开始忽略早期的重要信息——比如用户最初给的约束条件。

我们的测试里有个案例特别典型:Agent 被要求"只处理 staging 环境的告警"。前 5 步它严格遵守,到第 12 步的时候它拿到了 production 环境的告警,顺手就给处理了。不是因为 prompt 写错了,是因为那个约束在第 1 条消息里,而第 12 步时上下文已经膨胀到 8000 token,LLM 的 attention 根本没覆盖到那条约束。

这就是上下文窗口的隐性退化——不是窗口不够大,是注意力分配不均匀。

解法:预测保护 (Predictive Guard)

ARK Trust 的做法是在 Agent 执行每一步之前做一次轻量级的意图预测:

  • 用一个小模型(不依赖大 LLM)对 Agent 即将执行的动作做分类:safe / risky / prohibited
  • 分类依据包括:当前 action 的 tool 类型、目标环境、是否匹配原始约束、历史执行轨迹
  • 如果判定为 risky 或 prohibited,拦截并注入一条醒目的 warning 到上下文里

这相当于在执行层面加了一个"不信任 LLM 的下次推理"的保险。


开源版 vs Pro 版

ARK Trust 的核心三个模块——幂等守卫、熔断器、预测保护——都已经在 GitHub 开源,可以直接集成到 LangGraph / CrewAI / AutoGen 项目里。几个命令就能挂上:

pip install arktrust

from arktrust import ArkAgent

agent = ArkAgent(
    backend="langgraph",
    tools=[...],
    guard_mode="strict"  # 开启全部三个保护模块
)

开源版提供了基础的保护能力,够应对大多数场景。

Pro 版多了这些东西:

  • Dashboard:实时看每个 Agent 的运行状态、失败率、熔断次数、上下文健康度
  • 回放模式:Agent 崩溃后可以逐 step 回放,精确到每个 tool call 的入参/出参和 LLM 的推理决策
  • 团队协作:多人共享 Agent 监控面板,自定义告警规则
  • 私有部署:支持离线环境,不需要连外网

写在最后

AI Agent 目前最大的问题不是"不够聪明",而是"不够可靠"。模型的能力在涨,但 Agent 的工程基础设施还没跟上。你不能指望一个可能有 13% 概率出错的系统去执行关键任务。

我们做 ARK Trust 的思路很简单:不信任 LLM,但给它兜底。模型负责聪明,框架负责安全。

如果你也在踩 Agent 可靠性的坑,开源版可以直接用。如果你需要 Dashboard、回放、团队协作这些能力——

扫码支付 ¥29,获取 Pro 版 Dashboard 完整访问权限。

👉 开通 ARK Pro


标签:#ai #agent #opensource #reliability #devops