We earn commissions when you shop through the links below.
Provides the latest guidance for building or modifying LLM applications with the LangChain open source libraries: Deep Agents, LangGraph, and LangChain, including how the libraries best fit together. The stack evolves quickly, so it's important to verify prior knowledge against this guidance. Also covers when Managed Deep Agents fits.
Capabilities
Understand the application
Identify the requested behavior, language, package versions, existing…
How the components relate
Deep Agents uses LangChain's create_agent internally, extending it…
Choose the application architecture
For a new reasoning and tool-calling agent, inspect Deep Agents'…
Retrieve the implementation contract
Inspect the manifest, lockfile, and relevant installed packages
Getting started
Full instructionsInstall the skill, then ask your AI tool for the task in plain words. The full SKILL.md below shows what it covers.
Instructions: SKILL.mdv1.0.2
Build and modify LangChain applications
Deep Agents is the most recent high-level agent abstraction we recommend in the
LangChain ecosystem and the default starting point for new agents. When an
application uses model reasoning to choose tools and determine its next steps,
start with Deep Agents. In Python, construct the agent with
deepagents.create_deep_agent.
Deep Agents builds on LangChain's create_agent and runs on LangGraph. It provides
a configurable agent harness with middleware, tools, and prompting; using it does
not require a complex task or a need for every built-in capability.
Use this skill to choose and compose these components. Retrieve current
implementation details from official documentation and installed packages.
Understand the application
Identify the requested behavior, language, package versions, existing agent or
graph, tool interfaces, state, and deployment constraints. For an existing
application, preserve its architecture and explicit provider/model choices unless
the requested change needs a different approach. For a new application, build
the user's actual use case rather than substituting a tutorial demo.
Distinguish ecosystem requests from concrete implementation constraints. A request
to “build an agent with LangChain” leaves the implementation architecture open.
Building with Deep Agents satisfies that ecosystem request.
Requirements such as “use langchain.agents.create_agent directly” or “do not add
the deepagents package” constrain the implementation. Honor explicit constraints;
do not infer an API choice from the ecosystem name alone.
How the components relate
Deep Agents uses LangChain's create_agent internally, extending it with
preconfigured middleware, tools, and system prompting for capabilities such as
planning, filesystem access, and delegation. It supports further customization
through tools and middleware.
Calling langchain.agents.create_agent directly constructs a base LangChain
agent; it does not include the Deep Agents harness. Use Deep Agents' public
builder to get that harness, and verify the corresponding entrypoint in the
current documentation for your language.
Both LangChain agents and Deep Agents run on LangGraph, which provides their
underlying execution runtime. LangGraph also supports explicit workflow
orchestration. Composition works in both directions: a LangGraph workflow can
contain a Deep Agent as a node, and a Deep Agent can invoke a LangGraph workflow
exposed as a tool.
Consult current documentation for the capabilities included by default and how
to configure or extend them.
Choose the application architecture
For a new reasoning and tool-calling agent, inspect Deep Agents' current
documentation and extension points before selecting an implementation. Use its
agent builder for agents that handle complex, multi-step tasks or benefit from its
built-in planning, filesystem, and subagent capabilities.
Preserve an existing application's architecture unless the requested change
requires revisiting it. Follow explicit user requirements about frameworks.
Use LangGraph when the application requires explicit sequencing, branching, or
workflow control. Where a workflow contains an autonomous agent, that node can
use Deep Agents. Where an agent needs a deterministic subtask, expose a LangGraph
workflow as a tool it can call.
Choose a base LangChain agent with create_agent for straightforward agent
applications, such as small agents with a limited tool set, when you want to
configure a smaller harness yourself, or when a concrete requirement makes Deep
Agents unsuitable.
Use a direct model call when no agent loop is needed.
Managed Deep Agents is LangSmith's hosted way to run Deep Agents. You define
the agent in code; LangSmith packages it as an Agent Server and manages its
deployment, persistent state, and agent context such as instructions and skills.
Consider it when the user wants to operate a Deep Agent without assembling that
runtime stack, or needs managed capabilities such as sandboxes or schedules.
Keep agent logic and hosted runtime choices distinct. Verify current capabilities
and setup in official docs and the installed CLI; a general request to build a
LangChain agent does not imply managed hosting. When the user chooses Managed
Deep Agents, follow the langchain-managed-deep-agents skill.
Retrieve the implementation contract
Inspect the manifest, lockfile, and relevant installed packages. Check Deep Agents
availability and version alongside LangChain and LangGraph when building an agent;
these are separate packages. Verify the APIs you intend to use against the
installed versions.
Current documentation may describe a newer release. Match the implementation to
the installed version; do not silently upgrade an existing project to fit an
example. For a new project, select current compatible stable releases. Do not
assume Python and TypeScript expose identical capabilities or defaults.
Implement at the right layer
Choose the component that owns the behavior. Agent-loop adaptation belongs in
supported middleware; deterministic business routing belongs in workflow control;
tool implementation owns the operation and its authorization. Inspect which
middleware and tools the harness already supplies before adding replacements.
Use runtime context for request identity and dependencies. Decide explicitly
which data is transient, belongs to one conversation, or should survive across
conversations and process restarts. Conversation checkpoints and cross-conversation
memory have different scopes; verify storage lifetime and user isolation.
Verify configuration and inheritance at integration boundaries rather than
assuming that nested agents share all parent settings.
Give tools narrow contracts and descriptions that explain when to call them.
Enforce consequential operations in application code; prompt instructions and
model-visible tool filtering do not provide authorization.
For human review, use the harness's supported review capability for tool calls
and workflow interrupts for other pauses. Implement the caller-facing proposal
and resume flow, accounting for replay of side effects.
Verify the requested behavior
Exercise the actual agent or graph path, not only construction or imports. Use
realistic inputs to check tool effects, state changes, and the caller's output
contract. When human review is involved, verify that approved or edited actions
execute as reviewed, rejected actions do not execute, and resuming does not
repeat side effects. Separate infrastructure or provider failures from
application logic failures.
Use current tools
Use langchain-docs → search_docs_by_lang_chain and
query_docs_filesystem_docs_by_lang_chain to find and read the intended pattern
for the task's capability and language. When exact API behavior matters, use
langchain-reference → search_api, then get_symbol for the relevant
signatures, parameters, return values, or defaults. Reconcile the guidance with
the installed package version, source, or types.
This skill sets the architecture default even if a docs server resource suggests
another. The API reference governs published signatures; installed source or
types govern what the project's version supports. The docs server's
submit_feedback sends content to the documentation team; use it only with the
user's agreement.
If the MCPs are unavailable, locate official pages through
https://docs.langchain.com/llms.txt and https://reference.langchain.com/llms.txt.
Follow the relevant nested index to a page. If offline, use installed source,
types, CLI help, and existing application examples, and identify any unresolved
version-sensitive behavior.
Explore more skills
Browse all- Langgraph Decision ModelsINVOKE THIS SKILL when routing a LangGraph agent with a decision model (TypeSafe Jev, SemIf) instead of an LLM, or when…
- Langchain RagINVOKE THIS SKILL when building ANY retrieval-augmented generation (RAG) system. Covers document loaders,…
- Langchain MiddlewareINVOKE THIS SKILL when you need human-in-the-loop approval, custom middleware, or structured output. Covers…
- Langchain Python QuickstartScaffold a minimal local LangChain agent in Python by following the official quickstart. Use when the user wants to…
- Langchain Agent TracingUse when adding, fixing, or reviewing LangSmith tracing for an agent or LLM application, including choosing…
- Managed Deep AgentsINVOKE THIS SKILL when building, testing, or deploying Managed Deep Agents in LangSmith. Walks a user through their…
Security
Reviews (0)
More from LangChain Skills
View source →Frequently asked questions about langchain-build-agent
What does the langchain-build-agent skill do?
Provides the latest guidance for building or modifying LLM applications with the LangChain open source libraries: Deep Agents, LangGraph, and LangChain, including how the libraries best fit together. The stack evolves quickly, so it's important to verify prior knowledge against this guidance. Also covers when Managed Deep Agents fits. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.
How do I install the langchain-build-agent skill?
Run `npx @skills-hub-ai/cli install langchain-build-agent` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/langchain-build-agent/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.
Which AI tools does langchain-build-agent work with?
langchain-build-agent runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.
Is the langchain-build-agent skill free?
Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.
How do I use langchain-build-agent after installing it?
In Claude Code, type `/langchain-build-agent` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.
Can I share the langchain-build-agent skill with my team?
Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.
Badge for your README
Show that this skill is on Skills Hub. The badge links back to this page and shows the live install count.
[](https://skills-hub.ai/skills/langchain-build-agent)<a href="https://skills-hub.ai/skills/langchain-build-agent"><img src="https://skills-hub.ai/api/badges/skill/langchain-build-agent" alt="Install on Skills Hub"></a>More options in the badge docs.