langchain-patterns

Provide reusable patterns for LangChain, LangGraph, and LiteLLM applications.

3|Updated Feb 15, 2026
One-click install
npx skills add https://github.com/pvliesdonk/agents.md --skill langchain-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: langchain-patterns
Source: https://github.com/pvliesdonk/agents.md/tree/main/claude-skills/langchain-patterns
Command: npx skills add https://github.com/pvliesdonk/agents.md --skill langchain-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill simplifies the development of complex AI applications by providing battle-tested patterns for using LangChain, LangGraph, and LiteLLM, ensuring efficient and reliable LLM integrations.

Core Features & Use Cases

  • Chain Composition: Implement sequential and parallel execution of LLM calls using LCEL.
  • Structured Output: Reliably extract data into Pydantic models, supporting both large and small models.
  • Model Routing: Dynamically select LLM providers and models using LiteLLM, with fallback strategies.
  • Stateful Workflows: Build multi-step conversational agents with LangGraph.
  • Use Case: Develop a customer support chatbot that first identifies the user's intent, then queries a knowledge base, and finally generates a personalized response, all while handling potential model failures gracefully.

Quick Start

Use the langchain-patterns skill to create a chain that takes user input, summarizes it, and extracts keywords.

Frequently Asked Questions about langchain-patterns

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

FAQPage Schema
How do I build robust LLM applications with LangChain and LangGraph?

To build robust LLM applications with LangChain, you apply reusable patterns for chain composition with LCEL, structured output generation, and stateful agent workflows using LangGraph.

How do I extract structured output from LLMs using Pydantic models?

Extracting structured output from LLMs is achieved by generating data into Pydantic models and JSON schema, providing reliable extraction patterns that support both large and small models.

What is the best way to handle LLM model routing and fallbacks?

The best way to handle LLM model routing is using LiteLLM to dynamically select providers and models, implementing fallback strategies to manage potential model failures gracefully.

Can I build stateful conversational agents with LangGraph?

Yes, you can build stateful conversational agents with LangGraph to create multi-step workflows that identify intent, query knowledge bases, and generate personalized responses.

Does LiteLLM support dynamic model routing for multi-model AI systems?

Yes, LiteLLM supports dynamic model routing for multi-model AI systems by allowing you to dynamically select LLM providers and models while implementing necessary fallback strategies.