langchain vs openai-agents-python

Two of the top projects in Agent frameworks and SDKs, side by side: who leads on each score part and who each one suits, then setup, license, activity and what each review found.

11st of 15 in Agent frameworks and SDKs

langchain

Python framework for building LLM agents and apps from interoperable components

88 out of 100
#44th of 15 in Agent frameworks and SDKs

openai-agents-python

Python SDK for multi-agent workflows with handoffs, guardrails and tracing

77 out of 100

Verdict

langchain ranks higher, 88 to 77. Of the 4 score parts we measure for both, langchain leads on 1, openai-agents-python on 2 and 1 is even.

  • Adoptionlangchain leads by 64 points, 98 to 34: a wide gap.
  • FreshnessEven at 100.
  • Maintenanceopenai-agents-python leads by 14 points, 99 to 85.
  • Agent-readyopenai-agents-python leads by 40 points, 70 to 30: a wide gap.

Pick langchain if you are

Python developers building LLM agents and applications in code

  • Common interface across model providers, embeddings and vector stores
  • Large integrations library covering tools, retrievers and vector stores

Pick openai-agents-python if you are

Python developers building tool-using or multi-agent LLM apps

  • Small API: Agent and Runner cover a text agent in a few lines
  • Tools can be Python functions, MCP servers or hosted tools
langchain vs openai-agents-python: score parts and facts
What we comparelangchainopenai-agents-python
Score parts, out of 100
Adoption98, widely used34, known
Freshness100, active100, active
Maintenance85, healthy99, healthy
Easy to runNot scored for this kindNot scored for this kind
Agent-ready30, minimal70, partly
Facts from GitHub and the README
Stars147.8k30k
LicenseMIT (permissive)MIT (permissive)
Last commitOct 2026Oct 2026
Last releaseOct 2026Oct 2026
LanguagePythonPython
DockerNoNo
GPUNot statedNot needed
arm64 or Apple SiliconNot statedNot stated

langchain

LangChain is a Python library that gives a standard interface to chat models, embeddings, vector stores and tools, so providers can be swapped with little code change. Models load through init_chat_model with a provider:model string. For lower-level agent orchestration it points to LangGraph, and for tracing and evals to LangSmith.

Who it is for: Python developers building LLM agents and applications in code

Strengths

  • Common interface across model providers, embeddings and vector stores
  • Large integrations library covering tools, retrievers and vector stores
  • Companions: LangGraph for orchestration, Deep Agents for planning and subagents
  • MIT license; JS/TS counterpart available as LangChain.js

Weaknesses

  • Observability, evals and managed deployment sit in LangSmith, a separate product
  • Controllable stateful agent workflows need LangGraph, not core LangChain
  • README gives no hardware requirements or list of supported providers
  • Abstraction layer is another API to learn on top of provider SDKs
  • Needs Model provider API or other model backend
  • Models: OpenAI (README example), Other providers via integrations

openai-agents-python

Python library from OpenAI for building agents with instructions, tools, guardrails and handoffs between agents. It supports the OpenAI Responses and Chat Completions APIs and, per the README, 100+ other LLMs. It also includes sandbox agents, realtime and voice agents, sessions for conversation history, human-in-the-loop controls and built-in tracing.

Who it is for: Python developers building tool-using or multi-agent LLM apps

Strengths

  • Small API: Agent and Runner cover a text agent in a few lines
  • Tools can be Python functions, MCP servers or hosted tools
  • Built-in tracing, guardrails, sessions and human-in-the-loop support
  • Includes sandbox, realtime and voice agents; MIT license, Python 3.10+

Weaknesses

  • Examples assume OPENAI_API_KEY; non-OpenAI models go through optional LiteLLM or any-llm
  • Pull requests limited to repository collaborators
  • Python only; JS/TS version is a separate repository
  • Realtime agents use gpt-realtime-2.1, an OpenAI-hosted model
  • no GPU
  • Needs OpenAI API key, Python 3.10+, optional: Redis, optional: SQLAlchemy, optional: websockets, optional: LiteLLM or any-llm, optional: Docker
  • Models: OpenAI Responses API, OpenAI Chat Completions API, 100+ other LLMs via LiteLLM or any-llm

More in Agent frameworks and SDKs

Building with these?

We help teams pick an open-source AI stack and run it in production. Client work never changes a rank.