langchain-fundamentals

Create LangChain agents that orchestrate tool calls and manage conversational state.

36|27|Updated Jan 28, 2026
One-click install
npx skills add https://github.com/caio-moliveira/ai-engineer-roadmap --skill langchain-fundamentals-caio-moliveira
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langchain-fundamentals
Source: https://github.com/caio-moliveira/ai-engineer-roadmap/tree/main/.agents/skills/langchain-fundamentals
Command: npx skills add https://github.com/caio-moliveira/ai-engineer-roadmap --skill langchain-fundamentals-caio-moliveira

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developing production‑ready LangChain agents is complex, requiring consistent creation, tool integration, state persistence, and safe human‑in‑the‑loop controls.

Core Features & Use Cases

  • create_agent: Simplified agent loop with built‑in tool execution and configurable middleware.
  • Tool Definition: @tool decorator (Python) or tool() function (TypeScript) for reusable utilities.
  • Middleware: Human‑in‑the‑loop approval, error handling, and logging hooks.
  • Persistence: MemorySaver checkpointer enables conversation memory across invocations.
  • Structured Output: Typed responses via response_format or model‑level structured output.
  • Use Case: Build an AI assistant that can fetch weather, perform calculations, retain context, and safely request human approval before executing risky operations.

Quick Start

Invoke the LangChain agent with a request to retrieve the weather for Paris.

Frequently Asked Questions about langchain-fundamentals

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

FAQPage Schema
How do I add human-in-the-loop approval to LangChain agents?

To add human-in-the-loop approval to LangChain agents, you configure middleware hooks within the agent creation process. This mechanism intercepts tool execution, allowing your AI assistant to safely request human approval before performing risky operations.

How do I persist conversational state across LangChain sessions?

You can persist conversational state across LangChain sessions by using a MemorySaver checkpointer. This component manages conversation memory across invocations, ensuring your AI assistant retains context and state between different user interactions.

How do I define custom tools for LangChain agents?

You define custom tools for LangChain agents using the `@tool` decorator in Python or the `tool()` function in TypeScript. This creates reusable utilities that the agent can orchestrate and execute during its operational loop.

Can I get structured output from a LangChain agent?

LangChain agents provide structured output through typed responses configured via `response_format` or model-level structured output. This ensures the agent returns data in a predictable format suitable for downstream application processing.

What do I need to build a production AI assistant with LangChain?

To build a production AI assistant with LangChain, you need the LangChain library, an appropriate LLM model, defined tool functions, and optional MemorySaver checkpointer for persistence. Middleware configuration is also required for human-in-the-loop controls.