—
LangChain agents are the part of the LangChain framework that turns a language model from a text generator into a system that can take actions. A LangChain agent is given a model, a set of tools and instructions, and it then works through a task by reasoning about what to do next, calling a tool, reading the result and repeating the loop until the job is done. If you are deciding whether LangChain is the right way to build your agent, the short answer is that it suits teams who want a well-supported, open-source starting point with a large integration catalogue, and who are happy to add their own guardrails for production use.
The framework itself is open source under the MIT licence, maintained by LangChain Inc., and it was first released as a Python library in October 2022. It was created by Harrison Chase, and it grew out of a simple idea: developers needed reusable pieces for building applications on top of large language models, such as model wrappers, prompt templates, retrievers and tool handling, instead of writing the same plumbing for every project. Agents were the natural next step, because once a model can call tools, it can fetch data, run code and update other systems on its own.
Key takeaways
- LangChain agents run a loop: the model reasons, calls a tool, observes the result and decides the next step.
- Since version 1.0, released in October 2025, the standard way to build one is
create_agent, with the agent loop running on LangGraph underneath. - LangChain is open source and MIT licensed, maintained by LangChain Inc., with Python and TypeScript software development kits.
- Its strength is breadth: hundreds of integrations for models, tools and data sources, plus the LangSmith platform for tracing and evaluation.
- Production reliability still depends on your own testing, limits, human review points and evaluation, not on the framework alone.
What LangChain agents actually are
A LangChain agent is not a separate product or a hosted service. It is a pattern inside the LangChain framework: a language model placed inside a loop with tools it can call.
The model receives a task and a description of the tools available to it, and it decides for itself which tool to use, what arguments to pass and when the task is finished. The framework handles the mechanics of that loop, including formatting tool calls, passing results back to the model and keeping a record of the conversation.
This matters because it changes what the model can do. Without tools, a model can only produce text from what it already knows. With tools, it can search the web, query a database, read a file or call an internal service, and then base its next step on real information.
The agent loop is the core idea to understand before anything else. Each turn follows the same shape: the model thinks about the current state of the task, chooses an action, the framework executes that action, and the observation comes back into the model’s context. The loop repeats until the model gives a final answer or a limit is reached.
The pieces that make up an agent
Four pieces do most of the work. The model provides the reasoning, and LangChain lets you swap models from different providers behind one interface, so the agent code does not have to change when you change provider.
The tools are the functions the agent can call, each described in plain language so the model understands when to use it. The system prompt sets the agent’s role, its boundaries and how it should behave. And the loop itself, the part that runs the model, executes tools and manages the message history, is what create_agent now provides out of the box.

How LangChain agents changed in version 1.0
LangChain 1.0, released in October 2025, simplified the framework in a way that matters for anyone starting now. The many older ways of building agents were replaced by a single agent abstraction built around create_agent: you give it a model, a list of tools and a system prompt, and it runs the loop for you. The older chain and agent application programming interfaces moved into a package called langchain-classic, which means many tutorials written before 1.0 no longer match the current code.
Underneath, LangChain agents are now built on LangGraph, the company’s orchestration library for stateful workflows. That change is mostly invisible when you use create_agent, but it is useful to know, because it means the agent’s execution is a graph with persistent state rather than a simple loop hidden inside a function.
If you later need finer control, such as pausing for a human to approve a step or resuming after a failure, you can drop down to LangGraph directly. Our guide to agent state management explains why that persistence matters once agents run for more than a few seconds.
What LangChain agents are good at
Best for: teams that want a fast, well-documented start on tool-using agents with broad model and tool support.
LangChain agents shine where the task is a short loop of reasoning and tool use: answering questions over internal documents, triaging support requests, drafting content from research, or automating a repetitive workflow that needs a few lookups and a decision. The framework’s breadth is the reason. With integrations for many models, vector stores, document loaders and common services, you can usually assemble a working prototype in a day rather than spending a week writing adapters.
The ecosystem around the framework adds to that. LangSmith, LangChain Inc.’s separate platform, provides tracing, evaluation and deployment tooling, so you can watch what an agent did step by step and test it against a set of examples before release.
That observability is not a luxury for agents. Because an agent chooses its own path through a task, two runs of the same request can take different routes, and without traces you cannot tell why one succeeded and the other failed.
Where LangChain agents struggle
The framework’s breadth is also its main weakness. LangChain has a large surface area, many packages and a history of fast-moving application programming interfaces, which can make it hard to know which parts are current. The 1.0 release addressed some of this by consolidating the agent interface, but older blog posts, courses and code samples still describe the pre-1.0 approach, and following them can waste hours.
LangChain agents also do not solve the hard problems of agent reliability on their own. An agent can call the wrong tool, misread a result, repeat a step or produce a confident answer from incomplete information.
The framework gives you hooks and tracing to catch these failures, but you still have to write the evaluations, set the step and cost limits, decide which actions need human approval and handle errors when a tool fails. Teams that skip that work often discover the gaps only after the agent is live.
LangChain agents compared with the alternatives
| Aspect | LangChain agents | LangGraph | CrewAI |
|---|---|---|---|
| Main idea | One model in a tool-calling loop | Agents as graphs of nodes and edges | Teams of agents with roles and tasks |
| Control over flow | Model decides each step | Developer defines the graph explicitly | Roles and task order define the flow |
| State and memory | Message history, via LangGraph underneath | Built-in checkpointing and persistence | Crew memory and task context |
| Human review | Added with middleware or LangGraph | Built-in human-in-the-loop support | Added at task or crew level |
| Learning curve | Lowest for a first agent | Higher, needs graph thinking | Low, reads like a team brief |
| Best use | Single-agent tools and retrieval tasks | Long-running, branching workflows | Role-based multi-agent work |
Building a LangChain agent that behaves
Put limits around the loop from the start. Cap the number of steps, set a timeout, and track the cost of each run.
Give the agent read-only tools first, and add tools that change data only after the read-only version behaves. Destructive actions, such as sending messages, deleting records or moving money, should need a human approval step or a separate confirmation. Our guide to tool calling explains how to design tool descriptions so the model chooses the right tool for the right job.
Testing before you trust it
Agents need evaluation, not just a demo. Build a small set of test tasks with known good outcomes, run the agent against them, and record where it succeeds, where it takes a wrong turn and how much each run costs. Re-run the same set after every change to the prompt, the tools or the model, because a small prompt edit can change behaviour in ways you will not notice by reading a single example.
LangChain agent checklist
Use this checklist before letting a LangChain agent near real users or real data.
- ☐ The task has a clear input, a clear output and a way to tell success from failure.
- ☐ The tool list is short, and every tool has a plain-language description with examples.
- ☐ Step, time and cost limits are set, and the agent stops cleanly when it hits them.
- ☐ Tools that change data are separate from read-only tools, and risky actions need approval.
- ☐ The system prompt states what the agent must never do and what to do when information is missing.
- ☐ A test set of realistic tasks exists, and results are recorded before and after each change.
- ☐ Traces are kept for every run, so failures can be replayed and diagnosed.
- ☐ The model, the tools and the framework version are pinned, so a silent upgrade cannot change behaviour.
When to choose LangChain agents, and when not to
Choose LangChain agents when you need a single agent that reasons and uses tools, when you want broad integration support, and when your team values a large community and extensive documentation. It is a strong default for retrieval-based assistants, internal tools and prototypes that may grow into production systems, especially if you are already using LangChain for the surrounding application.
Frequently asked questions
What is a LangChain agent?
A LangChain agent is a language model placed inside a loop with tools it can call. It reasons about a task, chooses a tool, observes the result and repeats until the task is done, with the LangChain framework handling the mechanics of the loop.
Who maintains LangChain?
LangChain is maintained by LangChain Inc., the company founded around the project after its first release in October 2022. The framework is open source under the MIT licence, with Python and TypeScript software development kits.
How do I create a LangChain agent?
Since version 1.0, the standard approach is create_agent, which takes a model, a list of tools and a system prompt and runs the loop for you. The official documentation at docs.langchain.com shows how the agent loop relates to the LangGraph runtime underneath.
Are LangChain agents free to use?
The framework itself is free and open source under the MIT licence. You still pay for the language model and any services the agent calls, and LangSmith, the separate tracing and evaluation platform, has its own pricing for paid tiers.
Do LangChain agents need LangGraph?
Since version 1.0, LangChain agents run on LangGraph under the surface, and LangGraph is a dependency of the framework. You do not need to learn LangGraph to use create_agent, but learning it helps when you need explicit control over state, branching or human review.
What is the difference between a LangChain agent and a chain?
A chain is a fixed sequence of steps, such as retrieve documents and then generate an answer, while an agent decides its own steps by choosing tools as it goes. Chains suit predictable work; agents suit work where the next step depends on what the previous step found.







