| name | orchestration |
| description | Select and design the right orchestration pattern for multi-agent systems. Evaluate Sequential, Parallel, Router, and Hierarchical patterns against your use case requirements. The Router pattern covers both agent selection (classify input to the right specialist) and model selection (route tasks to the right LLM by complexity to balance cost, latency, quality, and fallback chains). Use when deciding how multiple agents should coordinate, share context, delegate tasks, or which model each task should run on. |
| argument-hint | [multi-agent scenario] [--pattern router] |
| allowed-tools | ["Read","Write"] |
| model | inherit |
Orchestration Pattern
๋ฉํฐ ์์ด์ ํธ ์ค์ผ์คํธ๋ ์ด์
ํจํด ์ ํ ๋ฐ ์ค๊ณ
Core Goal
- ์์ด์ ํธ ๊ฐ ํ๋ ฅ ๋ฐฉ์(์์ฐจ, ๋ณ๋ ฌ, ๋ผ์ฐํ
, ๊ณ์ธต)์ ์๊ตฌ์ฌํญ์ ๋ง๊ฒ ์ ํํ์ฌ ๋ถํ์ํ ๋ณต์ก์ฑ ์ ๊ฑฐํ๊ณ ์ฑ๋ฅ ์ต์ ํ
- ๊ฐ ํจํด์ ์ฅ๋จ์ ์ ๋ช
ํํ ์ดํดํ๊ณ ์ง์ฐ์๊ฐ, ์๋ฌ์จ, ๋น์ฉ์ ์์ธกํ๋ ์์ฌ๊ฒฐ์ ํ๋ ์์ํฌ ์ ๊ณต
- "๊ฐ์ฅ ๊ฐ๋จํ ํจํด๋ถํฐ ์์"ํ๋ ์ ์ง์ ์
๊ทธ๋ ์ด๋ ์์น ์ ์ฉ
Trigger Gate
Use This Skill When
- 2๊ฐ ์ด์์ ์์ด์ ํธ๊ฐ ํ๋ ฅํด์ผ ํ๋ ์์คํ
์ค๊ณ ๋๋ ํ๊ฐ
- ๊ธฐ์กด ์ค์ผ์คํธ๋ ์ด์
์ด ์ฑ๋ฅ ๋ฌธ์ (์ง์ฐ, ๋น์ฉ)๋ฅผ ๋ณด์ด๋ ๊ฒฝ์ฐ
- ํจํด ์ ํ์ ์์ฌ๊ฒฐ์ ์ ๋ฌธ์ํํ๊ณ ์ ๋นํํด์ผ ํ๋ ๊ฒฝ์ฐ
Route to Other Skills When
- ์ ํํ ํจํด์ ์ธ๋ถ ๊ตฌํ (3-tier ์๊ณ ๊ตฌ์กฐ) โ orchestration (Hierarchical pattern ์์ธ ์น์
์ฐธ์กฐ)
- ์์
๋ณ LLM ๋ชจ๋ธ ์ ํ/๋น์ฉ ์ต์ ํ โ orchestration --pattern router (Model Routing ์์ธ ์น์
์ฐธ์กฐ)
- ๋ฉํฐ ์์ด์ ํธ ๊ฐ ๋ฉ๋ชจ๋ฆฌ ๊ณต์ โ memory-arch (์ ์ฅ์ ์ ๋ต)
- ํจํด์ ๊ฒฝ์ ์ฑ ๋ถ์ โ strategy --focus biz-model (๋น์ฉ ๋ชจ๋ธ)
Boundary Checks
- ๋จ์ผ ์์ด์ ํธ๋ก ์ถฉ๋ถํ๋ฉด โ ์ค์ผ์คํธ๋ ์ด์
ํจํด ๋ถํ์, ๋จ์ผ prompt ๋๋ routing๋ง ๊ณ ๋ ค
- ํจํด์ด ๋๋ฌด ๋ณต์กํ๋ฉด โ "๊ฐ์ฅ ๊ฐ๋จํ ํจํด"์ผ๋ก ์์ ์์น ์๋ฐ, ์ฌํ๊ฐ ํ์
- ์๋ฌ ๋ณต๊ตฌ ์ ๋ต์ด ์์ผ๋ฉด โ ์ ํํ ํจํด์ ์์ ํ๊ฒ ๊ตฌํ ๋ถ๊ฐ, ๋จผ์ ์๋ฌ ์ฒ๋ฆฌ ์ ์
๊ฐ๋
์์ด์ ํธ ์์คํ
์ ๋ณต์ก๋์ ์๊ตฌ์ฌํญ์ ๋ฐ๋ผ ์ ์ ํ ์ค์ผ์คํธ๋ ์ด์
ํจํด์ ์ ํํ๋ค. ์๋ชป๋ ํจํด ์ ํ์ ๋ถํ์ํ ๋ณต์ก์ฑ์ด๋ ์ฑ๋ฅ ๋ณ๋ชฉ์ ๋ง๋ ๋ค.
Instructions
You are selecting and designing an orchestration pattern for: $ARGUMENTS
Step 1 โ Assess Requirements
Answer these questions to determine pattern fit:
- How many distinct tasks are involved?
- Are tasks dependent on each other's outputs?
- Is the workflow deterministic or dynamic?
- What is the latency tolerance?
- What is the error tolerance?
Step 2 โ Pattern Selection Matrix
| Pattern | When to Use | Complexity | Latency |
|---|
| Sequential Chain | Tasks have strict dependencies | Low | High (sum of all) |
| Parallel Fan-out | Independent tasks, same input | Medium | Low (max of all) |
| Router | Input determines which agent | Medium | Low (single path) |
| Hierarchical | Complex, multi-level workflows | High | Variable |
| Event-Driven | Reactive, async workflows | High | Variable |
Step 3 โ Pattern Deep Dive
Sequential Chain
Input โ Agent A โ Agent B โ Agent C โ Output
- Best for: pipelines where each step transforms data
- Risk: single point of failure, high total latency
- PM Example: Research โ Analysis โ Report Draft โ Review
Parallel Fan-out / Fan-in
โโ Agent A โโ
Input โโโโคโ Agent B โโโคโ Aggregator โ Output
โโ Agent C โโ
- Best for: same task on different data segments
- Risk: aggregation complexity, slowest worker bottleneck
- PM Example: Analyze 5 competitors simultaneously
Router (Classifier โ Specialist)
Input โ Router โ Agent A (if type X)
โ Agent B (if type Y)
โ Agent C (if type Z)
- Best for: varied input types needing different expertise
- Risk: router misclassification
- PM Example: Triage user feedback by category
Router ํจํด ์์ธ โ ๋ ๊ฐ์ง ๋ผ์ฐํ
์ฐจ์
์ค์: "Router ํจํด"์๋ ๋ ๊ฐ์ง ์ง๊ต(orthogonal) ์ฐจ์์ด ์๋ค. ๋์ ํจ๊ป ์ธ ์ ์์ผ๋ฉฐ ํผ๋ํ๋ฉด ์ ๋๋ค.
| ์ฐจ์ | ๋ฌด์์ด ๋ฐ๋๋ | ๋ชฉ์ | ์ฌ์ฉ ์์ |
|---|
| Agent Routing (์์ด์ ํธ ์ ํ) | ์์ด์ ํธ ์์ฒด (๋๊ตฌ/์ ๋ฌธ์ฑ) | ์ ๋ฌธ์ฑ ํฅ์ (์ ํ๋ โ) | ๋ค๋ฅธ ์ ๋ฌธ์ฑ/๋๊ตฌ๊ฐ ํ์ํ ์์
์ผ๋ก ๋ถ๊ธฐ |
| Model Routing (๋ชจ๋ธ ์ ํ) | ์์ด์ ํธ๋ ๋์ผ, LLM ๋ชจ๋ธ๋ง | ๋น์ฉ ์ต์ ํ (30-60% ์ ๊ฐ) | ๊ฐ์ ์์
์ ๋ค์ํ LLM์ผ๋ก ์ฒ๋ฆฌ ๊ฐ๋ฅ |
ํจ๊ป ์ฌ์ฉ (๊ถ์ฅ):
Input โ [Agent Router]: ์ด๋ค ์์ด์ ํธ? (General vs Bash vs Custom)
โ
์ ํ๋ ์์ด์ ํธ ๋ด์์:
[Model Router]: ์ด๋ค ๋ชจ๋ธ? (T1 vs T2 vs T3)
โ
์ต์ข
์๋ต
์ด ๊ตฌ์กฐ๋ก ์์ด์ ํธ ์ ๋ฌธ์ฑ + ๋ชจ๋ธ ๋น์ฉ ์ต์ ํ๋ฅผ ๋์์ ๋ฌ์ฑํ๋ค.
์์ "Router (Classifier โ Specialist)" ๊ธฐ๋ณธ ๋ค์ด์ด๊ทธ๋จ์ Agent Routing์ ํด๋นํ๋ค. ์๋๋ Model Routing์ ์์ธ ์ค๊ณ๋ก, router ์คํฌ์์ ํก์ํ ๋ด์ฉ์ด๋ค.
Model Routing โ ๋ชจ๋ธ ์ ํ ์ ๋ต
์์
๋ณต์ก๋์ ๋ฐ๋ผ T1(์ ๋น์ฉ ๊ฒฝ๋) ~ T4(๊ณ ์ฑ๋ฅ ์ ๋ฌธ) ๋ชจ๋ธ์ ์ ํํ์ฌ ๋น์ฉ 40-80% ์ ๊ฐํ๋ฉด์ ํ์ง(>90%)์ ์ ์งํ๋ค. ๋ชจ๋ ์์
์ ์ต๊ณ ์ฑ๋ฅ ๋ชจ๋ธ์ ์ฐ๋ ๊ฒ์ ๋น์ฉ ๋ญ๋น๋ค.
Trigger Gate (Model Routing์ ์ธ ๋):
- ์ฌ๋ฌ ๋ชจ๋ธ์ ์ฐ๋ ์์ด์ ํธ ์์คํ
์ ๋น์ฉ ์ต์ ํ ํ์
- ๊ฐ๋จํ ์์
์ ๋น์ผ ๋ชจ๋ธ์ ์ฐ๊ณ ์๋ ๊ฒฝ์ฐ
- ์ฑ๋ฅ๊ณผ ๋น์ฉ์ ํธ๋ ์ด๋์คํ๋ฅผ ์๋์ ์ผ๋ก ์ค์ ํด์ผ ํ๋ ๊ฒฝ์ฐ
Boundary Checks (Model Routing ๊ฑด๋๋ฐ๊ธฐ):
- ๋จ์ผ ๋ชจ๋ธ๋ง ์ฌ์ฉ โ ๋ผ์ฐํ
๋ถํ์
- ๋ชจ๋ ์์
์ด ๊ณ ๋ณต์ก๋ โ T3 ๊ณ ์ (๋ผ์ฐํ
๋ณต์ก๋๋ณด๋ค ์ด๋ ์ ์)
- ๋ผ์ฐํ
์ค๋ฒํค๋ > ์ ๊ฐ ๋ชจ๋ธ ์ ๊ฐ โ ๋ผ์ฐํ
๊ฑด๋๋ฐ๊ธฐ
Step 1 โ Task Classification: ๊ฐ ์์
์ ๋ณต์ก๋๋ก ๋ถ๋ฅ
| Tier | Complexity | Examples | Recommended Model Class |
|---|
| T1 | Simple extraction | Data parsing, formatting, classification | Small/Fast (Haiku, GPT-4o-mini) |
| T2 | Standard reasoning | Summarization, comparison, basic analysis | Mid (Sonnet, GPT-4o) |
| T3 | Complex reasoning | Strategy, creative, multi-step analysis | Large (Opus, o1) |
| T4 | Specialized | Code generation, math, domain-specific | Specialist (Claude Code, Codex) |
Step 2 โ Routing Decision Matrix: ์ํฌํ๋ก์ฐ์ ๊ฐ ์์
์ ๋ํด
Task: [name]
โโโ Input complexity: Low / Medium / High
โโโ Output quality sensitivity: Low / Medium / High
โโโ Latency requirement: <1s / <5s / <30s / Flexible
โโโ Cost tolerance: $ / $$ / $$$
โโโ Recommended tier: T1 / T2 / T3 / T4
Step 3 โ Cost Comparison (๋น์ฉ): ๋ผ์ฐํ
vs ๋จ์ผ ๋ชจ๋ธ ๋น์ฉ ์ํฅ ๊ณ์ฐ
| Approach | Monthly Cost | Quality Score |
|---|
| All T3 (premium) | $____ | 95/100 |
| Routed (mixed) | $____ | 92/100 |
| All T1 (budget) | $____ | 70/100 |
Target: Routed ์ ๊ทผ์ด premium ๋น์ฉ์ <40%๋ก >90% ํ์ง ๋ฌ์ฑ.
์ด ๋น์ฉ ๊ณ์ฐ ํ๋ ์์ํฌ (์ ํํ ๊ฒฝ์ ์ฑ ํ๊ฐ):
์ด ๋น์ฉ = API ํธ์ถ ๋น์ฉ + ์ง์ฐ์๊ฐ ๋น์ฉ + ์ฌ์ฒ๋ฆฌ ๋น์ฉ
1. API ํธ์ถ ๋น์ฉ = ฮฃ(๋ชจ๋ธ๋ณ ํ ํฐ ๋จ๊ฐ ร ์์ ํธ์ถ ์)
2. ์ง์ฐ์๊ฐ ๋น์ฉ = ํ๊ท ์ง์ฐ์๊ฐ(์ด) ร ์๊ฐ๋น ๋น์ฉ ร ์๊ฐ ์์ฒญ ์
(์ฌ์ฉ์ ๋๊ธฐ ์๊ฐ = ์์ฐ์ฑ ์์ค๋ก ํ์ฐ)
3. ์ฌ์ฒ๋ฆฌ ๋น์ฉ = ์ค๋ฅ์จ ร ์ฌ์ฒ๋ฆฌ ๋ชจ๋ธ ๋น์ฉ ร ์๊ฐ ์์ฒญ ์
(ํด๋ฐฑ ๋ฐ๋ ์ ์ถ๊ฐ ๋น์ฉ)
Step 4 โ Fallback Strategy (fallback-chain): graceful degradation ์ค๊ณ
Primary: [preferred model]
โ if failed/timeout
Fallback 1: [alternative model]
โ if failed/timeout
Fallback 2: [minimum viable model]
โ if all fail
Error: [return structured error to user]
- ํด๋ฐฑ ์ฒด์ธ ๋ค์ํ: ๋ค๋ฅธ ์ ๊ณต์์ ๋๊ธ ๋ชจ๋ธ (Anthropic Sonnet โ OpenAI GPT-4o) โ ํ ๋ฑ๊ธ ๋ฎ์ ๋ชจ๋ธ(ํ์ง ์ ํ ์์ฉ) โ ์บ์๋ ๋ต๋ณ โ ์ฌ์ฉ์ ์ฌ์๋ ์์ฒญ
- ํด๋ฐฑ ๋ฐ๋ ๋น๋ ์ถ์ (>10% = ๋ผ์ฐํ
๊ท์น ์ฌ๊ฒํ ์ ํธ)
Step 5 โ Quality Gate (2๋จ๊ณ):
- Stage 1 (๋ผ์ฐํ
์ ): ๋ผ์ฐํฐ ๋ถ๋ฅ ์ ๋ขฐ๋ > 85%์ด๋ฉด ์ ํ ๋ชจ๋ธ๋ก ๋ผ์ฐํ
, โค85%์ด๋ฉด clarification ์คํ. ๋ชฉํ ์ค๋ถ๋ฅ์จ <10%.
- Stage 2 (๋ผ์ฐํ
ํ): ์ถ๋ ฅ ํ์ง ์ ์ <80%์ด๋ฉด ํด๋ฐฑ ๋ชจ๋ธ๋ก ์ฌ์๋, ๊ทธ๋๋ ์คํจ ์ T3๋ก ์ต์ข
์ฌ์๋. ๋ชฉํ ์ต์ข
ํ์ง >90%.
Step 6 โ Monitoring Plan: ์ฃผ 1ํ ์ถ์
- ๋ชจ๋ธ ํฐ์ด๋ณ ๋น์ฉ
- ๋ผ์ฐํ
์ ํ๋ (์ฌ๋ฐ๋ฅธ ํฐ์ด ์ ํ ๋น์จ)
- ํด๋ฐฑ ๋ฐ๋ ๋น๋ (<5% ๋ชฉํ)
- ํฐ์ด๋ณ ํ์ง ์ ์
Output โ ๋ผ์ฐํ
ํ
์ด๋ธ:
โโโโโโโโโโโโโโโฌโโโโโโโฌโโโโโโโโโโโฌโโโโโโโโ
โ Task โ Tier โ Model โ $/run โ
โโโโโโโโโโโโโโโผโโโโโโโผโโโโโโโโโโโผโโโโโโโโค
โ [task 1] โ T1 โ [model] โ $0.01 โ
โ [task 2] โ T2 โ [model] โ $0.05 โ
โ [task 3] โ T3 โ [model] โ $0.15 โ
โโโโโโโโโโโโโโโดโโโโโโโดโโโโโโโโโโโดโโโโโโโโ
Monthly estimate: $____ vs all-premium: $____ (___% savings)
Model Routing Failure Handling (latency/fallback ํฌํจ):
| ์คํจ ์ํฉ | ๊ฐ์ง | ๋์ |
|---|
| ๋ผ์ฐํ
์ค๋ถ๋ฅ: T1 ๋ชจ๋ธ์ด ์ถฉ๋ถ์น ์์ ์์
์ผ๋ก ๊ฐ๋ฆผ | ์ถ๋ ฅ ํ์ง ์ ์ <70%, "๋ถ์ ํํจ" ํผ๋๋ฐฑ | ์ฆ์ T2๋ก ์ฌ์คํ(ํด๋ฐฑ), ๋ผ์ฐํ
๊ท์น ์
๋ฐ์ดํธ |
| ๋น์ฉ ์ ๊ฐ ๋ฏธ๋ฌ: ๊ณ ๋น์ฉ ๋ชจ๋ธ ํธ์ถ ๋น์จ ๋์ | ์ค์ T1 ์ฌ์ฉ๋ฅ 10% (์์ 50%) | ๋ผ์ฐํ
threshold ๋ฎ์ถค, ๋๋ T1 ๋ฅ๋ ฅ ๊ฐํ |
| ๋ชจ๋ธ API ์ฅ์ : T2 ๋ชจ๋ธ ๋ค์ด (latency timeout) | T2 ํธ์ถ timeout | ํด๋ฐฑ 1: T3 ์ฌ์๋, ๋ชจ๋ ์คํจ ์ ์ฌ์ฉ์ ๋ณด๊ณ |
| ํ์ง-๋น์ฉ ๊ท ํ ๋ถ๊ดด: ๋น์ฉโ ํ์ง<80% | ๋ง์กฑ๋ 95% โ 82% | ๋ผ์ฐํ
ํ๊ท, ๋ ๋์ ํฐ์ด๋ก ๋ณด์์ ์กฐ์ |
Hierarchical (Prometheus-Atlas)
Orchestrator โ Sub-orchestrator A โ Workers
โ Sub-orchestrator B โ Workers
- Best for: complex, multi-phase projects
- Risk: over-engineering, communication overhead
- PM Example: Full product launch planning
Hierarchical ํจํด ์์ธ โ Prometheus-Atlas-Worker
3-tier ๊ตฌ์กฐ์ ํ์ค ๊ตฌํ. ๊ฐ ๊ณ์ธต์ ์ญํ :
| Tier | Role | Decision Type | Example |
|---|
| Prometheus | Strategic direction | What & Why | "Q2 ๊ฒฝ์ ๋ถ์ ํ์" |
| Atlas | Task orchestration | How & When | "5๊ฐ ๊ฒฝ์์ฌ ๋ถ๋ฐฐ, ์์ปค ํ ๋น, ๊ฒฐ๊ณผ ํตํฉ" |
| Workers | Task execution | Do | "๊ฒฝ์์ฌ X ๊ฐ๊ฒฉ ํ์ด์ง ์์ง" |
Atlas ๋ ์ด์ด ์ค๊ณ (ํต์ฌ):
- Task Decomposition โ ๋ชฉํ๋ฅผ ์์ปค ๋จ์๋ก ๋ถํด
- Worker Selection โ ์์
์ ํ์ ์ต์ ์์ปค ๋งค์นญ
- Dependency Management โ ์์
์์ ๊ด๋ฆฌ
- Result Aggregation โ ์์ปค ์ถ๋ ฅ ํตํฉ
- Quality Gate โ ์์๋ก ์ ๋ฌ ์ ๊ฒ์ฆ
- Error Recovery โ ์ฌ์๋ ๋๋ ์์ค์ปฌ๋ ์ด์
์์ปค ์ค๊ณ 4์์น: ๋จ์ผ ์ฑ
์ ยท Stateless ์คํ ยท ๊ตฌ์กฐํ๋ ์ถ๋ ฅ ยท ๋ช
ํํ ์คํจ ๋ฐํ
์ํฐํจํด:
| ํจํด | ๋ฌธ์ | ํด๊ฒฐ |
|---|
| God Atlas | Atlas๊ฐ ์คํ ์์
๋ ์ง์ ์ํ | Atlas + Workers ๋ถ๋ฆฌ |
| Worker Chaining | ์์ปค๊ฐ ๋ค๋ฅธ ์์ปค ์ง์ ํธ์ถ | Atlas๋ฅผ ํตํด ๋ผ์ฐํ
|
| Missing Prometheus | ์ ๋ต ๊ณ์ธต ์์ด Workers๋ง ๋์ | ํญ์ ์ ๋ต ๊ณ์ธต ์ ์ง |
| Over-orchestration | ๋จ์ ํ์คํฌ์ 3-tier ์ ์ฉ | ๋จ์ผ ์์ด์ ํธ ๋จผ์ ๊ฒํ |
Step 4 โ Design the Selected Pattern
For the chosen pattern, specify:
- Agent Roles: What each agent does
- Data Flow: Input/output format between agents
- Error Handling: What happens when an agent fails
- Scaling Strategy: How to handle increased load
Step 5 โ Complexity Check
Before finalizing, ask:
- Could a single well-prompted agent do this?
- Is the orchestration overhead justified by the benefit?
- What is the simplest pattern that meets requirements?
Rule: Start with the simplest pattern. Upgrade only when proven necessary.
Failure Handling
| ์คํจ ์ํฉ | ๊ฐ์ง | ๋์ |
|---|
| ์ ํํ ํจํด์ด ์ค์ ์๊ตฌ์ฌํญ๊ณผ ์ ๋ง์ | ๋ฐฐํฌ ํ ์ง์ฐ์๊ฐ ์ด๊ณผ ๋๋ ์๋ฌ์จ ๋์ | ์๊ตฌ์ฌํญ ์ฌ๋ถ์, ํจํด ์ ํ (์: ์์ฐจ โ ๋ณ๋ ฌ), ๋๋ ํ์ด๋ธ๋ฆฌ๋ ํจํด ๋์
|
| ๋ณ๋ ฌ ํจํด์์ ๋๋ฆฐ agent ๋ณ๋ชฉ | Fan-in ์ดํ ๊ฐ์ฅ ๋๋ฆฐ agent ๋๊ธฐ ์๊ฐ์ด ์ ์ฒด ์ง์ฐ์ 80% | ๋๋ฆฐ agent ๋ถํด, ํ์์์ ์ค์ , ๋๋ ํ์ง ์ ํํ๊ณ ๋นจ๋ฆฌ ๋ฐํ |
| ๋ผ์ฐํฐ ๋ถ๋ฅ ์ค๋ฅ: ์
๋ ฅ์ด ์๋ชป๋ agent๋ก ๊ฐ๋น | ์ฌ์ฉ์ ์ง๋ฌธ์ด ๋ถ๋ฅ ๊ธฐ์ค๊ณผ ์ ๋งคํด์ ํ๋ฆฐ agent ํธ์ถ | ๋ผ์ฐํฐ ํ๋กฌํํธ ๊ฐ์ , ๋๋ ๋ผ์ฐํฐ ์ฌ์๋/ํด๋ฐฑ ์ ๋ต ์ถ๊ฐ |
| ๊ณ์ธต ์ค์ผ์คํธ๋ ์ด์
์ค๋ฒํค๋: ๋๋ฌด ๋ณต์กํด์ง | ํต์ ๋ ์ด์ด๋ง ํด๋ ์ ์ฒด ์ง์ฐ 50% | ๊ณ์ธต ์ ๊ฐ์ (3-tier โ 2-tier), ๋๋ ๊ฐ๋จํ ํจํด์ผ๋ก ๋กค๋ฐฑ |
Quality Gate
Examples
Good Example
์๋๋ฆฌ์ค: "๊ณ ๊ฐ ํผ๋๋ฐฑ ๋ถ์ ์์คํ
"
- ์ฌ์ฉ์๊ฐ ํผ๋๋ฐฑ ์ ์ถ
- ๊ฐ์ ๋ถ์, ์นดํ
๊ณ ๋ฆฌ ๋ถ๋ฅ, ์ฐ์ ์์ ํ๊ฐ ํ์
- ์ง์ฐ์๊ฐ <5์ด, ์๋ฌ์จ <1%
[์๊ตฌ์ฌํญ ๋ถ์]
- ์์
์: 3๊ฐ (๊ฐ์ ๋ถ์, ๋ถ๋ฅ, ์ฐ์ ์์)
- ์์กด์ฑ: ์์ (๋์ผ ์
๋ ฅ์ผ๋ก ๋ชจ๋ ๋
๋ฆฝ ์คํ)
- ์ง์ฐ ์๊ตฌ: ๋ฎ์ (<5์ด ์ฌ์ )
- ์๋ฌ ํ์ฉ: ๋งค์ฐ ๋ฎ์ (<1%)
[ํจํด ํ๊ฐ]
- Sequential: ๋ถํ์ (์์ ์์กด์ฑ ์์)
- Parallel Fan-out/Fan-in: ์ฐ์ํจ โ
- 3๊ฐ agent ๋์ ์คํ
- ์ง์ฐ = max(3๊ฐ agent) โ 1.5์ด < 5์ด
- Aggregator์์ 3๊ฐ ๊ฒฐ๊ณผ ํตํฉ
- Router: ๋ถ์ ์ (๋ถ๋ฅ ์ด์ ์ ๋ฌธ์ )
- Hierarchical: ์ค๋ฒ์์ง๋์ด๋ง
[์ ํ] Parallel Fan-out/Fan-in
[์ค๊ณ]
Input (ํผ๋๋ฐฑ ํ
์คํธ)
โ
โโ Sentiment Agent (1์ด)
โโ Category Agent (0.8์ด)
โโ Priority Agent (1.2์ด)
โ
Aggregator (0.3์ด)
- 3๊ฐ ์ถ๋ ฅ ํตํฉ
- ๋ชจ์ ๊ฒ์ฌ (์: high priority์ธ๋ฐ negative?)
- JSON์ผ๋ก ์ ๋ ฌ
โ
Output (json: {sentiment, category, priority})
[์๋ฌ ์ฒ๋ฆฌ]
- ๋จ์ผ agent ์คํจ: timeout 2์ด ์ค์ โ ํด๋น ํญ๋ชฉ null๋ก ๋ฐํ
- Aggregator ์คํจ: ์๋ณธ 3๊ฐ agent ์ถ๋ ฅ๋ง ๋ฐํ (๋ถ๋ถ ์ฑ๊ณต)
- ์ ์ฒด ์คํจ: ์ฌ์ฉ์์๊ฒ ์ฌ์๋ ๊ถ์
[๊ฒฐ๊ณผ]
- ํ๊ท ์ง์ฐ: 1.8์ด (๋ชฉํ 5์ด vs ์ค์ <2์ด)
- ์๋ฌ์จ: 0.8% (๋ชฉํ <1% ๋ฌ์ฑ)
- ๋น์ฉ: 3๊ฐ agent ร $0.05 = $0.15/์์ฒญ
Bad Example
๋ฐ์ฌ๋ก 1: ๋ถํ์ํ Sequential
"์ฐ์ ๊ฐ์ ๋ถ์์ ํ ํ, ๊ทธ ๊ฒฐ๊ณผ๋ก ์นดํ
๊ณ ๋ฆฌ๋ฅผ ๊ฒฐ์ "
- ์ค์ ๋ก๋ ๋
๋ฆฝ์
- Sequential๋ก ๋ฌถ์ผ๋๊น ์ง์ฐ = 3์ด (๋ณ๋ ฌ์ด๋ฉด 1.5์ด)
- ๋จ์ํ ๋ณต์กํ๊ฒ ๋ง๋ ๊ฒ
๋ฐ์ฌ๋ก 2: ๊ณ์ธต ์ค๋ฒ์์ง๋์ด๋ง
Sequential:
Agent A โ Agent B โ Orchestrator โ Agent C โ Agent D
- 4๊ฐ agent ์์ฐจ ์คํ
- Orchestrator๋ ์์ฐจ ํ๋ฆ ๊ด๋ฆฌ
- ์ง์ฐ = 4์ด + orchestration overhead = 5์ด ์ด๊ณผ
- ๋ณ๋ ฌ์ด๋ฉด 1.5์ด ๊ฐ๋ฅ
๋ฐ์ฌ๋ก 3: ๋ผ์ฐํฐ ์ค๋ฅ ์ฒ๋ฆฌ ์์
"์ฌ์ฉ์ ์ง๋ฌธ์ ๋ด์ ์์
์ฉ/๊ธฐ์ ์ฉ agent๋ก ๋ผ์ฐํ
"
- ๋ช
ํํ์ง ์์ ์ง๋ฌธ โ ๋ผ์ฐํฐ๊ฐ ์๋ชป ์ ํ
- ๋์ฒด agent๋ ์ฌ๋ถ๋ฅ ๋ก์ง ์์
- "์ญ์ AI๋ ์ดํด ๋ชปํ๋ค" โ ์ ๋ขฐ๋ ํ๋ฝ
๋ฐ์ฌ๋ก 4: ๋ณต์กํจ ์ฌํ
Hierarchical + Router + Sequential ๊ฒฐํฉ
- ๋น์ฉ๊ณผ ๊ด๋ฆฌ ๋ณต์ก๋ ์ฆํญ
- "์ ์ด๋ ๊ฒ ๋๋ ค?" ์์ธ ํ์
์ด๋ ค์
Further Reading
- Anthropic, "Building Effective Agents" (2024) โ Workflow vs agent patterns
- LangGraph Documentation โ Orchestration pattern implementations
Contextual Knowledge (auto-loaded)
๋ณด์กฐ ํ์ผ์ด ์กด์ฌํ ๋๋ง ์๋ ๋ก๋๋ฉ๋๋ค. ํ์ผ์ด ์์ผ๋ฉด ๊ฑด๋๋๋๋ค.
Good Example
!cat examples/good-01.md 2>/dev/null || echo ""
Bad Example
!cat examples/bad-01.md 2>/dev/null || echo ""
Domain Context
!cat context/domain.md 2>/dev/null || echo ""
Test Cases
!cat references/test-cases.md 2>/dev/null || echo ""
Troubleshooting
!cat references/troubleshooting.md 2>/dev/null || echo ""
Model Routing โ ๊ตฌํ ๋ ํผ๋ฐ์ค (router ํจํด ํตํฉ)
!cat references/model-routing.md 2>/dev/null || echo ""
Model Routing โ Good Example
!cat examples/model-routing-good.md 2>/dev/null || echo ""
Model Routing โ Bad Example
!cat examples/model-routing-bad.md 2>/dev/null || echo ""