anthropics / anthropics/claude-cookbooks

Agent orchestration patterns for multi-agent Claude workflows — CLI runtime approach

Đang mở
#446 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Jupyter Notebook
Star
52.7k
Fork
6.3k
Merge trung bình
25 phút
Pull request đã merge (30 ngày)
6

Mô tả

## Background

The Anthropic Cookbook has great examples of individual Claude agents, but I've been working on patterns for *coordinating multiple Claude agents* as a team — which seems underrepresented in the docs.

## The Gap

When you have 3+ Claude agents collaborating on a task, you hit coordination problems that the Claude API itself doesn't solve:

- **State tracking**: Which agent is working on what? What's completed, what failed?
- **Handoffs**: How does Agent A pass context to Agent B after completing a step?
- **Retry semantics**: When Agent B times out, does the whole pipeline restart?
- **Observability**: How do you see the whole team's state at a glance?

## One Pattern: External CLI Orchestrator

I built [ORCH](https://github.com/oxgeneral/ORCH) — a typed task queue that sits above Claude and manages team lifecycle:

```bash
npm install -g @oxgeneral/orch

orch agent add "Planner" --adapter claude --role "Break down user request into subtasks"
orch agent add "Backend" --adapter claude --role "Implement TypeScript code"
orch agent add "Reviewer" --adapter claude --role "Review code and approve"

# Formal state machine: todo → in_progress → review → done
orch task add "Build user auth system"
orch run --all # TUI shows all agents working in parallel
```

Agents communicate via `orch msg send` and share context via `orch context set/get`. State machine enforces review before completion, with auto-retry on failures.

## Questions / Requests

1. Are there canonical Cookbook examples for multi-agent coordination patterns? (Beyond the computer-use and tool-use examples)
2. Would a recipe for "multi-Claude-agent pipeline with state tracking" be useful to add to the Cookbook?
3. How does the Anthropic team recommend handling agent-to-agent handoffs in production workflows?

I'd love to contribute a Cookbook example showing this pattern if there's interest — the ORCH state machine approach could make a concrete, runnable example.

**Repo**: https://github.com/oxgeneral/ORCH | MIT | TypeScript

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.