Agent skill

Langchain Architecture

by HermeticOrmus in HermeticOrmus/LibreUIUX-Claude-Code

Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns.

MITAuto-check passedAI & LLM Engineering

Install Langchain Architecture

skills CLI
$ npx skills add HermeticOrmus/LibreUIUX-Claude-Code --skill langchain-architecture -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install HermeticOrmus/LibreUIUX-Claude-Code langchain-architecture --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/HermeticOrmus/LibreUIUX-Claude-Code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/llm-application-dev/skills/langchain-architecture .claude/skills/langchain-architecture && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
langchain-architecture
GitHub stars
112
Used in
10 other repos
Token cost
~2.5k tokens
SKILL.md length
405 words
Files
1
Skills in repo
15
Repo updated
First seen
Licence
MIT

At a glance

Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns.

  • Works in 8 steps: Agents → Chains → Memory → …
  • Building LangChain applications
  • SKILL.md covers When to Use This Skill, Core Concepts, Quick Start and Architecture Patterns, plus 7 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Langchain Architecture is an agent skill from HermeticOrmus/LibreUIUX-Claude-Code. Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Use when building LangChain applications, implementing AI agents, or creating complex LLM workflows.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Building AI agents and Third-party API integration. It works with LangChain. The repository describes itself as: UI/UX system for Claude Code: 71 plugins, 93 agents, 74 skills. Design mastery, archetypal design, accessibility, and frontend workflows in one validated plugin marketplace. The licence is MIT.

When your agent uses it

  • Building LangChain applications
  • Implementing AI agents
  • Creating complex LLM workflows

Example prompts

  • “/langchain-architecture”

Requirements

  • Python 3

Workflow steps

8 steps, taken from the step headings in SKILL.md.

  1. Agents
  2. Chains
  3. Memory
  4. Document Processing
  5. Callbacks
  6. Caching
  7. Batch Processing
  8. Streaming Responses

What it can do on your machine

Read from SKILL.md and the folder at commit 41a968c. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Langchain Architecture loads about 2.5k tokens when it runs. Until then it costs about 57 tokens; SKILL.md has 405 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~57
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from HermeticOrmus/LibreUIUX-Claude-Code at commit 41a968c, republished under its MIT licence (© HermeticOrmus). 405 words, ~2,520 tokens.

Download SKILL.mdSave it as .claude/skills/langchain-architecture/SKILL.md (or your agent's skills folder).
name
langchain-architecture
description
Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Use when building LangChain applications, implementing AI agents, or creating complex LLM workflows.

LangChain Architecture

Master the LangChain framework for building sophisticated LLM applications with agents, chains, memory, and tool integration.

When to Use This Skill

  • Building autonomous AI agents with tool access
  • Implementing complex multi-step LLM workflows
  • Managing conversation memory and state
  • Integrating LLMs with external data sources and APIs
  • Creating modular, reusable LLM application components
  • Implementing document processing pipelines
  • Building production-grade LLM applications

Core Concepts

1. Agents

Autonomous systems that use LLMs to decide which actions to take.

Agent Types:

  • ReAct: Reasoning + Acting in interleaved manner
  • OpenAI Functions: Leverages function calling API
  • Structured Chat: Handles multi-input tools
  • Conversational: Optimized for chat interfaces
  • Self-Ask with Search: Decomposes complex queries
2. Chains

Sequences of calls to LLMs or other utilities.

Chain Types:

  • LLMChain: Basic prompt + LLM combination
  • SequentialChain: Multiple chains in sequence
  • RouterChain: Routes inputs to specialized chains
  • TransformChain: Data transformations between steps
  • MapReduceChain: Parallel processing with aggregation
3. Memory

Systems for maintaining context across interactions.

Memory Types:

  • ConversationBufferMemory: Stores all messages
  • ConversationSummaryMemory: Summarizes older messages
  • ConversationBufferWindowMemory: Keeps last N messages
  • EntityMemory: Tracks information about entities
  • VectorStoreMemory: Semantic similarity retrieval
4. Document Processing

Loading, transforming, and storing documents for retrieval.

Components:

  • Document Loaders: Load from various sources
  • Text Splitters: Chunk documents intelligently
  • Vector Stores: Store and retrieve embeddings
  • Retrievers: Fetch relevant documents
  • Indexes: Organize documents for efficient access
5. Callbacks

Hooks for logging, monitoring, and debugging.

Use Cases:

  • Request/response logging
  • Token usage tracking
  • Latency monitoring
  • Error handling
  • Custom metrics collection

Quick Start

python
from langchain.agents import AgentType, initialize_agent, load_tools
from langchain.llms import OpenAI
from langchain.memory import ConversationBufferMemory

# Initialize LLM
llm = OpenAI(temperature=0)

# Load tools
tools = load_tools(["serpapi", "llm-math"], llm=llm)

# Add memory
memory = ConversationBufferMemory(memory_key="chat_history")

# Create agent
agent = initialize_agent(
    tools,
    llm,
    agent=AgentType.CONVERSATIONAL_REACT_DESCRIPTION,
    memory=memory,
    verbose=True
)

# Run agent
result = agent.run("What's the weather in SF? Then calculate 25 * 4")

Architecture Patterns

Show full SKILL.md (164 more words)Show less
Pattern 1: RAG with LangChain
python
from langchain.chains import RetrievalQA
from langchain.document_loaders import TextLoader
from langchain.text_splitter import CharacterTextSplitter
from langchain.vectorstores import Chroma
from langchain.embeddings import OpenAIEmbeddings

# Load and process documents
loader = TextLoader('documents.txt')
documents = loader.load()

text_splitter = CharacterTextSplitter(chunk_size=1000, chunk_overlap=200)
texts = text_splitter.split_documents(documents)

# Create vector store
embeddings = OpenAIEmbeddings()
vectorstore = Chroma.from_documents(texts, embeddings)

# Create retrieval chain
qa_chain = RetrievalQA.from_chain_type(
    llm=llm,
    chain_type="stuff",
    retriever=vectorstore.as_retriever(),
    return_source_documents=True
)

# Query
result = qa_chain({"query": "What is the main topic?"})
Pattern 2: Custom Agent with Tools
python
from langchain.agents import Tool, AgentExecutor
from langchain.agents.react.base import ReActDocstoreAgent
from langchain.tools import tool

@tool
def search_database(query: str) -> str:
    """Search internal database for information."""
    # Your database search logic
    return f"Results for: {query}"

@tool
def send_email(recipient: str, content: str) -> str:
    """Send an email to specified recipient."""
    # Email sending logic
    return f"Email sent to {recipient}"

tools = [search_database, send_email]

agent = initialize_agent(
    tools,
    llm,
    agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION,
    verbose=True
)
Pattern 3: Multi-Step Chain
python
from langchain.chains import LLMChain, SequentialChain
from langchain.prompts import PromptTemplate

# Step 1: Extract key information
extract_prompt = PromptTemplate(
    input_variables=["text"],
    template="Extract key entities from: {text}\n\nEntities:"
)
extract_chain = LLMChain(llm=llm, prompt=extract_prompt, output_key="entities")

# Step 2: Analyze entities
analyze_prompt = PromptTemplate(
    input_variables=["entities"],
    template="Analyze these entities: {entities}\n\nAnalysis:"
)
analyze_chain = LLMChain(llm=llm, prompt=analyze_prompt, output_key="analysis")

# Step 3: Generate summary
summary_prompt = PromptTemplate(
    input_variables=["entities", "analysis"],
    template="Summarize:\nEntities: {entities}\nAnalysis: {analysis}\n\nSummary:"
)
summary_chain = LLMChain(llm=llm, prompt=summary_prompt, output_key="summary")

# Combine into sequential chain
overall_chain = SequentialChain(
    chains=[extract_chain, analyze_chain, summary_chain],
    input_variables=["text"],
    output_variables=["entities", "analysis", "summary"],
    verbose=True
)

Memory Management Best Practices

Choosing the Right Memory Type
python
# For short conversations (< 10 messages)
from langchain.memory import ConversationBufferMemory
memory = ConversationBufferMemory()

# For long conversations (summarize old messages)
from langchain.memory import ConversationSummaryMemory
memory = ConversationSummaryMemory(llm=llm)

# For sliding window (last N messages)
from langchain.memory import ConversationBufferWindowMemory
memory = ConversationBufferWindowMemory(k=5)

# For entity tracking
from langchain.memory import ConversationEntityMemory
memory = ConversationEntityMemory(llm=llm)

# For semantic retrieval of relevant history
from langchain.memory import VectorStoreRetrieverMemory
memory = VectorStoreRetrieverMemory(retriever=retriever)

Callback System

Custom Callback Handler
python
from langchain.callbacks.base import BaseCallbackHandler

class CustomCallbackHandler(BaseCallbackHandler):
    def on_llm_start(self, serialized, prompts, **kwargs):
        print(f"LLM started with prompts: {prompts}")

    def on_llm_end(self, response, **kwargs):
        print(f"LLM ended with response: {response}")

    def on_llm_error(self, error, **kwargs):
        print(f"LLM error: {error}")

    def on_chain_start(self, serialized, inputs, **kwargs):
        print(f"Chain started with inputs: {inputs}")

    def on_agent_action(self, action, **kwargs):
        print(f"Agent taking action: {action}")

# Use callback
agent.run("query", callbacks=[CustomCallbackHandler()])

Testing Strategies

python
import pytest
from unittest.mock import Mock

def test_agent_tool_selection():
    # Mock LLM to return specific tool selection
    mock_llm = Mock()
    mock_llm.predict.return_value = "Action: search_database\nAction Input: test query"

    agent = initialize_agent(tools, mock_llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION)

    result = agent.run("test query")

    # Verify correct tool was selected
    assert "search_database" in str(mock_llm.predict.call_args)

def test_memory_persistence():
    memory = ConversationBufferMemory()

    memory.save_context({"input": "Hi"}, {"output": "Hello!"})

    assert "Hi" in memory.load_memory_variables({})['history']
    assert "Hello!" in memory.load_memory_variables({})['history']

Performance Optimization

1. Caching
python
from langchain.cache import InMemoryCache
import langchain

langchain.llm_cache = InMemoryCache()
2. Batch Processing
python
# Process multiple documents in parallel
from langchain.document_loaders import DirectoryLoader
from concurrent.futures import ThreadPoolExecutor

loader = DirectoryLoader('./docs')
docs = loader.load()

def process_doc(doc):
    return text_splitter.split_documents([doc])

with ThreadPoolExecutor(max_workers=4) as executor:
    split_docs = list(executor.map(process_doc, docs))
3. Streaming Responses
python
from langchain.callbacks.streaming_stdout import StreamingStdOutCallbackHandler

llm = OpenAI(streaming=True, callbacks=[StreamingStdOutCallbackHandler()])

Resources

  • references/agents.md: Deep dive on agent architectures
  • references/memory.md: Memory system patterns
  • references/chains.md: Chain composition strategies
  • references/document-processing.md: Document loading and indexing
  • references/callbacks.md: Monitoring and observability
  • assets/agent-template.py: Production-ready agent template
  • assets/memory-config.yaml: Memory configuration examples
  • assets/chain-example.py: Complex chain examples

Common Pitfalls

  1. Memory Overflow: Not managing conversation history length
  2. Tool Selection Errors: Poor tool descriptions confuse agents
  3. Context Window Exceeded: Exceeding LLM token limits
  4. No Error Handling: Not catching and handling agent failures
  5. Inefficient Retrieval: Not optimizing vector store queries

Production Checklist

  • Implement proper error handling
  • Add request/response logging
  • Monitor token usage and costs
  • Set timeout limits for agent execution
  • Implement rate limiting
  • Add input validation
  • Test with edge cases
  • Set up observability (callbacks)
  • Implement fallback strategies
  • Version control prompts and configurations

© HermeticOrmus, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in plugins/llm-application-dev/skills/langchain-architecture of HermeticOrmus/LibreUIUX-Claude-Code.

Open the folder on GitHubat commit 41a968c

Used in 10 other repositories

We found 23 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 10 other GitHub owners. This page covers the copy in HermeticOrmus/LibreUIUX-Claude-Code, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Langchain Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Langchain Architecture compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Langchain Architecture this skillHermeticOrmus/LibreUIUX-Claude-Code11210 repos~2.5kAutomated safety check: PassMIT
Routerbase API Integrationaiskillstore/marketplace433—~964Automated safety check: PassNone
LLM Developmentmeleantonio/ChernyCode516—~499Automated safety check: PassNone
Tool CreatorAgentTeam-TaichuAI/ScienceClaw671—~4.7kAutomated safety check: PassNone
AI EngineerDokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI508—~1.1kAutomated safety check: PassCustom licence
Dspy Agent Framework Quick RefQredence/agentic-fleet111—~1kAutomated safety check: PassMIT

Similar skills

  • Routerbase API Integration

    aiskillstore/marketplace

    Integrate applications with RouterBase, the OpenAI-compatible model gateway at https://routerbase.com/v1.

    433 GitHub stars~964 tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • LLM Development

    meleantonio/ChernyCode

    LLM and ML development best practices with LangChain and transformers.

    516 GitHub stars~499 tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Tool Creator

    AgentTeam-TaichuAI/ScienceClaw

    Create new tools or upgrade existing tools for the agent. An agent skill from AgentTeam-TaichuAI/ScienceClaw.

    671 GitHub stars~4.7k tokensUpdated 5 mo ago
    AI & LLM EngineeringAuto-check passed
  • AI Engineer

    Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI

    Principal AI Architect and Machine Learning Engineer. An agent skill from Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI.

    508 GitHub stars~1.1k tokensUpdated 4 mo ago
    AI & LLM EngineeringAuto-check passed
  • Dspy Agent Framework Quick Ref

    Qredence/agentic-fleet

    Quick reference card for DSPy + Agent Framework integration patterns: typed signatures, assertions, routing cache, and agent handoffs.

    111 GitHub stars~1k tokensUpdated 6 mo ago
    AI & LLM EngineeringAuto-check passed
  • Agents And Middleware

    VectorSpaceLab/AREX-Skill

    Work on the actively maintained LangChain v1 agent package: initchatmodel, createagent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime…

    331 GitHub stars~1.2k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed

More from HermeticOrmus/LibreUIUX-Claude-Code

All 15 skills in this repo
  • Deployment Pipeline Design

    HermeticOrmus/LibreUIUX-Claude-Code

    Design multi-stage CI/CD pipelines with approval gates, security checks, and deployment orchestration.

    112 GitHub starsUsed in 11 repos~2.1k tokens
    Auto-check passed
  • Multi Cloud Architecture

    HermeticOrmus/LibreUIUX-Claude-Code

    Design multi-cloud architectures using a decision framework to select and integrate services across AWS, Azure, and GCP.

    112 GitHub starsUsed in 11 repos~1.2k tokens
    Auto-check passed
  • Archetypal Combinations

    HermeticOrmus/LibreUIUX-Claude-Code

    Rules and worked examples for combining an archetype (structure and behavior) with a Major Arcana card (color and mood) into one coherent design system.

    112 GitHub stars~3.4k tokensUpdated 5 days ago
    Auto-check passed
  • Brand Systems

    HermeticOrmus/LibreUIUX-Claude-Code

    Brand identity building blocks: positioning, personality, archetypes, logo systems, color palettes, type pairing, voice, and guidelines documentation.

    112 GitHub stars~2.3k tokensUpdated 5 days ago
    Auto-check passed
  • Design Principles

    HermeticOrmus/LibreUIUX-Claude-Code

    Core visual design principles (visual hierarchy, Gestalt grouping, composition, balance, contrast, white space, color, typography) with UI fixes, a checklist, and deep-dive references.

    112 GitHub stars~2k tokensUpdated 5 days ago
    Auto-check passed
  • Design Masters

    HermeticOrmus/LibreUIUX-Claude-Code

    Working profiles of Saul Bass, Massimo Vignelli, Dieter Rams, Paula Scher, Josef Müller-Brockmann, David Carson, and Paul Rand: key works, principles, and how to apply each in UI work.

    112 GitHub stars~2.7k tokensUpdated 5 days ago
    Auto-check passed

Works with

Questions about Langchain Architecture

What does Langchain Architecture do?

Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Langchain Architecture is an agent skill from HermeticOrmus/LibreUIUX-Claude-Code. Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns.

When should I use Langchain Architecture?

Langchain Architecture fits situations like: building LangChain applications; implementing AI agents; creating complex LLM workflows.

How do I install Langchain Architecture in Claude Code?

Run `npx skills add HermeticOrmus/LibreUIUX-Claude-Code --skill langchain-architecture -a claude-code`. Or copy the skill folder (plugins/llm-application-dev/skills/langchain-architecture in HermeticOrmus/LibreUIUX-Claude-Code) into .claude/skills/langchain-architecture in your project. Claude Code loads it when a task matches its description.

How do I install Langchain Architecture in Codex?

Run `npx skills add HermeticOrmus/LibreUIUX-Claude-Code --skill langchain-architecture -a codex`. Or copy the skill folder (plugins/llm-application-dev/skills/langchain-architecture in HermeticOrmus/LibreUIUX-Claude-Code) into .agents/skills/langchain-architecture in your project. Codex loads it when a task matches its description.

Can I use Langchain Architecture in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add HermeticOrmus/LibreUIUX-Claude-Code --skill langchain-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/langchain-architecture, .gemini/skills/langchain-architecture, .github/skills/langchain-architecture and .opencode/skills/langchain-architecture in your project.

What does Langchain Architecture need to run?

SKILL.md names no scripts, command-line tools or credentials: Langchain Architecture is instructions for the agent only. Our summary lists: Python 3.

Does Langchain Architecture access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Langchain Architecture safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Langchain Architecture use?

Langchain Architecture is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Langchain Architecture use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Langchain Architecture?

Skills that share tags, products or a category with Langchain Architecture: Routerbase API Integration (aiskillstore/marketplace, 433 stars), LLM Development (meleantonio/ChernyCode, 516 stars), Tool Creator (AgentTeam-TaichuAI/ScienceClaw, 671 stars) and AI Engineer (Dokhacgiakhoa/Agent-Skills-4-Vibe-Coding-CLI, 508 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Langchain Architecture?

HermeticOrmus (a GitHub user) maintains it in HermeticOrmus/LibreUIUX-Claude-Code, which has 112 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 4, 2026.

Source: HermeticOrmus/LibreUIUX-Claude-Code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.