Official agent skill

LangChain Ecosystem Primer

by langchain-ai in langchain-ai/langchain-skills

Starting point for LangChain, LangGraph and Deep Agents projects: picks the right layer for the task, then points to install steps, setup and the next skill to load.

OfficialMITAuto-check passedAI & LLM Engineering

Install LangChain Ecosystem Primer

skills CLI
$ npx skills add langchain-ai/langchain-skills --skill ecosystem-primer -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install langchain-ai/langchain-skills ecosystem-primer --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/langchain-ai/langchain-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/config/skills/ecosystem-primer .claude/skills/ecosystem-primer && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ecosystem-primer
GitHub stars
1.3k
Token cost
~2k tokens
SKILL.md length
893 words
Files
1
Skills in repo
22
Repo updated
First seen
Licence
MIT

At a glance

Starting point for LangChain, LangGraph and Deep Agents projects: picks the right layer for the task, then points to install steps, setup and the next skill to load.

  • Works in 4 steps: Choose Your Tool → Set Environment Variables → How the Docs Work → …
  • Starting a new agent project with LangChain, LangGraph or Deep Agents
  • SKILL.md covers Step 1 — Choose Your Tool, Tool Profiles, Mixing Layers and Step 2 — Set Environment…, plus 2 more sections
  • Calls rg; reaches docs.langchain.com; needs ANTHROPIC_API_KEY and OPENAI_API_KEY

What it does

The skill describes the three layers LangChain Inc. maintains for building agents, with LangSmith alongside for observability and evaluation. Deep Agents sits on top as a harness with planning, file management, subagents and memory. LangGraph is the runtime for durable execution and custom control flow, and LangChain is the base framework for models, tools and the agent loop.

Four conditions are checked in order, stopping at the first match. Planning, long-session file handling, persistent memory or subagents point to Deep Agents; custom loops or branching point to LangGraph; a single-purpose agent with fixed tools points to LangChain's create_agent; a plain model call or retrieval pipeline with no agent loop uses LangChain directly. Profiles list what each tool suits and where it falls short, and the skill insists that the layer-specific skill is loaded before any agent code is written. The excerpt is cut off before the install and environment sections.

When your agent uses it

  • Starting a new agent project with LangChain, LangGraph or Deep Agents
  • Deciding which LangChain layer fits a given task
  • Finding out which LangChain skill to load before writing agent code

Example prompts

  • “Pick the right framework layer for an agent that plans multi-step research and remembers past sessions.”
  • “Set up a new project for a single-purpose LangChain agent with three fixed tools.”
  • “Compare LangGraph and Deep Agents for a workflow with branching and parallel steps.”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Choose Your Tool
  2. Set Environment Variables
  3. How the Docs Work
  4. Load the Right Skill Next

What it can do on your machine

Read from SKILL.md and the folder at commit 16a992f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • rg

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • docs.langchain.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • ANTHROPIC_API_KEY
    • OPENAI_API_KEY
    • TAVILY_API_KEY
    • LANGSMITH_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

LangChain Ecosystem Primer loads about 2k tokens when it runs. Until then it costs about 90 tokens; SKILL.md has 893 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~90
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from langchain-ai/langchain-skills at commit 16a992f, republished under its MIT licence (© langchain-ai). 893 words, ~2,008 tokens.

Download SKILL.mdSave it as .claude/skills/ecosystem-primer/SKILL.md (or your agent's skills folder).
name
ecosystem-primer
description
INVOKE FIRST for any LangChain / LangGraph / Deep Agents agent building project before consulting other skills or writing any agent code. Required starting point for up to date info on framework selection (LangChain vs LangGraph vs Deep Agents vs hybrid composition), agent patterns, install, environment setup, and which skill to load next.
<overview>
LangChain Inc. maintains three layered open-source tools for building agents, plus LangSmith for observability. The stack, top-down:
  • Deep Agents (top layer, harness) — batteries-included toolkit built on LangChain + LangGraph. Ships with planning, file management, subagent spawning, and memory out of the box.
  • LangGraph (middle layer, runtime) — low-level orchestration for durable execution, custom control flow, and stateful workflows. LangChain agents run on top of LangGraph.
  • LangChain (bottom layer, framework) — abstractions for models, tools, and the agent loop. Provider-agnostic, easiest to start with.
  • LangSmith (cross-cutting) — observability and evaluation platform. Framework-agnostic; always recommended alongside any of the above.

Higher layers depend on lower ones, but you don't need to use lower layers directly. Deep Agents gives you LangGraph's durable execution without writing graph code. LangChain gives you models and tools without managing graph edges. </overview>


Step 1 — Choose Your Tool

<decision-table>

Evaluate these conditions in order and stop at the first match:

  1. If the task needs planning, file management across a long session, persistent memory, subagent delegation, or on-demand skills → Deep Agents
  2. Else, if the task needs custom control flow (deterministic loops, branching logic) → LangGraph
  3. Else, if it's a single-purpose agent with a fixed set of tools → LangChain (create_agent function)
  4. Else, if it's a pure model call, retrieval pipeline, or simple prompt chain with no agent loop → LangChain (direct model / chain)

This is your layer. BUT you are not done: later in Step 4, you MUST load the layer-specific skill before writing any agent code.

</decision-table>

Tool Profiles

<langchain-profile>
LangChain — agent framework

Best for:

  • Single-purpose agents with a fixed tool set
  • RAG pipelines and document Q&A
  • Model calls, prompt templates, structured output

Not ideal when:

  • The agent needs to plan across many steps or manage large context
  • Control flow is conditional, iterative, or parallel
  • State must persist across sessions

All LangChain agents use create_agent(model, tools=[...]).

</langchain-profile>
<langgraph-profile>
LangGraph — agent runtime

Best for:

  • Custom control flow — deterministic loops, reflection cycles, parallel fan-out
  • Complex workflows combining deterministic and agentic steps
  • Human-in-the-loop with precise interrupt and resume points
  • State that must survive failures or span long sessions

Not ideal when:

  • You want planning, file management, and subagent delegation out of the box (use Deep Agents instead)
  • The workflow is simple enough for a straight tool loop

All LangGraph graphs use StateGraph(State) with explicit nodes, edges, and conditional edges.

</langgraph-profile>
<deep-agents-profile>
Deep Agents — agent harness

Best for:

  • Long-running tasks that require planning and decomposition
  • Agents that read, write, and manage files across a session
  • Delegating subtasks to specialized subagents
  • Persistent memory across sessions
  • Loading domain-specific skills on demand

Not ideal when:

  • The task is simple enough for a single-purpose agent
  • You need precise hand-crafted control over every graph edge (use LangGraph directly)

All Deep Agents use create_deep_agent(model, tools=[...]).

</deep-agents-profile>

Mixing Layers

<mixing-layers>

The tools are layered, so they can be combined in the same project. Common patterns:

  • Deep Agents orchestrator → LangGraph subagent — when the main agent needs planning and memory but one subtask requires a deterministic graph.
  • LangGraph graph wrapped as a tool or subagent — when a specialized pipeline (e.g. RAG, reflection loop) is called by a broader agent.

A compiled LangGraph graph can be registered as a named subagent inside Deep Agents — the orchestrator delegates to it via the task tool without knowing its internal structure. LangChain tools and retrievers work freely inside both LangGraph nodes and Deep Agents tools.

</mixing-layers>

Show full SKILL.md (334 more words)Show less

Step 2 — Set Environment Variables

Always set these for observability. These are the current LangSmith env var names. Copy them as-is. OLDER NAMES NO LONGER WORK.

<environment-variables>
LANGSMITH_API_KEY=<your-key>
LANGSMITH_TRACING=true
LANGSMITH_PROJECT=<project-name>
</environment-variables>

Model-provider and tool-specific keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, TAVILY_API_KEY, etc.) depend on your stack — set them as needed.


Step 3 — How the Docs Work

<docs>

All documentation lives at docs.langchain.com, organized into two top-level sections:

  • OSS — LangChain, LangGraph, Deep Agents. Python (/oss/python/) and TypeScript (/oss/javascript/) trees in parallel.
  • LangSmith — observability, evaluation, deployment, prompt engineering.

Each product has its own page tree: overview → quickstart → how-to guides → reference.

Canonical landing pages

Start here rather than tree-searching from root (swap python → javascript for TypeScript):

  • LangChain — /oss/python/langchain/overview
  • LangGraph — /oss/python/langgraph/overview
  • Deep Agents — /oss/python/deepagents/overview
  • LangSmith — /langsmith/home (no language split)
Accessing docs in an agent context

If the LangChain Docs MCP server is connected (mcp__docs-langchain__* tools are available), query it directly:

tree /oss/python -L 2                        # explore Python structure
tree /oss/javascript -L 2                    # parallel TypeScript structure
cat /oss/python/langchain/quickstart.mdx     # read a specific page
rg -il "checkpointer" /oss/python/langgraph/ # search by keyword

If the MCP server is not available, use the llms.txt index:

  1. Fetch https://docs.langchain.com/llms.txt — structured list of all pages with descriptions
  2. Identify the 2–4 most relevant pages for the question
  3. Fetch those pages directly for accurate, up-to-date content

Always prefer fetching live docs over relying on training-data knowledge — these libraries evolve fast and APIs change often.

</docs>

Step 4 — Load the Right Skill Next

If the user only wants a minimal local working agent (new project, stub tool, provider key), load the matching quickstart first:

  • LangChain → langchain-python-quickstart or langchain-typescript-quickstart
  • LangGraph → langgraph-python-quickstart or langgraph-typescript-quickstart
  • Deep Agents → deepagents-python-quickstart or deepagents-typescript-quickstart

Otherwise load the skill below that matches your layer from Step 1. This is required — the layer-specific skill carries the current API; the primer alone does not.

<next-skills>
LangChain
  • langchain-fundamentals — building any LangChain agent
  • langchain-rag — adding RAG / vector store retrieval
  • langchain-middleware — structured output with Pydantic
  • langchain-dependencies — package versions, installs, or dependency management questions
LangGraph
  • langgraph-fundamentals — any LangGraph graph
  • langgraph-human-in-the-loop — human-in-the-loop or approval workflows
  • langgraph-persistence — state that must survive restarts, or cross-thread memory
Deep Agents

Always load deep-agents-core first. Then, as needed:

  • deep-agents-orchestration — subagent delegation or orchestration
  • deep-agents-memory — cross-session persistent memory
</next-skills>

© langchain-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in config/skills/ecosystem-primer of langchain-ai/langchain-skills.

Open the folder on GitHubat commit 16a992f

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in langchain-ai/langchain-skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

LangChain Ecosystem Primer next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

LangChain Ecosystem Primer compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
LangChain Ecosystem Primer this skilllangchain-ai/langchain-skills1.3k—~2kAutomated safety check: PassMIT
LangSmith Trace DebuggingComposioHQ/awesome-claude-skills77k8 repos~2.7kAutomated safety check: PassNone
Docs Code Sampleslangchain-ai/docs426—~4.6kAutomated safety check: PassMIT
Deepagents Setup Configurationsoba-labs/langchain-agent-skills107—~1.9kAutomated safety check: PassMIT
Agentsop Observability Setupagentsope/SkillAlchemy466—~4.4kAutomated safety check: PassMIT
Langgraphlangchain-ai/docs426—~1.1kAutomated safety check: PassMIT

Similar skills

  • LangSmith Trace Debugging

    ComposioHQ/awesome-claude-skills

    Debugs LangChain and LangGraph agents by pulling recent execution traces with the langsmith-fetch CLI and reporting errors, tool calls, timings and token use.

    77k GitHub starsUsed in 8 repos~2.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Docs Code Samples

    langchain-ai/docs

    Official

    A skill your agent uses when migrating inline code samples from LangChain docs (MDX files) into external, testable code files that are extracted by this repo’s snippet scripts and used as Mintlify…

    426 GitHub stars~4.6k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Deepagents Setup Configuration

    soba-labs/langchain-agent-skills

    Initialize, validate, and troubleshoot Deep Agents projects in Python or JavaScript using the deepagents package.

    107 GitHub stars~1.9k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Agentsop Observability Setup

    agentsope/SkillAlchemy

    Enhancement-overlay skill — the DECISION + WIRING layer for LM observability that the single-backend skills [[langsmith]], [[phoenix]], [[mlflow]] do NOT cover.

    466 GitHub stars~4.4k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Langgraph

    langchain-ai/docs

    Official

    Build stateful, durable agent workflows with LangGraph. An agent skill from langchain-ai/docs.

    426 GitHub stars~1.1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Langgraph Testing Evaluation

    soba-labs/langchain-agent-skills

    A skill your agent uses when you need to test or evaluate LangGraph/LangChain agents: writing unit or integration tests, generating test scaffolds, mocking LLM/tool behavior, running trajectory…

    107 GitHub stars~2.3k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed

More from langchain-ai/langchain-skills

All 22 skills in this repo
  • Agent Eval Engineering

    langchain-ai/langchain-skills

    Official

    Builds agent evaluations in stages: inspect the repository and traces, agree a Task Spec with you, then build, audit and run a Harbor task with an independent verifier.

    1.3k GitHub stars~4k tokensUpdated yesterday
    Auto-check passed
  • Swarm Parallel Dispatch

    langchain-ai/langchain-skills

    Official

    Fans a list of independent items out to subagents in parallel, merges the results back into a table and supports retrying only the rows that failed.

    1.3k GitHub stars~3k tokensUpdated yesterday
    Auto-check passed
  • Langgraph Human In The Loop

    langchain-ai/langchain-skills

    Official

    INVOKE THIS SKILL when implementing human-in-the-loop patterns, pausing for approval, or handling errors in LangGraph.

    1.3k GitHub starsUsed in 1 repo~4.1k tokens
    Auto-check passed
  • LangGraph Decision Models

    langchain-ai/langchain-skills

    Official

    Routes LangGraph agents with typed decision models that return probabilities, and finds LLM calls that only exist to produce a routing decision.

    1.3k GitHub stars~2.3k tokensUpdated yesterday
    Auto-check passed
  • Langgraph Persistence

    langchain-ai/langchain-skills

    Official

    INVOKE THIS SKILL when your LangGraph needs to persist state, remember conversations, travel through history, or configure subgraph checkpointer scoping.

    1.3k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed
  • Deep Agents Core

    langchain-ai/langchain-skills

    Official

    Explains how to build agents with the Deep Agents framework: create_deep_agent, the built-in middleware, the harness, SKILL.md format and configuration options.

    1.3k GitHub stars~3.1k tokensUpdated yesterday
    Auto-check passed

Questions about LangChain Ecosystem Primer

What does LangChain Ecosystem Primer do?

Starting point for LangChain, LangGraph and Deep Agents projects: picks the right layer for the task, then points to install steps, setup and the next skill to load. The skill describes the three layers LangChain Inc. maintains for building agents, with LangSmith alongside for observability and evaluation.

When should I use LangChain Ecosystem Primer?

LangChain Ecosystem Primer fits situations like: starting a new agent project with LangChain, LangGraph or Deep Agents; deciding which LangChain layer fits a given task; finding out which LangChain skill to load before writing agent code.

How do I install LangChain Ecosystem Primer in Claude Code?

Run `npx skills add langchain-ai/langchain-skills --skill ecosystem-primer -a claude-code`. Or copy the skill folder (config/skills/ecosystem-primer in langchain-ai/langchain-skills) into .claude/skills/ecosystem-primer in your project. Claude Code loads it when a task matches its description.

How do I install LangChain Ecosystem Primer in Codex?

Run `npx skills add langchain-ai/langchain-skills --skill ecosystem-primer -a codex`. Or copy the skill folder (config/skills/ecosystem-primer in langchain-ai/langchain-skills) into .agents/skills/ecosystem-primer in your project. Codex loads it when a task matches its description.

Can I use LangChain Ecosystem Primer in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add langchain-ai/langchain-skills --skill ecosystem-primer -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ecosystem-primer, .gemini/skills/ecosystem-primer, .github/skills/ecosystem-primer and .opencode/skills/ecosystem-primer in your project.

What does LangChain Ecosystem Primer need to run?

Going by SKILL.md and its folder, LangChain Ecosystem Primer needs the command-line tools its instructions call (rg) and credentials named ANTHROPIC_API_KEY, OPENAI_API_KEY, TAVILY_API_KEY and LANGSMITH_API_KEY.

Does LangChain Ecosystem Primer access the network?

SKILL.md names 1 domain. In commands or code: docs.langchain.com; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is LangChain Ecosystem Primer safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does LangChain Ecosystem Primer use?

LangChain Ecosystem Primer is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does LangChain Ecosystem Primer use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to LangChain Ecosystem Primer?

Skills that share tags, products or a category with LangChain Ecosystem Primer: LangSmith Trace Debugging (ComposioHQ/awesome-claude-skills, 77k stars), Docs Code Samples (langchain-ai/docs, 426 stars), Deepagents Setup Configuration (soba-labs/langchain-agent-skills, 107 stars) and Agentsop Observability Setup (agentsope/SkillAlchemy, 466 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains LangChain Ecosystem Primer?

langchain-ai (a GitHub organization, an official publisher) maintains it in langchain-ai/langchain-skills, which has 1,274 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 8, 2026.

Source: langchain-ai/langchain-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.