Get Started
Agent engineering

Mission 2 of 8

Build one agent five ways and see what each framework really does.

Every agent framework is a loop you could write in an afternoon, plus opinions. You'll build one identical agent in four frameworks and a no-code tool, then decide with evidence rather than marketing.

75 minIntermediateUnder $1 of Anthropic credit for all five runsStep 1 free

What you'll do

Fix the rules of comparison

Use the same two tools, the same task and the same model every time, then install all four frameworks.

Build it in four frameworks

Run the mission 1 agent in the Claude Agent SDK, OpenAI Agents, LangGraph and CrewAI, each in one short file.

Pick one with a decision table

Add the no-code n8n version, compare all five on what matters at 2am, and choose for your situation.

  • See the honest trade-offs: control, debuggability, lock-in and dependency weight
  • Understand why the rest of this track is written against the raw SDK
Before you start
  • Mission 1 finished: agent.py and expenses.txt in your agent-lab folder, venv active, ANTHROPIC_API_KEY set
  • Node.js 18+ for the Claude Agent SDK (it drives the Claude Code CLI under the hood). Check with node --version
  • About 1.5 GB of disk for the four frameworks' dependencies. They are heavy; that is part of the lesson
  • Optional: an n8n instance for step 6. Your own Zapier with n8n sets one up in 20 minutes
Your progress0/7
01/07One agent, one task, five builds: the rules of the comparison0 done
STEP 01 of 07~6 min

One agent, one task, five builds: the rules of the comparison

A fair comparison needs the same tools, the same task and the same model. Fix those first.

Before you build anything, you need a fair test. If the tools, the task or the model change between builds, you end up comparing the wrong things.

The tools and the task

Every version below uses the two functions from mission 1, imported from agent.py, so the tools are byte-for-byte identical. Every version gets the same task:

The task, used in every build
Read expenses.txt. Use the calculator for every sum. Tell me the total, the average per line, and which line was the biggest.

That task is deliberately multi-step: read, then several calculations, then a comparison. One tool call is not enough; a model that tries to do the arithmetic in its head is caught by the "use the calculator" instruction.

It is the smallest task that separates a loop from a single call.

The model

Every version uses claude-sonnet-5-5 so model quality is held constant. Three of the frameworks default to other providers.

The point of routing them all to the same model is that you are comparing frameworks, not models.

Install everything

  1. Run this install. It takes a few minutes and a surprising amount of disk:

    Terminal, venv active
    pip install claude-agent-sdk "openai-agents[litellm]" langchain langchain-anthropic crewai
    # the Claude Agent SDK also needs the Claude Code CLI on your PATH (it drives it):
    npm install -g @anthropic-ai/claude-code

    While it installs, run pip list | wc -l (Mac/Linux) or (pip list).Count (PowerShell) before and after. Mission 1 needed one package and its handful of dependencies. Note the number now.

    Dependency weight is a real cost: every package is something that can break on upgrade, and in mission 8 every one of them goes into a Docker image.

    Tip
    Install into the same venv as mission 1 so from agent import read_file, calculate works unchanged. If you want them separate later, you know how.
Checkpoint
All four packages import without error: python -c "import claude_agent_sdk, agents, langchain, crewai; print('ok')".
If it breakscrewai fails to install on Python 3.13 + 1 more
crewai fails to install on Python 3.13
CrewAI tracks Python versions slowly. Use a 3.12 venv for this mission: py -3.12 -m venv .venv312 (Windows) or python3.12 -m venv .venv312.
The pip resolver takes forever or reports conflicts
Install the four one at a time instead of in one command, CrewAI last. If two of them genuinely conflict, install the conflicting one in its own venv; the comparison still holds.
Still stuck? Ask the community
Next mission · Agent engineeringTools that agents can actually use: schemas, return shapes, recoverable errors, timeouts
→