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

推荐订阅源

爱范儿
爱范儿
T
Troy Hunt's Blog
B
Blog
N
Netflix TechBlog - Medium
H
Help Net Security
PCI Perspectives
PCI Perspectives
罗磊的独立博客
SecWiki News
SecWiki News
S
Security Affairs
Webroot Blog
Webroot Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
Google Online Security Blog
Google Online Security Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
V
Visual Studio Blog
V2EX - 技术
V2EX - 技术
Recorded Future
Recorded Future
Schneier on Security
Schneier on Security
The Last Watchdog
The Last Watchdog
博客园 - 【当耐特】
Attack and Defense Labs
Attack and Defense Labs
S
Secure Thoughts
Hugging Face - Blog
Hugging Face - Blog
Forbes - Security
Forbes - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
M
MIT News - Artificial intelligence
博客园_首页
A
About on SuperTechFans
Microsoft Azure Blog
Microsoft Azure Blog
T
Tailwind CSS Blog
The Cloudflare Blog
P
Proofpoint News Feed
D
DataBreaches.Net
N
News and Events Feed by Topic
G
Google Developers Blog
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
MyScale Blog
MyScale Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
AI
AI
O
OpenAI News
雷峰网
雷峰网
C
Check Point Blog
大猫的无限游戏
大猫的无限游戏
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Blog — PlanetScale
Blog — PlanetScale
有赞技术团队
有赞技术团队

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
Multi-Agent vs Single-Agent: The 3 Production Signals That Decide It
Gabriel Anha · 2026-04-27 · via DEV Community

An engineer I work with walked me through a "multi-agent" customer-support system their team had shipped. Five agents: triage, retrieval, drafting, sentiment, escalation. They were unhappy with the latency, the token bill was higher than expected, and the eval pass rate had dropped after a model upgrade.

Their fix, after a few hours of pulling it apart: delete four of the five agents.

The remaining single-agent system was several times faster, ran roughly an order of magnitude cheaper, and the eval pass rate recovered above where it had been before. Same prompts, same tools, same retrieval, collapsed into one loop. The "multi-agent architecture" had been an org chart pasted into a Python file. (Numbers as reported by the team, not a controlled benchmark; your mileage will vary, but the shape generalizes.)

Anthropic's own research-system writeup is blunt about the cost shape: their multi-agent system uses about 15x more tokens than chat, and agents already use 4x more than chat. That math only pencils out when the workload genuinely needs the extra compute. Most workloads do not.

Here are the three signals that say it does. If none of them fire for your problem, the cheapest, fastest, most debuggable system is one agent in a loop.

Signal 1: tool-call concurrency that exceeds one model's context budget

A single agent runs sequentially by default. It calls a tool, reads the result, plans, calls the next tool. If you have a task that fans out to 40 web searches, 40 result documents averaging 8k tokens each, and a final synthesis step, you have 320k tokens of intermediate state competing with your prompt and your output budget. Even a 200k-context model like Claude Sonnet 4.5 or older Opus 4.x is blown out before the synthesis runs, and a 1M-context model still pays for every token kept in scope.

Multi-agent fixes this with token isolation: a lead agent dispatches subagents that each carry their own context window. Subagent #7 reads its 8k document, returns a 400-token summary to the lead, and the document never enters the lead's context. The same pattern is what let Anthropic's research system, with Claude Opus 4 as lead and Sonnet 4 subagents, outperform single-agent Claude Opus 4 by 90.2% on their internal research eval. In their analysis, token usage by itself explained 80% of the variance.

The signal: your task's intermediate evidence exceeds your answering context. Not your final answer. The stuff you need to look at before you can answer. If a single agent would need to keep 30 documents in scope to write 3 paragraphs, you have the signal. If it would need to keep 3 documents in scope to write 30 paragraphs, you do not.

Concrete check: run the task with a single agent that logs token counts per step. If max(context_used) over the run exceeds 60% of your model's window before the final step, you have the signal.

Signal 2: distinct policy/safety domains per role

A single agent inherits all permissions of its tool list. If it can read the customer database and write to the billing API, every tool call needs to be safe against the worst-case prompt injection in any input it touches. That works for narrow tool surfaces. It falls apart when one role is "summarize untrusted email" and another role is "issue refunds."

Multi-agent gives you a clean break: a reader agent with read-only tools and access to untrusted text, and a writer agent with write tools and only the reader's structured output as input. The writer never sees the email. A prompt-injection payload in the email cannot reach the refund tool because the refund tool isn't in scope where the payload is.

This is the strongest case for multi-agent in production today. It's also the case people skip because it doesn't feel like "agent design". It feels like permissions. But "two principals with different blast radii" is the textbook reason to split a system into separate processes.

The signal: you can name two roles such that the union of their tool sets is something you'd never grant to a single principal. If you'd never give one human both abilities, don't give one agent both either.

Signal 3: genuinely parallel sub-tasks with independent state

The keyword is independent. "Look up the board members of all 500 S&P IT companies" is independent: you can fire 500 lookups, the answer to one doesn't change another, and you can join results at the end. "Refactor the auth module across the codebase" is not. Every change influences every other change, and the agents would spend more tokens reconciling than refactoring.

Anthropic's own writeup acknowledges this: most coding tasks involve fewer truly parallelizable subtasks than research, and current LLMs are not good at coordinating with each other in real time. The multi-agent wins are in research, broad-fanout retrieval, and document synthesis. The losses are in code, planning, and anything where state has to stay coherent.

The signal: you can write the task as a map, then a reduce, with no loop between them. If you can't, you're going to spend the multi-agent token premium on coordination overhead and earn nothing.

A 50-line single-agent that looks multi-agent (and isn't)

Here's the kind of task that pattern-matches to "multi-agent" and shouldn't. The user asks: "For our enterprise customer Acme, find the open support tickets, identify the ones blocking renewal, draft a status update, and slack the AE."

It looks like four roles: search, classify, draft, notify. It is one loop with four tools.

import anthropic

client = anthropic.Anthropic()

TOOLS = [
    {
        "name": "search_tickets",
        "description": "Search support tickets by account.",
        "input_schema": {
            "type": "object",
            "properties": {
                "account": {"type": "string"},
                "status": {"type": "string"},
            },
            "required": ["account"],
        },
    },
    {
        "name": "get_renewal_context",
        "description": "Renewal date and risk flags for an account.",
        "input_schema": {
            "type": "object",
            "properties": {"account": {"type": "string"}},
            "required": ["account"],
        },
    },
    {
        "name": "send_slack",
        "description": "Send a message to an AE's Slack DM.",
        "input_schema": {
            "type": "object",
            "properties": {
                "ae_email": {"type": "string"},
                "body": {"type": "string"},
            },
            "required": ["ae_email", "body"],
        },
    },
]

SYSTEM = (
    "You handle account status updates. Search tickets, "
    "cross-reference renewal context, draft a concise update, "
    "send it on Slack. Stop after sending."
)

def run(user_msg: str) -> str:
    msgs = [{"role": "user", "content": user_msg}]
    while True:
        r = client.messages.create(
            model="claude-opus-4-7",
            max_tokens=2048,
            system=SYSTEM,
            tools=TOOLS,
            messages=msgs,
        )
        msgs.append({"role": "assistant", "content": r.content})
        if r.stop_reason == "end_turn":
            return r.content[0].text
        tool_results = [
            {
                "type": "tool_result",
                "tool_use_id": b.id,
                "content": dispatch(b.name, b.input),
            }
            for b in r.content if b.type == "tool_use"
        ]
        msgs.append({"role": "user", "content": tool_results})

Enter fullscreen mode Exit fullscreen mode

dispatch is a regular Python function that maps tool name to implementation. The model picks the order. The model decides when to stop. There is no orchestrator, no message bus, no shared scratchpad. One agent, four tools, one context window, full traceability.

If you tried to "split this up," you'd reach for a graph framework, define four nodes, write transitions, debug why the drafting node hallucinates the AE's name because you forgot to thread it through. You'd ship in two weeks instead of two days. The eval would be worse. The bill would be 4x.

Why people reach for multi-agent anyway

Three reasons, all bad on their own.

The org-chart projection. "We have a triage team and a drafting team, so the agent system should too." Org charts exist because humans don't share context cheaply. LLMs do, inside their window. Modeling the org chart as code wastes tokens on coordination that the human org needs and the model does not.

The "specialist" intuition. "A drafting agent will draft better than a generalist." Empirically, a single Sonnet 4 with the drafting instructions in its system prompt drafts as well as a "drafting agent" with the same instructions in its system prompt. The specialization is in the prompt, not the process boundary.

The framework gravity. LangGraph, CrewAI, and AutoGen are excellent at multi-agent because that's what they're for (side-by-side comparison if you want it). If you've already learned LangGraph, every problem looks like a graph. The fact that a framework lets you build something doesn't mean the problem requires it. The single-agent loop above is 50 lines of stdlib plus the Anthropic SDK.

The decision rule

Run this checklist before you split:

  1. Will a single agent's intermediate context exceed 60% of the model window?
  2. Are there two roles whose tool sets you'd never grant to one principal?
  3. Is the task a clean mapreduce with independent sub-tasks?

Zero hits: single agent. Build the loop. Add tools. Ship.
One hit: probably single agent, with an extra mitigation. Hit on signal 2? Use a "tool-call mediator" that re-validates inputs before write tools run, still inside one loop. Hit on signal 1? Stream summaries instead of full documents back into context.
Two or three hits: multi-agent earns its premium. Use the framework that matches your control needs. LangGraph for explicit state machines, CrewAI for fast role-based prototyping, AutoGen (and its AG2 fork) for conversational coordination. Budget the multi-agent token premium upfront. Anthropic reported ~15× chat for their research system, and your number will land somewhere in that order of magnitude, so the finance team isn't surprised.

The mistake is reading "multi-agent" as a step up from "single-agent" on a sophistication ladder. It is not a ladder. It is a tradeoff between coordination cost and isolation benefit, and most production tasks sit on the coordination-heavy side. The teams that know this ship single-agent systems with confident tool design and stop trying to recreate the org chart in YAML.

If this was useful

The AI Agents Pocket Guide covers the loop, the tool surface, the failure modes, and the production patterns that decide single vs. multi without the framework marketing. If you're choosing an architecture this week and the team is already arguing about LangGraph nodes, it's the short answer.

Get the AI Agents Pocket Guide on Amazon.