LangChain vs CrewAI comes down to how you want to describe the work. Pick LangChain when your app is one agent that calls tools in a loop and you want fine control over that loop: retries, model fallbacks, approval steps and limits are all middleware you add to create_agent. Pick CrewAI when the job reads naturally as a team, such as a researcher who gathers facts and a writer who turns them into a reply, and you want to declare those roles and tasks rather than wire them yourself. Both are free, MIT licensed Python libraries, they do not depend on each other, and they can run in the same app.

This guide compares them on the points that decide real projects, with the same small support task built in both. We ran every example on Python 3.13.5 on October 24, 2026, with langchain 1.4.7 and crewai 1.15.30 (both current on PyPI that day), using scripted stand in models so the runs needed no API key. If you are choosing between LangGraph and CrewAI instead, our LangGraph vs CrewAI vs OpenAI Agents SDK comparison covers that, and LangChain vs LangGraph explains how those two layers fit together.

LangChain vs CrewAI at a glance

ItemLangChainCrewAI
Core ideaOne agent: a model plus tools plus middlewareA crew: agents with roles, goals and tasks
Multiple agentsPatterns you build: subagents as tools, handoffs, router, skillsBuilt in: sequential or hierarchical process
Structure around agentsLangGraph, the runtime under create_agentFlows: @start, @listen and router steps with state
Human approvalHumanInTheLoopMiddleware with a checkpointer@human_feedback on a Flow step (1.8.0 and later)
ModelsProvider packages such as langchain-openai, langchain-anthropic, langchain-ollamaNative SDKs for OpenAI, Anthropic, Gemini, Azure, Bedrock, Snowflake; LiteLLM for the rest
MCPlangchain-mcp-adaptersmcps field on an agent, plus MCPServerAdapter
LicenseMITMIT
Hosted optionLangSmith (tracing, evals, deployment)CrewAI's platform (visual editor, deployment)

The short version: LangChain starts from a single loop and lets you grow it, while CrewAI starts from a team and gives you a vocabulary for it.

The real difference: one loop vs a team of roles

LangChain's own docs describe an agent as "Model + Harness", and create_agent is that harness: the prompt, the tools and any middleware around the model loop. The model decides which tool to call, LangChain runs it, and the loop repeats until the model answers. Everything else, from summarizing long histories to capping tool calls, is a middleware you add or leave out. The LangChain overview is the best short read on this design.

CrewAI begins one level higher. You define agents (a role, a goal and a backstory), tasks (a description and an expected output, assigned to an agent) and a crew that runs the tasks. With the default sequential process, tasks run in order and a later task can take an earlier one's output as context. With the hierarchical process, a manager agent delegates and checks work, and the crews docs say a manager_llm or manager_agent is required for it. CrewAI's README also answers a common question directly: it is a standalone framework with its own primitives, not a layer on top of LangChain.

So the question to ask is not which library is more capable. It is whether your problem is "one assistant with good tools" or "several specialists passing work along".

The same task in both

To make the difference concrete, we built a tiny support flow: look up order 1042 with an order_status tool, then write a one line reply to the customer.

In LangChain this is one agent with one tool:

from langchain.agents import create_agent
from langchain.tools import tool

@tool
def order_status(order_id: str) -> str:
    """Look up the shipping status of an order."""
    return f"Order {order_id}: shipped on Oct 22"

agent = create_agent(
    "openai:gpt-5",  # any chat model with tool calling
    tools=[order_status],
    system_prompt="You answer order questions in one friendly line.",
)
result = agent.invoke({"messages": [{"role": "user", "content": "Where is order 1042?"}]})
print(result["messages"][-1].content)

On our run the message list came back as four entries: the user question, a model message calling order_status with order 1042, the tool result, and the final reply. That is two model calls for the whole job.

In CrewAI the natural shape is two agents and two tasks:

from crewai import Agent, Task, Crew, Process
from crewai.tools import tool

@tool("order_status")
def order_status(order_id: str) -> str:
    """Look up the shipping status of an order."""
    return f"Order {order_id}: shipped on Oct 22"

researcher = Agent(role="Support researcher", goal="Find the facts about the customer's order",
                   backstory="You check order systems.", tools=[order_status])
writer = Agent(role="Reply writer", goal="Write a short friendly reply",
               backstory="You write support replies.")

find = Task(description="Find the status of order {order_id}.",
            expected_output="The order status.", agent=researcher)
reply = Task(description="Write a one line reply to the customer.",
             expected_output="A one line reply.", agent=writer, context=[find])

crew = Crew(agents=[researcher, writer], tasks=[find, reply], process=Process.sequential)
print(crew.kickoff(inputs={"order_id": "1042"}).raw)

On our run the researcher made two model calls (one to request the tool, one to give its answer) and the writer made one, so three in total. The crew output also kept each task's result separately, which is handy when a reviewer wants to see what the researcher found before the reply went out.

Neither result is "better". The LangChain version is shorter and cheaper for a job this small. The CrewAI version is easier for a non developer to read, and each role can get its own model, tools and instructions as the job grows.

When to use LangChain

Choose LangChain if most of these are true:

  • The job is one assistant with tools: answering questions over your data, filling in a form, calling a few APIs.
  • You want control over the loop itself. The built in middleware list includes tool retry, model retry, model fallback, summarization, human in the loop, model and tool call limits, PII detection and context editing.
  • You need a pause for approval. HumanInTheLoopMiddleware interrupts before chosen tools run and resumes from a checkpointer, as the human in the loop docs show.
  • You may need a custom graph later. create_agent runs on LangGraph, so you can drop down a level without changing frameworks.
  • You also work in TypeScript, where LangChain has a matching library.

For several agents, LangChain documents four patterns in its multi agent guide: subagents called as tools, handoffs, skills loaded on demand, and a router. It also points to Deep Agents when you want subagents and planning ready made. You get flexibility, but you pick and build the pattern yourself.

When to use CrewAI

Choose CrewAI if most of these are true:

  • The work splits cleanly into roles, such as research, draft and review, and you want each role's instructions in one readable place.
  • Product or operations people will read and adjust the setup. Roles, goals and expected outputs read like a job description.
  • You want delegation without writing routing code. The hierarchical process gives you a manager agent out of the box.
  • You need a defined process around the agents. CrewAI Flows add state, @start and @listen steps, routing and a @human_feedback decorator for approval gates, and a Flow can run a crew as one of its steps.

The tradeoff is that a crew makes more model calls for the same job, as our small test showed, and emergent collaboration between agents can be harder to debug than one loop. Keep crews small and give each task a precise expected output.

Models, tools and MCP

Both libraries let you switch model providers. LangChain does it through provider packages and a shared chat model interface. CrewAI's LLM docs say it ships native SDK integrations for OpenAI, Anthropic, Google Gemini, Azure, AWS Bedrock and Snowflake Cortex, and that other providers run through LiteLLM, which you add with the crewai[litellm] extra.

Both also speak the Model Context Protocol. LangChain loads MCP tools with the langchain-mcp-adapters package over stdio or streamable HTTP. CrewAI lets you list servers in an agent's mcps field, either as URLs or as MCPServerStdio, MCPServerHTTP and MCPServerSSE objects with tool filters, according to its MCP docs. If you plan to build your own server, our guide to building an MCP server in Python works with either.

One install note: crewai 1.15.30 requires Python below 3.14 and an openai package below version 3. We installed langchain 1.4.7 into the same environment without conflicts.

Pricing and licenses

The libraries cost nothing. Both repositories carry the MIT license, so commercial use is allowed as long as you keep the license notice. Your real costs are model usage and any hosted platform you add.

On the LangChain pricing page, LangSmith's Developer plan is $0 for one seat with up to 5,000 base traces a month, and the Plus plan is $39 per seat per month with up to 10,000 base traces and one free small serverless deployment, then pay as you go. The CrewAI pricing page lists a free Basic plan with the visual editor and 50 workflow executions a month, and a custom priced Enterprise plan that adds SSO, role based access control and deployment in your own VPC. Neither platform is required to run the open source library.

CrewAI also sends anonymous usage telemetry by default. Its README says prompts, task descriptions and API responses are not collected unless you opt in with share_crew, and that setting the OTEL_SDK_DISABLED environment variable to true turns telemetry off.

Using LangChain and CrewAI together

Because neither depends on the other, the cleanest bridge is a plain function. We wrapped a LangChain agent in a CrewAI tool, so a crew member can ask it questions:

from crewai.tools import tool

@tool("ask_orders_agent")
def ask_orders_agent(question: str) -> str:
    """Ask the LangChain orders agent a question about an order."""
    out = lc_agent.invoke({"messages": [{"role": "user", "content": question}]})
    return out["messages"][-1].content

In our test, a CrewAI "Support lead" agent called this tool, the LangChain agent ran its own order_status lookup, and the crew's final answer included the shipped date. This is a sensible way to reuse a LangChain agent your team already trusts inside a larger crew. The reverse also works: call crew.kickoff() from inside a LangChain tool when one step of a single agent is really a team job.

Verdict

Start with LangChain if you are building one agent, care about the details of its loop, or expect to need custom graphs later. Start with CrewAI if your problem is a small team of specialists and readability for non developers matters more than squeezing out model calls. If you are still weighing other options, our roundup of the best AI agent framework for Python covers Pydantic AI, the OpenAI Agents SDK and more, and the most popular AI agent framework guide shows how they compare on public usage numbers.

FAQ

Is CrewAI built on LangChain?

No. CrewAI's README describes it as a standalone Python framework with its own primitives for agents, tasks, crews, flows and tools, and langchain is not among the dependencies of crewai 1.15.30.

Is CrewAI better than LangChain for multi agent systems?

It is quicker if your agents map onto roles and a fixed process, because crews and the hierarchical manager are built in. LangChain gives you more choice of pattern (subagents, handoffs, router, skills) but you assemble it yourself.

Which is easier for beginners?

CrewAI's roles and tasks are easy to read, so many people find it quicker to get a first multi agent demo running. LangChain's create_agent is simpler for a single agent: one function call, a list of tools and a system prompt.

Can I use LangChain tools in CrewAI?

The simplest way is to wrap the call in a CrewAI @tool function, as shown above. That works for a LangChain tool or a whole LangChain agent, and it keeps each library's own error handling intact.

Are LangChain and CrewAI free for commercial use?

Yes. Both libraries are MIT licensed. You pay for the models you call, plus LangSmith or CrewAI's hosted platform only if you choose to use them.