0Pricing
AI Engineering Academy · 강의

단일 에이전트의 한계

복잡한 작업에서 단일 에이전트 시스템이 겪는 실패 양상을 분석합니다. 문맥 고갈, 도구 과부하, 전문성 부족을 살펴보고 다중 에이전트 아키텍처가 필요한 시점을 이해합니다.

단일 에이전트의 한계은(는) CoddyKit의 무료 AI Engineering Academy 강의입니다. 이것은 4개 중 1번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 AI Engineering Academy 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. AI Engineering Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

The Promise of Single Agents

Early AI agents were built with an appealing simplicity: one LLM, a set of tools, and a loop that runs until the task is done. For simple tasks like answering a question or fetching a web page, this works beautifully. The problem appears when you scale up the complexity of the task you are trying to solve.

Context Window Exhaustion

Every LLM has a finite context window that limits how much information it can consider at once. In a long-running agent task, the growing history of thoughts, tool calls, and observations eventually fills this window completely. When that happens the agent either truncates critical early context or halts with an error.

For example, a research agent analyzing 50 papers will accumulate tens of thousands of tokens of observations long before finishing.

# Context exhaustion example
max_tokens = 128000  # GPT-4o context limit

conversation_history = []
total_tokens = 0

for step in agent_steps:
    step_tokens = count_tokens(step)
    if total_tokens + step_tokens > max_tokens:
        # Agent cannot proceed - context is full
        raise ContextExhaustedError('Agent context window full at step ' + str(len(conversation_history)))
    conversation_history.append(step)
    total_tokens += step_tokens

Tool Overload and Decision Paralysis

As you add more capabilities to a single agent by giving it more tools, its performance can paradoxically decrease. Research shows that LLMs struggle to reliably select the right tool when presented with more than 10-15 options. The model wastes reasoning steps debating which tool to use instead of actually doing work.

This is called tool overload: too many choices degrade decision quality just as they do for humans.

# 20 tools is too many for one agent
tools = [
    search_web, query_database, send_email, create_document,
    read_file, write_file, run_python, call_api,
    analyze_image, transcribe_audio, translate_text, summarize_doc,
    fetch_weather, book_calendar, send_slack, query_crm,
    generate_chart, resize_image, compress_file, validate_json
]

# Agent spends 40% of its tokens just picking which tool to use
agent = create_agent(llm=gpt4o, tools=tools)  # This will be slow and unreliable

Lack of Specialization

A single generalist agent is asked to be a researcher, a writer, a coder, and a data analyst all at once. Each role requires different reasoning styles, different tool sets, and different output formats. No single prompt can simultaneously optimize for all of these.

A researcher needs to be skeptical and thorough. A writer needs to be creative and concise. Asking one agent to switch between these modes within the same context degrades quality in all of them.

Error Propagation in Long Chains

In a single-agent pipeline, a mistake made in step 3 of a 20-step task poisons every subsequent step. The agent builds on its own flawed output and the error compounds silently. By the time the final answer is produced, it may be completely wrong despite the agent appearing to reason correctly at each individual step.

This is fundamentally different from catching the error and correcting it in isolation before it propagates.

# Error propagation example
def single_agent_pipeline(task):
    result_1 = agent.think('Research competitors')     # Step 3: hallucinates a fake company
    result_2 = agent.think('Analyze ' + result_1)     # Step 4: analyzes the fake company
    result_3 = agent.think('Compare prices for ' + result_2)  # Step 5: prices for a fake company
    # Final report is built on fiction - error propagated silently
    return agent.think('Write report using ' + result_3)

Parallelism Is Impossible

Single agents are inherently sequential: think, act, observe, repeat. When a task has independent subtasks that could be done simultaneously, a single agent must still do them one at a time. Researching three different topics takes three times as long as it should.

Multi-agent systems solve this by running specialized subagents in parallel, completing the same total work in a fraction of the time.

import asyncio

# Single agent: sequential (slow)
def single_agent_research(topics):
    results = []
    for topic in topics:  # topics = ['AI', 'ML', 'NLP'] - runs one at a time
        result = agent.research(topic)
        results.append(result)
    return results  # Takes 3x longer than necessary

# Multi-agent: parallel (fast)
async def multi_agent_research(topics):
    tasks = [agent_pool.research(topic) for topic in topics]
    return await asyncio.gather(*tasks)  # All three run simultaneously

Diagnosing Single-Agent Failures

Before deciding to go multi-agent, it is important to diagnose the actual failure mode of your single agent. The symptoms to look for are: tasks that take more than 15-20 reasoning steps, tool sets larger than 10 functions, outputs that require expertise in fundamentally different domains, and tasks with independent subtasks that could be parallelized.

Not every agent problem requires a multi-agent solution. Start simple and upgrade when you hit real limits.

# Diagnostic checklist
def should_use_multi_agent(task_spec):
    signals = {
        'too_many_steps': task_spec.estimated_steps > 20,
        'too_many_tools': len(task_spec.required_tools) > 10,
        'multiple_domains': len(task_spec.required_expertise) > 2,
        'parallelizable': task_spec.has_independent_subtasks,
        'context_heavy': task_spec.estimated_tokens > 50000
    }
    score = sum(signals.values())
    print('Multi-agent signals:', signals)
    return score >= 2  # Upgrade if 2+ signals are present

The Cognitive Load Problem

Human teams work better than individual geniuses for complex projects because dividing cognitive load allows each person to go deeper in their area. The same principle applies to AI agents. A single agent trying to hold the full context of a complex project in its context window is equivalent to asking one person to simultaneously write code, design UI, handle customer support, and manage the database.

Multi-Agent as the Solution

Multi-agent systems address all these failure modes by distributing work across specialized agents, each with a focused role, a small tool set, and a manageable context. An orchestrator agent decomposes the task and coordinates the specialists. Results are synthesized at the end into a coherent output.

This mirrors how high-performing human organizations operate: specialists doing deep work, managers coordinating and integrating.

# Multi-agent system sketch
orchestrator = Agent(
    llm='gpt-4o',
    system='You are a task planner. Break work into subtasks and delegate.',
    tools=[delegate_to_researcher, delegate_to_writer, delegate_to_coder]
)

researcher = Agent(
    llm='gpt-4o',
    system='You are a research specialist. Find and verify information.',
    tools=[search_web, query_arxiv, fetch_url]  # Only 3 focused tools
)

writer = Agent(
    llm='gpt-4o',
    system='You are a technical writer. Transform research into clear prose.',
    tools=[format_markdown, check_grammar]  # Only 2 focused tools
)

When NOT to Use Multi-Agent

Multi-agent systems introduce their own complexity: inter-agent communication latency, harder debugging, more potential failure points, and higher API costs. For simple tasks, they are overkill.

Stick with a single agent when: the task fits in one context window, requires fewer than 10 tools, can be completed in under 15 steps, and does not have meaningfully independent subtasks that benefit from parallelism.

Real-World Multi-Agent Examples

Production multi-agent systems appear across many domains. AutoGPT and Devin use multi-agent patterns for software engineering tasks. AI research assistants use a planner, retriever, and writer agent in sequence. Customer support platforms use a triage agent that routes to specialized agents for billing, technical, and account issues.

Understanding the failure modes of single agents is what motivates these architectures.

Quick Check

Test your understanding of single-agent limitations from this lesson.

Lesson Recap

In this lesson you learned: context window exhaustion limits how many steps a single agent can take, tool overload degrades decision quality when too many tools are available, and lack of specialization forces a single agent to be mediocre at many things rather than excellent at one. Next up we explore the orchestrator-subagent pattern that solves these problems.

자주 묻는 질문

“단일 에이전트의 한계” 강의는 무료인가요?

네 — “단일 에이전트의 한계” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 AI Engineering Academy 강의 전체를 잠금 해제할 수 있습니다. AI Engineering Academy 강의에는 총 4개의 강의가 포함되어 있습니다.

“단일 에이전트의 한계”에서 뭘 배우나요?

복잡한 작업에서 단일 에이전트 시스템이 겪는 실패 양상을 분석합니다. 문맥 고갈, 도구 과부하, 전문성 부족을 살펴보고 다중 에이전트 아키텍처가 필요한 시점을 이해합니다. 브라우저에서 직접 실행하는 실습 코드로 AI Engineering Academy을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

AI Engineering Academy을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 AI Engineering Academy은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 1번째 강의입니다.

“단일 에이전트의 한계” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 AI Engineering Academy 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 AI Engineering Academy 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 단일 에이전트의 한계
  2. 오케스트레이터-하위 에이전트 패턴
  3. LangGraph로 다중 에이전트 파이프라인 구축
  4. 공유 메모리와 에이전트 간 통신
← AI Engineering Academy(으)로 돌아가기