Agent skill
langchain-ecosystem
Complete guide for LangChain, LangGraph, and Deep Agents development. Covers framework selection, agents, tools, RAG, middleware, graphs, persistence, HITL, subagents, and memory. Triggers when code imports langchain/langgraph/deepagents, or user asks about building AI agents, RAG pipelines, stateful graphs, human-in-the-loop workflows, or agent orchestration.
Install this agent skill to your Project
npx add-skill https://github.com/JoaquinCampo/Skills/tree/main/langchain-ecosystem
SKILL.md
LangChain Ecosystem Router
Framework Selection
Frameworks are layered, not competing:
┌─────────────────────────────────────┐
│ Deep Agents │ ← planning, memory, skills, files
├─────────────────────────────────────┤
│ LangGraph │ ← graphs, loops, state, control flow
├─────────────────────────────────────┤
│ LangChain │ ← models, tools, prompts, RAG
└─────────────────────────────────────┘
Decision tree (answer in order):
- Needs sub-tasks, file management, persistent memory, or on-demand skills? → Deep Agents
- Needs complex control flow (loops, branching, parallel, human-in-the-loop)? → LangGraph
- Single-purpose agent with fixed tools? → LangChain (
create_agent) - Pure model call, chain, or retrieval pipeline? → LangChain (LCEL)
| Capability | LangChain | LangGraph | Deep Agents |
|---|---|---|---|
| Control flow | Fixed tool loop | Custom graph | Middleware-managed |
| Planning | ✗ | Manual | ✓ TodoListMiddleware |
| File management | ✗ | Manual | ✓ FilesystemMiddleware |
| Persistent memory | ✗ | With checkpointer | ✓ MemoryMiddleware |
| Subagent delegation | ✗ | Manual | ✓ SubAgentMiddleware |
| Human-in-the-loop | ✗ | Manual interrupt | ✓ HumanInTheLoopMiddleware |
LangChain tools/chains/retrievers work inside LangGraph nodes and Deep Agents tools. LangGraph compiled graphs can be registered as Deep Agents subagents.
Quick Start (Most Common Patterns)
Simple agent:
from langchain.agents import create_agent
agent = create_agent(model="anthropic:claude-sonnet-4-5", tools=[my_tool])
result = agent.invoke({"messages": [{"role": "user", "content": "Hello"}]})
print(result["messages"][-1].content)
Stateful graph:
from langgraph.graph import StateGraph, START, END
graph = StateGraph(State).add_node("process", fn).add_edge(START, "process").add_edge("process", END).compile()
Deep Agent:
from deepagents import create_deep_agent
agent = create_deep_agent(model="claude-sonnet-4-5-20250929", tools=[my_tool], system_prompt="...")
Critical Rules (All Frameworks)
- Persistence always needs
thread_id:config = {"configurable": {"thread_id": "..."}} - HITL always needs checkpointer:
MemorySaver()at minimum - Resume after interrupt:
Command(resume={"decisions": [{"type": "approve"}]})— never plain dict - LangChain 1.0 is LTS — never start new projects on 0.3
- Always install
langchain-coreexplicitly — not auto-hoisted in monorepos - Use dedicated packages (e.g.,
langchain-chroma) notlangchain_community
Deep-Dive References
LangChain
| Reference | When to Read |
|---|---|
| references/langchain-fundamentals.md | create_agent, tool definitions, persistence, TypeScript |
| references/langchain-dependencies.md | Package versions, install commands, import paths, environment setup |
| references/langchain-middleware.md | HumanInTheLoopMiddleware, approval/edit/reject, per-tool policies |
| references/langchain-rag.md | Document loaders, splitters, embeddings, vector stores, MMR search |
LangGraph
| Reference | When to Read |
|---|---|
| references/langgraph-fundamentals.md | StateGraph, reducers, nodes, edges, Command, Send, streaming |
| references/langgraph-human-in-the-loop.md | interrupt(), idempotency, approval workflows, parallel interrupts |
| references/langgraph-persistence.md | Checkpointers, Store, time travel, subgraph scoping |
Deep Agents
| Reference | When to Read |
|---|---|
| references/deep-agents-core.md | create_deep_agent, built-in tools, SKILL.md format, configuration |
| references/deep-agents-memory.md | StateBackend, StoreBackend, FilesystemBackend, CompositeBackend |
| references/deep-agents-orchestration.md | Subagents, task delegation, TodoList, HITL approval flow |
Meta
| Reference | When to Read |
|---|---|
| references/framework-selection.md | Full decision tree, capability matrix, interoperability details |
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
sparse-retrieval-eval
Evaluate sparse retrieval models on standard IR benchmarks (BEIR, MIRACL, mMARCO). Covers all IR metrics (nDCG@k, Recall@k, MAP, MRR), dataset loading, sparse corpus encoding to CSR matrices, IDF-weighted retrieval, caching, and result interpretation. Triggers on: evaluate retrieval, BEIR benchmark, nDCG, recall@k, sparse retrieval evaluation, MIRACL evaluation, information retrieval metrics, IR evaluation, search quality metrics.
wandb-plot
Download and generate plots from Weights & Biases runs. Use when you need to: - List projects you have access to - List runs in a W&B project - Inspect available metrics for a run - Download existing plot images from a run - Generate line plots from metric history (loss, accuracy, etc.)
go
Go engineering best practices and idioms. This skill should be used when writing, reviewing, or refactoring Go code. Triggers on any .go file work, Go module operations, go test, go build, go run, go vet, go generate, or when the user mentions Go, golang, goroutines, channels, context, Go interfaces, Go error handling, Go testing, or Go concurrency. ALWAYS use this skill when Go code is involved, even for simple functions.
fastapi
FastAPI best practices and conventions. Use when working with FastAPI APIs and Pydantic models for them. Keeps FastAPI code clean and up to date with the latest features and patterns, updated with new versions. Write new code or refactor and update old code.
kvpress
kvpress (NVIDIA) KV-cache compression for HuggingFace LLMs. Use when: kvpress imports, compression_ratio, press(model) context managers, StreamingLLMPress, SnapKVPress, ExpectedAttentionPress, TOVAPress, KnormPress, KV-cache eviction, token pruning during generation, or attention sink methods.
plantuml
Create, edit, and render PlantUML diagrams. Triggers on: architecture diagrams, flowcharts, sequence diagrams, data models, state machines, visual documentation.
Didn't find tool you were looking for?