PlugWiki

langchain-fundamentals skill for Claude: build LangChain agents

Guides your agent to build LangChain agents with create_agent, tools and middleware. For developers writing Python or TypeScript agents.

Installs
17.8K
on skills.sh
Stars
1.3K
on GitHub
Updated
Oct 2026
last repo commit

langchain-fundamentals makes your agent build LangChain agents the current way, with create_agent(), the tool decorator and middleware. Its one-line summary says that when creating LangChain agents you must use create_agent() and that other approaches are outdated. It covers tools, saved conversation state, human approval, structured output and model settings, in Python and TypeScript.

It loads when you ask for a LangChain agent. The code it writes needs an API key for the model you choose, such as an Anthropic or OpenAI key. For retrieval over your own documents, use the separate langchain-rag skill.

Good for

  • Developers starting a LangChain agent in Python or TypeScript
  • Teams adding human approval before an agent runs risky tools
  • Anyone updating older LangChain agent code

Install langchain-fundamentals

Claude Code

  1. 1

    Copy this prompt.

    Install the langchain-fundamentals skill in Claude Code. Run this command:
    
    npx skills add https://github.com/langchain-ai/langchain-skills --skill langchain-fundamentals
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

Create LangChain agents with create_agent, define tools, and use middleware for human-in-the-loop and error handling.

Sections in SKILL.md

  1. Creating Agents with create_agent
  2. Agent Configuration Options
  3. Defining Tools
  4. Middleware for Agent Control
  5. Structured Output
  6. Model Configuration

Key facts

License
MIT
Installs on skills.sh
17,784 (Nov 2, 2026)
Last commit
Oct 29, 2026

What it includes

  • The recommended way to build an agent

    Handles the agent loop, tool calls and state. Options include model, tools, system prompt, checkpointer and middleware.

    Try: “Create a LangChain agent with a weather tool.”

    create_agent

  • Weather tool agent in Python and TypeScript

    A small agent that calls a get_weather tool and prints the last message.

    Network · Basic agent example

  • Remember a conversation with a checkpointer

    Adds MemorySaver and a thread_id so the agent remembers earlier messages.

    Persistence

  • The @tool decorator or tool() function

    Tools are functions the agent can call, with a description and typed inputs.

    Defining tools

  • Intercept the agent loop

    Covers human-in-the-loop approval, resuming after an interrupt, and custom hooks for errors and logging.

    Middleware

  • Typed, validated replies

    Uses response_format or with_structured_output to get replies that match a schema.

    Structured output

  • Model strings or model instances

    Accepts strings such as anthropic:claude-sonnet-4-5 or a configured model object.

    Network · Model configuration

  • Missing tool description, no checkpointer, runaway loops, result access

    Wrong and correct code pairs, including setting recursion_limit to stop an agent that loops.

    Common fixes

From the official docs

Permissions

Low risk

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • Agents it builds can call tools you give them

    A tool can do whatever its code does. Use the human-in-the-loop middleware the skill describes for tools that change or delete things. github.com

  • Agent code sends prompts to a model provider

    Generated agents call the model you set, with your API key. Set a spend limit with the provider and keep keys out of the code. github.com

Technical details
Talks toYour chosen model provider API
Sign-in and keysThe skill stores nothing. The README has you export keys in your shell.
Scopes
  • OPENAI_API_KEY or ANTHROPIC_API_KEY in your environment (for the code it writes)

Questions

What does the langchain-fundamentals skill do?

It gives your agent the current LangChain way to build agents: create_agent(), tools, middleware, saved state, structured output and model settings. It says older approaches are outdated.

How do I install it in Claude Code, the Claude app or Codex?

Use the install box above, which installs only this skill. The README documents the skills CLI for Claude Code and Codex, a Claude Code plugin, and an install.sh script; the plugin and the script add all 21 skills in the repo, and install.sh with --force deletes and replaces same-named skill folders. The README does not document a Claude app upload.

Does it need an API key?

The skill has none. The agent code you build needs a key for the model provider, and the README says to export OPENAI_API_KEY or ANTHROPIC_API_KEY.

Is it safe to install?

It bundles no scripts. The risk is in the agents it helps you write, which call a model provider and any tools you give them. Its middleware section shows how to require human approval before a risky tool runs.

How do I stop an agent from looping forever?

The skill shows setting recursion_limit in the invoke config, for example 10, so the agent stops after that many steps.

How do I make the agent remember earlier messages?

Add a checkpointer such as MemorySaver and pass the same thread_id each time. Without one, the skill says the agent forgets between calls.

How is it different from langchain-rag?

langchain-fundamentals is for building agents. langchain-rag is for retrieval over your own documents. Both come from the same repo and install separately.

Information

updated Nov 2, 2026

Folder
config/skills/langchain-fundamentals

langchain-ai/langchain-skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 2
  1. langchain-fundamentals SKILL.md · github.com
  2. langchain-skills README · github.com

Updated Nov 2, 2026.