AIStackWatch
Back to wiki

What is an Agent Framework?

An agent framework is a library that wraps LLM calls into structured workflows — typically adding tool-use, memory, and control flow so a single user prompt can drive a multi-step process.

What problem does it solve?

Raw LLM calls are single-shot. Building a coding agent, a research assistant, or a customer-support bot requires:

  • Calling external tools (search, code execution, database queries)
  • Deciding when to stop
  • Handling partial failures
  • Composing several sub-agents

Agent frameworks give you these primitives.

  • LangGraph — graph-based state machine from the LangChain team. You declare nodes and edges, the runtime handles persistence, retries, and streaming.
  • CrewAI — role-based "crew" metaphor, fast to prototype. Works well when you can describe work as a team of specialists.
  • AutoGen — Microsoft Research, strong multi-agent chat patterns, solid in Python notebooks.
  • Mastra — TypeScript-first, designed for Node and edge runtimes. Good if your product is already a TS monorepo.
  • Agno — lightweight Python framework focused on low-latency agent loops and model-agnostic tooling.

What you give up

Every framework adds abstractions you have to understand when things break. A stuck agent is always harder to debug through a graph engine than through plain function calls. You also inherit the framework's defaults — retry policies, token budgets, memory shape — and bending them is sometimes more work than writing the loop yourself.

Failure modes

  • Abstraction overfitting. You modeled the workflow as a "crew" but the real work is a simple pipeline; now you fight the framework.
  • Version churn. This part of the stack moves fast. A minor-version bump can change core APIs. Pin hard, upgrade deliberately.
  • Hidden cost. Built-in retry loops silently multiply your API bill during outages.

When NOT to use one

If your workflow is 1-2 LLM calls and a tool lookup, a framework is overkill — a handful of fetch() calls is simpler and easier to debug. Pick a framework when you need durability, branching, or multi-agent coordination — not just because it is the default suggestion on a tutorial.