langchain-fundamentals

Create LangChain agents with custom tools and middleware.

2|Updated Mar 7, 2026
One-click install
npx skills add https://github.com/Lincyaw/AgentM --skill langchain-fundamentals-lincyaw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langchain-fundamentals
Source: https://github.com/Lincyaw/AgentM/tree/main/.claude/skills/langchain-fundamentals
Command: npx skills add https://github.com/Lincyaw/AgentM --skill langchain-fundamentals-lincyaw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides the foundational knowledge and tools to build robust LangChain agents, enabling complex task automation and intelligent workflows.

Core Features & Use Cases

  • Agent Creation: Utilize create_agent() for building agents with LLMs, tools, and system prompts.
  • Tool Definition: Define custom tools using @tool (Python) or tool() (TypeScript) for agent functionality.
  • State Management: Implement conversation memory with checkpointers like MemorySaver.
  • Control Flow: Integrate middleware for human-in-the-loop approvals and error handling.
  • Structured Output: Ensure agents return data in a predictable, typed format.

Quick Start

Use the langchain-fundamentals skill to create a basic agent that can answer questions about the weather using the get_weather tool.

Frequently Asked Questions about langchain-fundamentals

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build production-ready LangChain agents with custom tools?

Build production-ready LangChain agents by using the `create_agent()` function to combine LLMs, system prompts, and custom tools defined with `@tool` or `tool()` for task automation.

How do I implement human-in-the-loop approvals in LangChain?

Implement human-in-the-loop approvals in LangChain by integrating middleware into your agent's control flow, enabling advanced error handling and manual intervention before critical actions execute.

How does conversation memory work with LangChain agents?

Conversation memory in LangChain agents works through state management implemented with checkpointers like `MemorySaver`, allowing the agent to persist context across multiple interactions.

Can I force LangChain agents to return structured output?

You can ensure LangChain agents return structured output by configuring them to produce data in a predictable, typed format, which guarantees consistent downstream processing results.

What is the best way to define custom tools for LLM agents?

Define custom tools for LLM agents by using the `@tool` decorator in Python or the `tool()` function in TypeScript, providing specific functionality for your agent to execute.