Multi-Agent with Claude Code

AI & HCI
주제와 조건을 입력하면 9개 서브에이전트가 조사하고, 쓰고, 검토하고, 고친다 — 코드 없이
Posted on July 4, 2026, 12:36 p.m. by SANGJIN
random_image

Built a multi-agent pipeline that automatically generates a lecture plan from a natural language prompt. No code — orchestrated entirely through CLAUDE.md (entry point only, 3 lines) and agent definition files (.claude/agents/*.md).

The pipeline runs in 4 rounds: sequential planning → parallel web research (up to 5 researchers simultaneously) → sequential writing → parallel review (content / time allocation / difficulty checked independently, then combined by a final reviewer). A rework loop re-invokes the writer if the combined score falls below 80, up to 2 times.

Key design decisions:

CLAUDE.md is the entry point only — all orchestration logic lives in orchestrator.md, keeping the two roles cleanly separated and independently replaceable

Parallel execution via Task tool multi-call: 5 researchers run simultaneously, 3 reviewers run simultaneously — same concept as n8n's node branching or LangGraph's add_edge fan-out, expressed in natural language

Researcher search strategy: queries combine subtopic + educational keywords ("강의", "부트캠프", "클래스") and exclude definitions, papers, and personal blogs — so results reflect how topics are actually taught, not what they mean

Two-log system: subagent_log.csv (real-time hook recording via SubagentStart/SubagentStop) vs pipeline_log.md (end-of-run summary with subtopics, scores, rework count, and file paths)

Actual run on "AI tools for non-developer office workers (1-day, beginner)": 5 researchers in parallel → writer → 3 reviewers in parallel → difficulty scored 58 (Zapier/Make content inappropriate for beginners) → rework triggered → passed on 2nd attempt.

Tech: Claude Code v2.1.186, Claude Sonnet (subagents), WebSearch tool, Bash hooks (SubagentStart/SubagentStop)


자연어 프롬프트 하나로 강의계획서를 자동 생성하는 멀티에이전트 파이프라인을 만들었다. Python 코드 없이 — CLAUDE.md(진입점, 3줄)와 에이전트 정의 파일(.claude/agents/*.md)만으로 전체 흐름을 구성했다.

파이프라인은 4라운드로 구성된다. 서브토픽 분해(순차) → 서브토픽별 웹 검색(병렬, 최대 5개 동시) → 초안 작성(순차) → 3종 병렬 검토(내용/시간배분/난이도 독립 평가 후 종합). 종합 점수가 80점 미만이면 writer를 재호출하는 루프가 최대 2회 동작한다.

핵심 설계 결정:

CLAUDE.md는 진입점만 담당 — 오케스트레이션 로직은 orchestrator.md에 분리해서 두 역할을 명확히 구분하고 독립적으로 교체 가능하게 설계

Task tool 동시 호출로 병렬 실행 구현: researcher 5개, reviewer 3개가 동시 실행 — n8n의 노드 분기+Merge, LangGraph의 add_edge fan-out과 동일한 개념을 자연어로 표현

researcher 검색 전략: 서브토픽 + 교육 키워드("강의", "부트캠프", "클래스") 조합, 용어 정의·논문·개인 블로그 제외 → 실제로 어떻게 가르치는지를 수집

두 가지 로그 체계: subagent_log.csv(hook 실시간 자동 기록) vs pipeline_log.md (실행 완료 후 요약 — 서브토픽, 점수, 재작업 횟수, 파일 경로 포함)

실제 실행 결과("비개발자 직장인 초급 AI 활용 1일 강의"): 5개 병렬 검색 → 초안 작성 → 3개 병렬 검토 → difficulty 58점(초보자 대상에 Zapier/Make 내용 포함이 원인) → 재작업 트리거 → 2차 통과.

사용 기술: Claude Code v2.1.186, Claude Sonnet(서브에이전트), WebSearch tool, Bash hooks (SubagentStart/SubagentStop)

Links

Velog: https://velog.io/@kosang234/%EC%84%B8-%EC%A4%84%EB%A1%9C-%EC%8B%9C%EC%9E%91%ED%95%98%EB%8A%94-Multi-Agent-AI-Workflow-%EA%B0%95%EC%9D%98%EA%B3%84%ED%9A%8D%EC%84%9C-%EC%9E%90%EB%8F%99-%EC%83%9D%EC%84%B1%EA%B8%B0%EB%A5%BC-%EB%A7%8C%EB%93%A4%EB%A9%B4%EC%84%9C-%EA%B9%A8%EB%8B%AC%EC%9D%80-%EA%B2%83%EB%93%A4

AI

Leave a Comment: