
langchain-oss-primer
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.
- Installs
- 62
- 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 langchain-oss-primer- 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 langchain-oss-primer 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.
It answers three questions every project must resolve upfront:
- Which framework? — LangChain, LangGraph, or Deep Agents
- Which agent archetype? — maps your use case to the right API and patterns
- What to install and which skills to load next
Load this skill first. Once you've decided on a framework and agent type, follow the "Next Skills" section at the bottom — it tells you exactly which skills to invoke next based on your choices.
</overview>
Step 1 — Pick Your Framework
The three frameworks are layered, not competing. Each builds on the one below:
┌─────────────────────────────────────────┐
│ Deep Agents │ ← batteries included
│ (planning, memory, skills, files) │
├─────────────────────────────────────────┤
│ LangGraph │ ← custom orchestration
│ (nodes, edges, state, persistence) │
├─────────────────────────────────────────┤
│ LangChain │ ← foundation
│ (models, tools, prompts, RAG) │
└─────────────────────────────────────────┘
Answer these questions in order:
| Question | Yes → | No → |
|---|---|---|
| User needs or wants planning, persistent memory, complex task management, long-running tasks, out-of-the-box file management, on-demand skills, or built-in middleware, subagents, easy expansion capabilities? | Deep Agents | ↓ |
| Needs custom control flow — specified loops, branching, deterministic parallel workers, or manually instrumented human-in-the-loop? | LangGraph | ↓ |
| Single-purpose agent with a fixed set of tools? | LangChain (create_agent) | ↓ |
| Simple prompt pipeline or retrieval chain with no agent loop? | LangChain (direct model / chain) | — |
Higher layers depend on lower ones only when necessary — you can mix them. A LangGraph graph can be a subagent inside Deep Agents; LangChain tools work inside both.
</framework-decision> <framework-profiles>| LangChain | LangGraph | Deep Agents | |
|---|---|---|---|
| Control flow | Fixed (tool loop) | Custom (graph) | Managed (middleware) |
| Middleware | 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 |
</framework-profiles>Middleware is a concept specific to Deep Agents (explicit middleware layer). LangGraph has no middleware — behavior is wired directly into nodes and edges. If a user asks for built-in hooks or automatic middleware, route to Deep Agents.
Step 2 — Pick Your Agent Archetype
Once you've chosen a framework, match your use case to the right API and pattern.
<langchain-archetypes>LangChain — use create_agent()
Best for single-purpose agents in a ReACT style with a fixed tool set. No built-in planning, memory management, or delegation.
| Archetype | Description | Key tools |
|---|---|---|
| QA / Chatbot | Answer questions, summarise, classify. One job, done well. | LLM + optional retrieval |
| SQL Agent | Query a database, return structured results | SQLDatabase, create_agent |
| Search Agent | Look up information, return findings | TavilySearchResults, DuckDuckGoSearch |
| RAG Agent | Retrieve from a vector store, ground answers in documents | retriever tool + create_agent |
| Data Analysis Agent | Load, transform, and summarise structured data | PythonREPL, pandas tools |
| Tool-calling Agent | Call APIs, run code, or chain arbitrary tools | custom @tool functions |
All LangChain agents use create_agent(model, tools=[...]). Next skill: langchain-fundamentals.
LangGraph — use StateGraph
Best when you need explicit, deterministic control flow.
| Archetype | Description | Key pattern |
|---|---|---|
| Deterministic Parallel Workflows | Fan out to multiple nodes, collect results, merge | parallel edges → aggregation node |
| Multi-stage Pipeline | Extract → Transform → Load with typed state | TypedDict state + sequential nodes |
| Branching Classifier | Route inputs to different handlers based on content | conditional edges + classifer node |
| Reflection Loop | Generate → Critique → Revise cycle with explicit exit | cycle edges + iteration counter |
| Custom HITL | Complex human-in-the-loop with structured review and conditional edges | interrupt_before/interrupt_after + Command resume |
LangGraph agents use StateGraph(State) with explicit add_node, add_edge, add_conditional_edges. Next skill: langgraph-fundamentals.
Deep Agents — use create_deep_agent()
Best when the agent needs to manage its own work: planning tasks, remembering users across sessions, delegating to specialists, or managing files autonomously.
| Archetype | Description | Why Deep Agents |
|---|---|---|
| Research Assistant | Receives an open-ended research brief, breaks it into subtasks, delegates to specialist subagents, writes up findings | Needs SubAgentMiddleware for delegation + TodoListMiddleware for planning |
| Personal Assistant | Remembers user preferences, ongoing projects, and context across multiple sessions | Needs MemoryMiddleware (Store) for cross-session persistence |
| Coding Assistant | Reads codebases, writes files, plans refactors across many steps, optionally asks for approval before writes | Needs FilesystemMiddleware + TodoListMiddleware + optional HITL |
| Orchestrator | Top-level agent that routes work to 2+ specialized subagents (researcher, coder, writer…) | Needs SubAgentMiddleware with custom subagent configs |
| Long-running Task Agent | Multi-hour or multi-day workflows where state must survive restarts | Needs checkpointer + MemoryMiddleware |
| On-demand Skills Agent | Agent that loads different skill sets depending on what the user asks | Needs SkillsMiddleware + FilesystemBackend |
| Multi Agent Architecture | Agent that spawns or has access to subagents for isolated tasks |
All Deep Agents use create_deep_agent(model, tools=[...], ...). Next skill: deep-agents-core — load it immediately after deciding on Deep Agents.
Deep Agents built-in middleware
Six components pre-wired out of the box. First three are always active; the rest are opt-in:
| Middleware | Always on? | What it gives the agent |
|---|---|---|
TodoListMiddleware | ✓ | write_todos tool — tracks multi-step task plans |
FilesystemMiddleware | ✓ | ls, read_file, write_file, edit_file, glob, grep |
SubAgentMiddleware | ✓ | task tool — delegates subtasks to named subagents |
SkillsMiddleware | Opt-in | Loads SKILL.md files on demand from a skills directory |
MemoryMiddleware | Opt-in | Long-term memory across sessions via a Store instance |
HumanInTheLoopMiddleware | Opt-in | Pauses execution and requests human approval before specified tool calls |
You configure middleware — you don't implement it.
</deep-agents-middleware> <mixing-note> You can combine layers in the same project. The most common pattern: Deep Agents as the top-level orchestrator, with a compiled LangGraph graph registered as a specialized subagent. LangChain tools and chains are usable at every level. </mixing-note> </deep-agents-archetypes>Step 3 — Set Up Your Dependencies
Environment requirements
| Python | TypeScript / Node | |
|---|---|---|
| Runtime | Python 3.10+ | Node.js 20+ |
| LangChain | 1.0+ (LTS) | 1.0+ (LTS) |
| LangSmith SDK | >= 0.3.0 | >= 0.3.0 |
Always use LangChain 1.0+. LangChain 0.3 is maintenance-only until December 2026 — do not start new projects on it.
Core packages — always required
<python-core> **Python**| Package | Role | Version |
|---|---|---|
langchain | Agents, chains, retrieval | >=1.0,<2.0 |
langchain-core | Base types & interfaces | >=1.0,<2.0 |
langsmith | Tracing, evaluation, datasets | >=0.3.0 |
| Package | Role | Version |
|---|---|---|
@langchain/core | Base types & interfaces (peer dep — install explicitly) | ^1.0.0 |
langchain | Agents, chains, retrieval | ^1.0.0 |
langsmith | Tracing, evaluation, datasets | ^0.3.0 |
Orchestration — add based on your framework choice
<orchestration-packages>| Framework | Python | TypeScript |
|---|---|---|
| LangGraph | langgraph>=1.0,<2.0 | @langchain/langgraph ^1.0.0 |
| Deep Agents | deepagents (depends on LangGraph; installs it as a transitive dep) | deepagents |
Model providers — pick the one(s) you use
<provider-packages>| Provider | Python | TypeScript |
|---|---|---|
| OpenAI | langchain-openai | @langchain/openai |
| Anthropic | langchain-anthropic | @langchain/anthropic |
| Google Gemini | langchain-google-genai | @langchain/google-genai |
| Mistral | langchain-mistralai | @langchain/mistralai |
| Groq | langchain-groq | @langchain/groq |
| Cohere | langchain-cohere | @langchain/cohere |
| AWS Bedrock | langchain-aws | @langchain/aws |
| Azure AI | langchain-azure-ai | @langchain/azure-openai |
| Ollama (local) | langchain-ollama | @langchain/ollama |
| Hugging Face | langchain-huggingface | — |
| Fireworks AI | langchain-fireworks | — |
| Together AI | langchain-together | — |
Common tools & retrieval — add as needed
<tool-packages>| Package | Adds | Notes |
|---|---|---|
langchain-tavily / @langchain/tavily | Tavily web search | Keep at latest; frequently updated for compatibility |
langchain-text-splitters | Text chunking | Semver; keep current |
langchain-chroma / @langchain/community | Chroma vector store | Dedicated integration package; keep at latest |
langchain-pinecone / @langchain/pinecone | Pinecone vector store | Dedicated integration package; keep at latest |
langchain-qdrant / @langchain/qdrant | Qdrant vector store | Dedicated integration package; keep at latest |
faiss-cpu | FAISS vector store (Python only, local) | Via langchain-community |
langchain-community / @langchain/community | 1000+ integrations fallback | Python: NOT semver — pin to minor series |
langsmith[pytest] | pytest plugin | Requires langsmith>=0.3.4 |
</tool-packages>Prefer dedicated integration packages over
langchain-communitywhen one exists — they are independently versioned and more stable.
Dependency templates
<ex-langchain-python> <python> LangChain agent — provider-agnostic starting point. ``` # requirements.txt langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langsmith>=0.3.0Add your model provider:
langchain-openai | langchain-anthropic | langchain-google-genai | ...
Add tools/retrieval as needed:
langchain-tavily | langchain-chroma | langchain-text-splitters | ...
</python>
</ex-langchain-python>
<ex-langgraph-python>
<python>
LangGraph project — provider-agnostic starting point.
requirements.txt
langchain>=1.0,<2.0 langchain-core>=1.0,<2.0 langgraph>=1.0,<2.0 langsmith>=0.3.0
Add your model provider:
langchain-openai | langchain-anthropic | langchain-google-genai | ...
</python>
</ex-langgraph-python>
<ex-langgraph-typescript>
<typescript>
LangGraph project — provider-agnostic starting point.
```json
{
"dependencies": {
"@langchain/core": "^1.0.0",
"langchain": "^1.0.0",
"@langchain/langgraph": "^1.0.0",
"langsmith": "^0.3.0"
}
}
Add your model provider:
langchain-openai | langchain-anthropic | langchain-google-genai | ...
</python>
</ex-deepagents-python>
<ex-deepagents-typescript>
<typescript>
Deep Agents project — provider-agnostic starting point.
```json
{
"dependencies": {
"deepagents": "latest",
"@langchain/core": "^1.0.0",
"langchain": "^1.0.0",
"langsmith": "^0.3.0"
}
}
Step 4 — Set Your Environment Variables
<environment-variables> ```bash # LangSmith — always recommended for observability LANGSMITH_API_KEY=<your-key> LANGSMITH_PROJECT=<project-name> # optional, defaults to "default"Model provider — set the one(s) you use
OPENAI_API_KEY=<your-key> ANTHROPIC_API_KEY=<your-key> GOOGLE_API_KEY=<your-key> MISTRAL_API_KEY=<your-key> GROQ_API_KEY=<your-key> COHERE_API_KEY=<your-key> FIREWORKS_API_KEY=<your-key> TOGETHER_API_KEY=<your-key> HUGGINGFACEHUB_API_TOKEN=<your-key>
Common tool/retrieval services
TAVILY_API_KEY=<your-key> PINECONE_API_KEY=<your-key>
</environment-variables>
---
## Step 5 — Load the Right Skill Next
Based on the framework and archetype you chose above, invoke these skills **now** before writing any code:
<next-skills>
### If you chose LangChain
| Your archetype | Load next |
|----------------|-----------|
| Any LangChain agent (QA bot, SQL, search, RAG, tool-calling) | **`langchain-fundamentals`** — always |
| Adding external tools/packages (Tavily, Pinecone, etc.) | **`langchain-dependencies`** — package patterns and version guidance |
| Need streaming or async responses | **`langchain-fundamentals`** then `langgraph-fundamentals` |
### If you chose LangGraph
| Your archetype | Load next |
|----------------|-----------|
| Any LangGraph graph | **`langgraph-fundamentals`** — always |
| Approval pipeline, HITL, or pause/resume | **`langgraph-fundamentals`** + `langgraph-human-in-the-loop` |
| State that must survive restarts or cross-thread memory | **`langgraph-persistence`** |
| Streaming output token by token | **`langgraph-fundamentals`** |
### If you chose Deep Agents
**Always load `deep-agents-core` first — it is the mandatory starting point for any Deep Agents project.**
| Your archetype | Load next (after `deep-agents-core`) |
|----------------|--------------------------------------|
| Research Assistant — delegates to specialist subagents | **`deep-agents-orchestration`** — subagent config, TodoList, HITL |
| Personal Assistant — remembers users across sessions | **`deep-agents-memory`** — MemoryMiddleware, Store backends |
| Coding Assistant — reads/writes files, plans refactors | `deep-agents-core` is sufficient; add `deep-agents-orchestration` if using HITL |
| Orchestrator — routes work across multiple named subagents | **`deep-agents-orchestration`** — SubAgentMiddleware patterns |
| Long-running task agent — survives restarts | **`deep-agents-memory`** + `deep-agents-orchestration` |
| On-demand skills agent | `deep-agents-core` covers SkillsMiddleware setup |
</next-skills>
FAQ
What does the langchain-oss-primer skill do?
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.
How do I install langchain-oss-primer?
Run npx skills add https://github.com/langchain-ai/skills-benchmarks --skill langchain-oss-primer 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/langchain-oss-primer/ (personal) or .claude/skills/langchain-oss-primer/ (project).
Which AI agents can use langchain-oss-primer?
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 langchain-oss-primer 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 langchain-oss-primer?
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 62 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-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.
framework-selection
langchain-ai/skills-benchmarks
Open the skill to read its SKILL.md instructions.
deep-agents-core
langchain-ai/skills-benchmarks
Open the skill to read its SKILL.md instructions.
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