
framework-selection
INVOKE THIS SKILL at the START of any LangChain/LangGraph/Deep Agents project, before writing any agent code. Determines which framework layer is right for the task: LangChain, LangGraph, Deep Agents, or a combination. Must be consulted before other agent skills.
- Installs
- 60
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/langchain-ai/skills-benchmarks --skill framework-selection- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads framework-selection automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
┌─────────────────────────────────────────┐
│ Deep Agents │ ← highest level: batteries included
│ (planning, memory, skills, files) │
├─────────────────────────────────────────┤
│ LangGraph │ ← orchestration: graphs, loops, state
│ (nodes, edges, state, persistence) │
├─────────────────────────────────────────┤
│ LangChain │ ← foundation: models, tools, chains
│ (models, tools, prompts, RAG) │
└─────────────────────────────────────────┘
Picking a higher layer does not cut you off from lower layers — you can use LangGraph graphs inside Deep Agents, and LangChain primitives inside both.
This skill should be loaded at the top of any project before selecting other skills or writing agent code. The framework you choose dictates which other skills to invoke next.
</overview>
Decision Guide
<decision-table>Answer these questions in order:
| Question | Yes → | No → |
|---|---|---|
| Does the task require breaking work into sub-tasks, managing files across a long session, persistent memory, or loading on-demand skills? | Deep Agents | ↓ |
| Does the task require complex control flow — loops, dynamic branching, parallel workers, human-in-the-loop, or custom state? | LangGraph | ↓ |
| Is this a single-purpose agent that takes input, runs tools, and returns a result? | LangChain (create_agent) | ↓ |
| Is this a pure model call, retrieval pipeline, or simple prompt chain with no agent loop? | LangChain (direct model / chain) | — |
Framework Profiles
<langchain-profile>LangChain — Use when the task is focused and self-contained
Best for:
- Single-purpose agents that use a fixed set of tools
- RAG pipelines and document Q&A
- Model calls, prompt templates, output parsing
- Quick prototypes where agent logic is simple
Not ideal when:
- The agent needs to plan across many steps
- State needs to persist across multiple sessions
- Control flow is conditional or iterative
Skills to invoke next: langchain-fundamentals, langchain-rag, langchain-middleware
LangGraph — Use when you need to own the control flow
Best for:
- Agents with branching logic or loops (e.g. retry-until-correct, reflection)
- Multi-step workflows where different paths depend on intermediate results
- Human-in-the-loop approval at specific steps
- Parallel fan-out / fan-in (map-reduce patterns)
- Persistent state across invocations within a session
Not ideal when:
- You want planning, file management, and subagent delegation handled for you (use Deep Agents instead)
- The workflow is straightforward enough for a simple agent
Skills to invoke next: langgraph-fundamentals, langgraph-human-in-the-loop, langgraph-persistence
Deep Agents — Use when the task is open-ended and multi-dimensional
Best for:
- Long-running tasks that require breaking work into a todo list
- Agents that need to read, write, and manage files across a session
- Delegating subtasks to specialized subagents
- Loading domain-specific skills on demand
- Persistent memory that survives across multiple sessions
Not ideal when:
- The task is simple enough for a single-purpose agent
- You need precise, hand-crafted control over every graph edge (use LangGraph directly)
Middleware — built-in and extensible:
Deep Agents ships with a built-in middleware layer out of the box — you configure it, you don't implement it. The following come pre-wired; you can also add your own on top:
| Middleware | What it provides | Always on? |
|---|---|---|
TodoListMiddleware | write_todos tool — agent plans and tracks multi-step tasks | ✓ |
FilesystemMiddleware | ls, read_file, write_file, edit_file, glob, grep tools | ✓ |
SubAgentMiddleware | task tool — delegate work to named subagents | ✓ |
SkillsMiddleware | Load SKILL.md files on demand from a skills directory | Opt-in |
MemoryMiddleware | Long-term memory across sessions via a Store instance | Opt-in |
HumanInTheLoopMiddleware | Interrupt and request human approval before sensitive tool calls | Opt-in |
Skills to invoke next: deep-agents-core, deep-agents-memory, deep-agents-orchestration
Mixing Layers
<mixing-layers> Because the frameworks are layered, they can be combined in the same project. The most common pattern is using Deep Agents as the top-level orchestrator while dropping down to LangGraph for specialized subagents.When to mix
| Scenario | Recommended pattern |
|---|---|
| Main agent needs planning + memory, but one subtask requires precise graph control | Deep Agents orchestrator → LangGraph subagent |
| Specialized pipeline (e.g. RAG, reflection loop) is called by a broader agent | LangGraph graph wrapped as a tool or subagent |
| High-level coordination but low-level graph for a specific domain | Deep Agents + LangGraph compiled graph as a subagent |
How it works in practice
A LangGraph compiled graph can be registered as a subagent inside Deep Agents. This means you can build a tightly-controlled LangGraph workflow (e.g. a retrieval-and-verify loop) and hand it off to the Deep Agents task tool as a named subagent — the Deep Agents orchestrator delegates to it without caring about its internal graph structure.
LangChain tools, chains, and retrievers can be used freely inside both LangGraph nodes and Deep Agents tools — they are the shared building blocks at every level.
</mixing-layers>Quick Reference
<quick-reference>| LangChain | LangGraph | Deep Agents | |
|---|---|---|---|
| Control flow | Fixed (tool loop) | Custom (graph) | Managed (middleware) |
| Middleware layer | Callbacks only | ✗ None | ✓ Explicit, configurable |
| Planning | ✗ | Manual | ✓ TodoListMiddleware |
| File management | ✗ | Manual | ✓ FilesystemMiddleware |
| Persistent memory | ✗ | With checkpointer | ✓ MemoryMiddleware |
| Subagent delegation | ✗ | Manual | ✓ SubAgentMiddleware |
| On-demand skills | ✗ | ✗ | ✓ SkillsMiddleware |
| Human-in-the-loop | ✗ | Manual interrupt | ✓ HumanInTheLoopMiddleware |
| Custom graph edges | ✗ | ✓ Full control | Limited |
| Setup complexity | Low | Medium | Low |
| Flexibility | Medium | High | Medium |
</quick-reference>Middleware is a concept specific to LangChain (callbacks) and Deep Agents (explicit middleware layer). LangGraph has no middleware — you wire behavior directly into nodes and edges.
FAQ
What does the framework-selection skill do?
INVOKE THIS SKILL at the START of any LangChain/LangGraph/Deep Agents project, before writing any agent code. Determines which framework layer is right for the task: LangChain, LangGraph, Deep Agents, or a combination. Must be consulted before other agent skills.
How do I install framework-selection?
Run npx skills add https://github.com/langchain-ai/skills-benchmarks --skill framework-selection in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/framework-selection/ (personal) or .claude/skills/framework-selection/ (project).
Which AI agents can use framework-selection?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is framework-selection safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains framework-selection?
It is published by langchain-ai in langchain-ai/skills-benchmarks, and it is an official skill from the maker of the technology it covers. It has 60 recorded installs.
More from langchain-ai/skills-benchmarks
react-components
langchain-ai/skills-benchmarks
Modern React component patterns with hooks and TypeScript
langsmith-trace
langchain-ai/skills-benchmarks
INVOKE THIS SKILL when working with LangSmith tracing OR querying traces. Covers adding tracing to applications and querying/exporting trace data. Uses the langsmith CLI tool.
langgraph-fundamentals
langchain-ai/skills-benchmarks
INVOKE THIS SKILL when writing ANY LangGraph code. Covers StateGraph, state schemas, nodes, edges, Command, Send, invoke, streaming, and error handling.
langchain-oss-primer
langchain-ai/skills-benchmarks
ALWAYS START HERE for any LangChain, Deep Agents, or LangGraph agent building project. Required starting point before choosing other skills or writing any code. Covers framework selection (LangChain vs LangGraph vs Deep Agents), agent archetypes, dependency setup, and which skills to load next based on your decisions.
langchain-dependencies
langchain-ai/skills-benchmarks
INVOKE THIS SKILL when asked about and/or have to implement package versions, installation, or dependency management for LangChain, LangGraph, LangSmith, or Deep Agents. Covers required packages, minimum versions, environment requirements, versioning best practices, and common community tool packages for both Python and TypeScript.
api-docs
langchain-ai/skills-benchmarks
OpenAPI documentation and REST API design patterns
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available