langchain

Build LLM applications with agents, chains, RAG pipelines, and vector store retrieval.

1|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Clay-HHK/claude-skills --skill langchain-clay-hhk
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: langchain
Source: https://github.com/Clay-HHK/claude-skills/tree/main/langchain
Command: npx skills add https://github.com/Clay-HHK/claude-skills --skill langchain-clay-hhk

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires langchain, langchain-core, langchain-openai, langchain-anthropic, and includes references (resource) components.

What problem does it solve? Building LLM-powered applications requires wiring together model providers, tools, memory, document retrieval, and observability from scratch. This Skill provides working patterns for LangChain so you can assemble agents, RAG pipelines, and chatbots without reinventing integration boilerplate. ## Core Features & Use Cases - Agent Construction: Create ReAct and tool-calling agents with parallel tool execution, streaming, error handling, and structured output in under ten lines of code. - RAG Pipelines: Load documents from web, PDF, or GitHub, split them into chunks, embed them into Chroma, FAISS, or Pinecone, and run retrieval QA with source citations and conversational memory. - Provider Flexibility: Swap between OpenAI, Anthropic, Google, and local Ollama models with a single class change, plus LangSmith tracing for debugging and cost monitoring. - Use Case: Build a documentation chatbot that ingests your product docs into a vector store, answers user questions with cited sources, and remembers conversation context across turns. ## Quick Start Ask the AI to create a LangChain agent with a calculator and web search tool using the Anthropic model, then run a sample query against it.

Frequently Asked Questions about langchain

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

FAQPage Schema
How do I create a LangChain agent with tools?▼

Use create_agent with a chat model, a list of tool functions, and a system prompt. Define tools as Python functions with docstrings describing their purpose, then invoke the agent with a messages list containing the user query.

How to build a RAG pipeline with LangChain?▼

Load documents with a loader like WebBaseLoader, split them with RecursiveCharacterTextSplitter, embed them into a vector store such as Chroma, and connect a retriever to a RetrievalQA chain. The chain retrieves relevant chunks and generates answers with source documents.

LangChain vs LangGraph for building agents?▼

LangChain suits quick agents and RAG with high-level abstractions and minimal code. LangGraph fits complex stateful workflows needing cycles, fine-grained control, multi-agent systems, and human-in-the-loop patterns.

Does LangChain support multiple LLM providers?▼

Yes, LangChain supports OpenAI, Anthropic, Google, Azure OpenAI, and local models through Ollama. Swap providers by changing the chat model class, such as ChatOpenAI to ChatAnthropic, without rewriting application logic.

What chunk size should I use for RAG?▼

Use 512 to 1024 tokens for general question answering, with 10 to 20 percent overlap between chunks. Shorter chunks of 256 to 512 tokens suit short answers, while 1024 to 2048 tokens work for long-context retrieval.

Why does my LangChain agent fail or loop forever?▼

Common causes include vague tool descriptions, too many tools, missing error handling, and no iteration limit. Set max_iterations on the AgentExecutor, add try-except blocks in tools, and enable verbose mode to inspect reasoning steps.