A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
Production-ready AI orchestration patterns: workflows, function calling, single & multi-agent systems. AWS + OpenAI + Cl
Production-ready implementations of 8 AI orchestration patterns — from deterministic workflows to autonomous multi-agent systems.
Each pattern uses the same use case (tennis court booking) to highlight architectural differences, not domain complexity.
This repo implements the patterns described in my blog post:
AI Orchestration Deep Dive: From No-Agent to Multi-Agent and Beyond
Read the blog first for architecture diagrams, trade-offs, and decision guides.
| Pattern | Style | Runtime | Status |
|---|---|---|---|
| A - AI as Service | No agent, LLM parses only | Shared | ✅ Done |
| B - Workflow (Single-Process) | Fixed sequence | Single-Process | ✅ Done |
| C - Workflow (Multi-Process) | Fixed sequence | Multi-Process | ✅ Done |
| D - Function Calling | LLM suggests, you control loop | Shared | ✅ Done |
| E - Single Agent | Agent controls the loop | Shared | ✅ Done |
| F - Multi-Agent (Single-Process) | Manager routes dynamically | Single-Process | ✅ Done |
| G - Multi-Agent (Multi-Process) | Manager routes dynamically | Multi-Process | ✅ Done |
| H - Bedrock Agent | AWS-managed agent | Managed | ✅ Done |
✅ Local Patterns: A → B → C → D → E → F → G → H (all done!)
☁️ AWS Deployed: A → B → C → D → E → F → G → H (live on Lambda)
Control ←——————————————————————————————————————————→ Autonomy
A B C D E F G H
│ │ │ │ │ │ │ │
No Workflow Workflow Function Single Multi Multi Bedrock
Agent (Single) (Multi) Calling Agent Agent Agent (Managed)
│ │ │ │ │ │ │ │
You Fixed Fixed LLM Agent Manager Manager AWS
control steps steps suggests controls routes routes manages
all (single) (multi) you loop
control
Try the deployed patterns (AWS Lambda + API Gateway):
| Pattern | Health Check | Chat Endpoint |
|---|---|---|
| A - AI as Service | Health | curl -X POST https://7jtqo8ncu4.execute-api.us-east-1.amazonaws.com/chat -H "Content-Type: application/json" -d '{"message": "Book tomorrow at 3pm"}' |
| B - Workflow (Single) | Health | curl -X POST https://jwmoovw1se.execute-api.us-east-1.amazonaws.com/chat -H "Content-Type: application/json" -d '{"message": "Book tomorrow at 3pm"}' |
| C - Workflow (Multi) | Health | curl -X POST https://1ywzwz1hog.execute-api.us-east-1.amazonaws.com/chat -H "Content-Type: application/json" -d '{"message": "Book tomorrow at 3pm"}' |
| D - Function Calling | Health | curl -X POST https://3sd40p0zz4.execute-api.us-east-1.amazonaws.com/chat -H "Content-Type: application/json" -d '{"message": "Book tomorrow at 3pm"}' |
| E - Single Agent | Health | curl -X POST https://ok1ro2wdf1.execute-api.us-east-1.amazonaws.com/chat -H "Content-Type: application/json" -d '{"message": "Book tomorrow at 3pm"}' |
| F - Multi-Agent (Single) | Health | curl -X POST https://seymcwtuh9.execute-api.us-east-1.amazonaws.com/chat -H "Content-Type: application/json" -d '{"message": "Book tomorrow at 3pm"}' |
| G - Multi-Agent (Multi) | Health | curl -X POST https://nwnh1ys1u8.execute-api.us-east-1.amazonaws.com/chat -H "Content-Type: application/json" -d '{"message": "Book tomorrow at 3pm"}' |
| H - Bedrock Agent | Health | curl -X POST https://dck1pppjal.execute-api.us-east-1.amazonaws.com/chat -H "Content-Type: application/json" -d '{"message": "Book tomorrow at 3pm"}' |
All patterns implement a tennis court booking system:
check_availability(date, time) → returns available slots
book(slot_id, user_id) → reserves a slot
The difference: who decides which function to call and when.
The repository is organized into three main areas:
pattern-*/ folders - Each contains a complete implementation of one orchestration pattern with source code, dependencies, and sequence diagramsterraform/ folder - AWS infrastructure (Lambda + API Gateway) to deploy each pattern. One subfolder per pattern.shared/ folder - Common booking service logic reused across all patterns to keep the focus on orchestration differences, not business logicai-orchestration-patterns/
├── README.md
├── pattern-a-ai-as-service/
├── pattern-b-workflow-single-process/
├── pattern-c-workflow-multi-process/
├── pattern-d-function-calling/
├── pattern-e-single-agent/
├── pattern-f-multi-agent-single-process/
├── pattern-g-multi-agent-multi-process/
├── pattern-h-bedrock-agent/
├── scripts/
│ ├── package_lambda.py # Build tool for patterns A-F
│ └── requirements-lambda.txt
├── shared/
│ └── booking_service.py # Mock booking service (all patterns)
└── terraform/ # Infrastructure (Lambda + API Gateway)
├── pattern_a/
├── pattern_b/
├── ...
└── pattern_h/
Required:
For AWS deployment:
Run patterns locally without AWS:
# Install dependencies
cd pattern-d-function-calling
uv sync
# Run demo
uv run src/demo.py
# Create .env file (gitignored)
cat > .env << EOF
OPENAI_API_KEY=sk-...
EOF
For Patterns A-F (single Lambda):
python scripts/package_lambda.py pattern-a-ai-as-service
For Pattern G (3 Lambdas - manager, availability, booking):
cd pattern-g-multi-agent-multi-process
./build.sh
For Pattern H (2 Lambdas - action, invoker):
cd pattern-h-bedrock-agent
./build.sh
cd terraform/pattern_a
# First time: copy example config
cp terraform.tfvars.example terraform.tfvars
# Edit terraform.tfvars:
# - Add your OpenAI API key
# - (Pattern H only) Choose foundation model
# Deploy
terraform init
terraform apply
# Get endpoint
terraform output api_endpoint
# Test health
curl $(terraform output -raw api_endpoint)/health
# Test chat
curl -X POST $(terraform output -raw api_endpoint)/chat \
-H "Content-Type: application/json" \
-d '{"message": "Book tomorrow at 3pm"}'
Pattern H (Bedrock Agent):
foundation_model in terraform.tfvarsMoss Gu
MIT
npx CLI installing 100+ agents, commands, hooks, and integrations in one command
干净、强大、属于你的 AI Agent 平台 --AI agents, without the clutter.
Native macOS app to monitor Claude AI usage limits and watch your coding sessions live
Pocket Flow: Codebase to Tutorial