0Pricing
AI Agents · Lesson

Choosing the Right Framework Per Use Case

A decision tree: single-step? long-running? multi-agent? coding? Each branch points to a different tool.

Choosing the Right Framework Per Use Case is a free AI Agents lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AI Agents learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

There Is No Best Framework

Each framework excels at different patterns. Pick based on the SHAPE of your task, not the hype cycle.

Decision Tree

  1. Single-step (one model call, maybe one tool)? -> Hand-rolled.
  2. Multi-step linear (A -> B -> C)? -> LCEL or hand-rolled.
  3. Multi-step with loops/branches? -> LangGraph.
  4. Role-based crew, declarative tasks? -> CrewAI.
  5. Long-lived memory across sessions? -> Letta or Mem0.
  6. Code-execution focus? -> AutoGen or OpenHands.
  7. Managed RAG + code interpreter prototype? -> OpenAI Assistants.
  8. Web browsing / GUI? -> Anthropic Computer Use / Operator / Playwright.

Other Real-World Factors

  • Team familiarity (Python vs JS, async vs sync)
  • Observability story (LangSmith / Langfuse / OTel)
  • Deployment shape (Docker, serverless, k8s)
  • Maturity / churn of the framework

Cross-Framework Standards

Where possible, build to standards that survive framework churn:

  • OpenAI-shaped APIs — most providers and frameworks accept them
  • JSON Schema for tool definitions — universal
  • Pydantic for typed inputs / outputs — used everywhere
  • OpenTelemetry for traces — vendor-neutral

Build For Replaceability

Wrap the framework in a thin adapter layer:

class AgentRunner:
    def run(self, task: str) -> str:
        # implementation may be LangGraph today, AutoGen tomorrow
        ...

Don't Overweight Today's Choice

Frameworks come and go. Most agents have to be rewritten every 12-18 months as primitives improve. Plan for rewrites; don't marry the framework.

Start Without a Framework

A common path:

  1. Hand-roll a minimal agent
  2. Identify the messiest parts
  3. Adopt a framework that handles those specific messes

You learn what you actually need before you commit.

When NOT to Use Multi-Agent

Many teams reach for multi-agent too early. If a single agent with a good system prompt works, stick with it. Multi-agent adds complexity AND cost.

Sweet Spots by Stack

  • Python, production, complex — LangGraph
  • Python, declarative, simple — CrewAI
  • Python, code-focused — AutoGen or OpenHands
  • TypeScript — LangChain.js / Vercel AI SDK
  • Long-lived memory — Letta or Mem0
  • Zero infra prototype — OpenAI Assistants

Hosted Agent Platforms

Some teams skip frameworks via:

  • LangGraph Platform — hosted LangGraph runtime
  • Cloudflare AI Workers — serverless agents
  • Vercel AI SDK + KV — for full-stack Next.js teams

Pre-Pick Eval Tooling

Whatever you choose, make sure tracing/eval integrates. Langfuse and LangSmith adapt to most frameworks; Helicone, Phoenix, and W&B Weave are alternatives.

Recap

Match framework to shape: linear chains -> LCEL, graphs -> LangGraph, crews -> CrewAI, long memory -> Letta, code -> AutoGen, prototypes -> Assistants. Wrap behind an adapter and plan for rewrites.

Right Choice

You have a multi-step workflow with loops, branches, and human-in-the-loop. Which framework fits best?

Frequently asked questions

Is the “Choosing the Right Framework Per Use Case” lesson free?

Yes — the full text of “Choosing the Right Framework Per Use Case” is free to read here on the web, and the AI Agents course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AI Agents course, upgrade to CoddyKit PRO.

What will I learn in “Choosing the Right Framework Per Use Case”?

A decision tree: single-step? long-running? multi-agent? coding? Each branch points to a different tool. You practise AI Agents with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start AI Agents?

No prior experience is required. AI Agents on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Choosing the Right Framework Per Use Case” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this AI Agents lesson?

Yes. Every AI Agents lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. LangGraph vs CrewAI vs AutoGen
  2. Letta (formerly MemGPT) for Long-Lived Agents
  3. OpenAI Assistants API and Threads
  4. Choosing the Right Framework Per Use Case
← Back to AI Agents