Hierarchical CrewAI on Claude: Manager-Delegate Orchestration with Acceptance Criteria
Advanced · 45 minutes · 5 tasks, checked automatically · 100 points
Build a production-grade hierarchical CrewAI system powered by Claude where a manager agent delegates work to specialist agents and enforces its own acceptance criteria — rejecting and re-requesting work that does not meet the bar. You will wire up a research specialist, a writing specialist, and a quality-control manager that can loop until output satisfies explicit criteria. This lab teaches the core orchestration pattern that makes multi-agent systems reliable rather than merely parallel.
What you’ll learn
- Install CrewAI and configure it to use Claude via the ANTHROPIC_API_KEY environment variable
- Define three agents — a researcher, a writer, and a manager — with distinct roles, goals, and backstories
- Implement a hierarchical Crew where the manager delegates tasks to specialists using Process.hierarchical
- Enforce acceptance criteria through a Pydantic output model and a task callback that raises on failure
- Demonstrate that the manager rejects and retries work that does not meet the acceptance bar
How this lab works
- Start the lab: One click starts a sandbox with a local model and the agent’s toolbox: no API key and no token bill.
- Work through 5 tasks: Each task says what to build or fix. You do it yourself, in a real terminal, with hints when you get stuck.
- Check your work: Check my work inspects the agent, its config and its output, and says what passed and what to fix.
- Finish and keep going: 100 points, your progress saved, and the next lab to try.
What it runs on
- Runs: Locally, against a model on your computer: no API key, no tokens
- Model: claude-sonnet-4-6
- Open source: github.com/crewAIInc/crewAI
What you need
- A free LearnXops account
- The LearnXops desktop app for macOS, Windows or Linux
- Anthropic API key added once in the LearnXops Agent Playground (stored encrypted in OS keyring)
- Toolbox container started from the Agent Playground — ANTHROPIC_API_KEY is already in the environment
Topics: crewai, hierarchical, manager-agent, delegation, acceptance-criteria, pydantic, claude, anthropic, orchestration, multi-agent
Create a free account to start this lab.
Keep going
- Route Between Models in LangGraph: Cheap vs. Hard Reasoning
- Persistent OpenClaw: docker-compose with Surviving Volumes
- Lock OpenClaw Down: Pairing Approval, Per-Skill Permission Scoping, and Shell Command Allowlisting
- Autonomous File Triage & Daily Digest with OpenClaw
- Harden Hermes: Route All Tool Calls Through Docker Containers
- Run the Hermes Gateway as a Persistent Service with Request Logging and Clean Shutdown