langchain-fundamentals

Build LangChain agents with create_agent(), tools, and middleware.

Updated Nov 16, 2025
One-click install
npx skills add https://github.com/daniel-dihardja/menuyukti --skill langchain-fundamentals-daniel-dihardja
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: langchain-fundamentals
Source: https://github.com/daniel-dihardja/menuyukti/tree/main/.agents/skills/langchain-fundamentals
Command: npx skills add https://github.com/daniel-dihardja/menuyukti --skill langchain-fundamentals-daniel-dihardja

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provide a structured guide to building robust LangChain agents using create_agent(), tools, prompts, and middleware for reliable loop control and state management across sessions.

Core Features & Use Cases

  • Agent creation and orchestration with create_agent() to manage the agent loop, tool calls, and state
  • Tool definitions using the @tool decorator (Python) or tool() (TypeScript) with clear descriptions
  • Middleware integration for human-in-the-loop approval, error handling, and custom hooks
  • Persistence patterns via checkpointer/memory to maintain context across invocations
  • Structured output options for typed responses and model-level structured outputs

Quick Start

Instantiate an agent with create_agent(), register tools, and enable middleware for human-in-the-loop and error handling.

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 LangChain agents with human-in-the-loop control?▼

Build production LangChain agents by using create_agent() to manage the agent loop, registering tools, and applying middleware for human-in-the-loop approval and error handling.

How does middleware work in LangChain agents?▼

Middleware in LangChain agents integrates custom hooks for human-in-the-loop approval, error handling, and loop control, ensuring safe and repeatable agent workflows.

What is the best way to define tools for LangChain agents in Python and TypeScript?▼

Define LangChain agent tools using the @tool decorator in Python or the tool() function in TypeScript, ensuring clear descriptions and best practices for error handling.

Can I persist LangChain agent context across multiple sessions?▼

Persist LangChain agent context across sessions by implementing persistence patterns via checkpointer and memory configurations to maintain state across invocations.

How do I get structured output from a LangChain agent?▼

Get structured output from LangChain agents by configuring structured output options for typed responses and applying model-level structured outputs in Python or TypeScript.

Why should I use create_agent for LangChain workflows instead of custom loops?▼

Use create_agent for LangChain workflows to manage the agent loop, tool calls, and state automatically, enforcing best practices for safe and repeatable agent operations.