langchain-fundamentals

Build LangChain agents with create_agent(), tool definitions, middleware, and checkpointers.

1|Updated Jan 24, 2026
One-click install
npx skills add https://github.com/tawf-labs/zkt-hackathon --skill langchain-fundamentals-tawf-labs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langchain-fundamentals
Source: https://github.com/tawf-labs/zkt-hackathon/tree/main/.claude/skills/langchain-fundamentals%20copy
Command: npx skills add https://github.com/tawf-labs/zkt-hackathon --skill langchain-fundamentals-tawf-labs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It solves the challenge of building reliable LangChain agents that can call tools correctly, manage state, and support production workflows like human-in-the-loop approvals and resilient error handling.

Core Features & Use Cases

  • Create production agents with create_agent(): Build agents using LangChain’s recommended agent loop, tool execution, and state management.
  • Define tools with tool()/@tool: Expose safe, typed tool functions so the agent can decide when and how to call them.
  • Add middleware for HITL and control: Implement middleware patterns for approval workflows, custom hooks, and deterministic control flows.
  • Persist conversation state: Use a checkpointer (e.g., MemorySaver) and a thread_id to remember context across invocations.

Quick Start

Ask the AI agent to create a LangChain tool-enabled agent using create_agent(), add a human-in-the-loop middleware workflow, and enable memory persistence with a checkpointer.

Frequently Asked Questions about langchain-fundamentals

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

FAQPage Schema
How do I build LangChain agents that support human-in-the-loop approvals?

LangChain agents with human-in-the-loop approvals are built using create_agent() and adding middleware to intercept tool execution. This middleware pattern allows you to inject deterministic control flows for approval workflows, custom hooks, and resilient error handling before an agent proceeds.

What is the best way to define tools for LangChain agents?

The best way to define tools for LangChain agents is by using the tool() or @tool decorators. You must provide clear schemas and descriptions so the agent can reliably decide when and how to call the typed tool functions during interactive problem solving.

How do I persist conversation state across LangChain agent invocations?

To persist conversation state across LangChain agent invocations, configure a checkpointer such as MemorySaver and assign a thread_id. This enables the agent to remember context and maintain stateful runs across multiple interactions.

Can I use middleware to manage control flows and recursion limits in LangChain?

Yes, you can use middleware to manage control flows and recursion limits in LangChain agents. Middleware enables you to implement custom hooks, deterministic control flows, and interactive problem solving limits within the create_agent() constructor.

Does this approach for LangChain agents support TypeScript and Python?

Yes, this approach for LangChain agents supports both TypeScript and Python. You can build production-ready agents with structured outputs, tool definitions, and stateful runs using create_agent() in either programming language.