Deepagents Setup Configuration
soba-labs/langchain-agent-skills
Initialize, validate, and troubleshoot Deep Agents projects in Python or JavaScript using the deepagents package.
Build LangChain agents with modern patterns. An agent skill from langchain-ai/skills-benchmarks.
$ npx skills add langchain-ai/skills-benchmarks --skill langchain-agents -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install langchain-ai/skills-benchmarks langchain-agents --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/langchain-ai/skills-benchmarks.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/benchmarks/langchain_basic .claude/skills/langchain-agents && rm -rf skills-srcUse ~/.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/
Install the "langchain-agents" agent skill from https://github.com/langchain-ai/skills-benchmarks/tree/main/skills/benchmarks/langchain_basic into .claude/skills/langchain-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-agents", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/langchain-ai/skills-benchmarks/tree/main/skills/benchmarks/langchain_basicType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add langchain-ai/skills-benchmarks --skill langchain-agents -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install langchain-ai/skills-benchmarks langchain-agents --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/langchain-ai/skills-benchmarks.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/benchmarks/langchain_basic .agents/skills/langchain-agents && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "langchain-agents" agent skill from https://github.com/langchain-ai/skills-benchmarks/tree/main/skills/benchmarks/langchain_basic into .agents/skills/langchain-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-agents", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add langchain-ai/skills-benchmarks --skill langchain-agents -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install langchain-ai/skills-benchmarks langchain-agents --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/langchain-ai/skills-benchmarks.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/benchmarks/langchain_basic .cursor/skills/langchain-agents && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "langchain-agents" agent skill from https://github.com/langchain-ai/skills-benchmarks/tree/main/skills/benchmarks/langchain_basic into .cursor/skills/langchain-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-agents", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/langchain-ai/skills-benchmarks.git --path skills/benchmarks/langchain_basic--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add langchain-ai/skills-benchmarks --skill langchain-agents -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install langchain-ai/skills-benchmarks langchain-agents --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/langchain-ai/skills-benchmarks.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/benchmarks/langchain_basic .gemini/skills/langchain-agents && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "langchain-agents" agent skill from https://github.com/langchain-ai/skills-benchmarks/tree/main/skills/benchmarks/langchain_basic into .gemini/skills/langchain-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-agents", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install langchain-ai/skills-benchmarks langchain-agentsInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add langchain-ai/skills-benchmarks --skill langchain-agents -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/langchain-ai/skills-benchmarks.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/benchmarks/langchain_basic .github/skills/langchain-agents && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "langchain-agents" agent skill from https://github.com/langchain-ai/skills-benchmarks/tree/main/skills/benchmarks/langchain_basic into .github/skills/langchain-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-agents", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add langchain-ai/skills-benchmarks --skill langchain-agents -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install langchain-ai/skills-benchmarks langchain-agents --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/langchain-ai/skills-benchmarks.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/benchmarks/langchain_basic .opencode/skills/langchain-agents && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "langchain-agents" agent skill from https://github.com/langchain-ai/skills-benchmarks/tree/main/skills/benchmarks/langchain_basic into .opencode/skills/langchain-agents/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "langchain-agents", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
langchain-agentsBuild LangChain agents with modern patterns. An agent skill from langchain-ai/skills-benchmarks.
Langchain Agents is an agent skill from langchain-ai/skills-benchmarks, published by the product's own GitHub organization. Build LangChain agents with modern patterns. Covers createagent, LangGraph, and context management.
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. It works with LangChain, LangGraph and React. The licence is MIT.
Read from SKILL.md and the folder at commit 9195f8c. It shows what the files ask for, not the result of running them.
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.
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.
Links to these hosts (documentation or services it may open):
docs.langchain.comgithub.comFrom URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Langchain Agents loads about 2.5k tokens when it runs. Until then it costs about 29 tokens; SKILL.md has 234 words of instructions outside code blocks.
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.
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.
The full file from langchain-ai/skills-benchmarks at commit 9195f8c, republished under its MIT licence (© langchain-ai). 234 words, ~2,519 tokens.
.claude/skills/langchain-agents/SKILL.md (or your agent's skills folder).<oneliner>
Build production-ready agents with LangGraph, from basic primitives to advanced context management.
</oneliner>
<quick_start>
IMPORTANT: Use modern abstractions. Older helpers like create_sql_agent, create_tool_calling_agent, create_react_agent, etc. are outdated.
Simple tool-calling agent? → create_agent
from langchain.agents import create_agent
graph = create_agent(model="anthropic:claude-sonnet-4-5", tools=[search], system_prompt="...")Use this for: Basic ReAct loops, tool-calling agents, simple Q&A bots.
Need planning + filesystem + subagents? → create_deep_agent
from deepagents import create_deep_agent
agent = create_deep_agent(model=model, tools=tools, backend=FilesystemBackend())Use this for: Research agents, complex workflows, multi-step planning.
Custom control flow / multi-agent / advanced context? → LangGraph (see below) Use this for: Custom routing logic, supervisor patterns, specialized state management, non-standard workflows.
Start simple: Build with basic ReAct loops first. Only add complexity when your use case requires it. </quick_start>
<create_agent>
from langchain_anthropic import ChatAnthropic
from langchain.agents import create_agent
from langchain_core.tools import tool
@tool
def my_tool(query: str) -> str:
"""Tool description that the model sees."""
return perform_operation(query)
model = ChatAnthropic(model="claude-sonnet-4-5")
agent = create_agent(
model=model,
tools=[my_tool],
system_prompt="Your agent behavior and guidelines."
)
result = agent.invoke({"messages": [("user", "Your question")]})Pattern applies to: SQL agents, search agents, Q&A bots, tool-calling workflows.
@tool
def calculate(expression: str) -> str:
"""Evaluate a mathematical expression safely."""
try:
allowed = set('0123456789+-*/(). ')
if not all(c in allowed for c in expression):
return "Error: Invalid characters"
return str(eval(expression))
except Exception as e:
return f"Error: {e}"
@tool
def convert_units(value: float, from_unit: str, to_unit: str) -> str:
"""Convert between common units."""
conversions = {
("km", "miles"): 0.621371,
("miles", "km"): 1.60934,
}
factor = conversions.get((from_unit, to_unit), None)
return f"{value * factor:.2f} {to_unit}" if factor else "Conversion not supported"
agent = create_agent(
model=ChatAnthropic(model="claude-sonnet-4-5"),
tools=[calculate, convert_units],
system_prompt="You are a helpful calculator assistant."
)from langchain.agents import create_agent
agent = create_agent(model=model, tools=[my_tool], system_prompt="...")
result = agent.invoke({"messages": [("user", "question")]})</create_agent>
<langgraph>
### Basic Agent from Scratch
from langgraph.graph import StateGraph, START, END
from langgraph.prebuilt import ToolNode
from typing import TypedDict, Annotated
from langgraph.graph.message import add_messages
class State(TypedDict):
messages: Annotated[list, add_messages]
tools = [search_tool]
tool_node = ToolNode(tools)
def agent(state: State):
return {"messages": [model.bind_tools(tools).invoke(state["messages"])]}
def route(state: State):
return "tools" if state["messages"][-1].tool_calls else END
workflow = StateGraph(State)
workflow.add_node("agent", agent)
workflow.add_node("tools", tool_node)
workflow.add_edge(START, "agent")
workflow.add_conditional_edges("agent", route)
workflow.add_edge("tools", "agent")
app = workflow.compile()The loop: Agent → tools → agent → END
When implementing custom tool execution, you must create a ToolMessage for each tool call:
from langchain_core.messages import ToolMessage
def custom_tool_node(state: State) -> dict:
last_message = state["messages"][-1]
tool_messages = []
for tool_call in last_message.tool_calls:
result = execute_tool(tool_call["name"], tool_call["args"])
# CRITICAL: tool_call_id must match!
tool_messages.append(ToolMessage(
content=str(result),
tool_call_id=tool_call["id"]
))
return {"messages": tool_messages}from langgraph.types import Command
from typing import Literal
def router(state: State) -> Command[Literal["research", "write", END]]:
if needs_more_context(state):
return Command(update={"notes": "Starting research"}, goto="research")
return Command(goto=END)
# Human-in-loop
def ask_user(state: State) -> Command:
response = interrupt("Please clarify:")
return Command(update={"messages": [HumanMessage(content=response)]}, goto="continue")</langgraph>
<context_management>
Pattern: Offload work to subagents, return only summaries.
researcher_subgraph = build_researcher_graph().compile()
def main_agent(state: State) -> Command:
if needs_research(state["messages"][-1]):
result = researcher_subgraph.invoke({"query": extract_query(state)})
return Command(
update={"context": state["context"] + f"\n{result['summary']}"},
goto="respond"
)
return Command(goto="respond")Pattern: Remove old messages but preserve system messages and recent context.
def trim_messages(messages: list, max_messages: int = 20) -> list:
system_msgs = [m for m in messages if isinstance(m, SystemMessage)]
conversation = [m for m in messages if not isinstance(m, SystemMessage)]
return system_msgs + conversation[-max_messages:]
def agent_with_trimming(state: State) -> dict:
trimmed = trim_messages(state["messages"], max_messages=15)
return {"messages": [model.invoke(trimmed)]}Pattern: Summarize old context, keep recent messages raw.
def compress_history(state: State) -> dict:
messages = state["messages"]
if len(messages) > 30:
old, recent = messages[:-10], messages[-10:]
summary = model.invoke([HumanMessage(content=f"Summarize:\n{format_messages(old)}")])
return {"messages": [SystemMessage(content=f"Previous:\n{summary.content}")] + recent}
return {"messages": messages}</context_management>
<multi_agent>
from langgraph.graph import StateGraph, START, END
from langgraph.types import Command
from typing import TypedDict, Annotated, Literal
from langgraph.graph.message import add_messages
class AgentState(TypedDict):
messages: Annotated[list, add_messages]
next_agent: str
def supervisor(state: AgentState) -> Command[Literal["billing", "technical", END]]:
last_msg = state["messages"][-1].content.lower()
if "invoice" in last_msg or "payment" in last_msg:
return Command(goto="billing")
elif "error" in last_msg or "not working" in last_msg:
return Command(goto="technical")
return Command(goto=END)
def billing_agent(state: AgentState) -> dict:
return {"messages": [billing_model.invoke(state["messages"])]}
def technical_agent(state: AgentState) -> dict:
return {"messages": [tech_model.invoke(state["messages"])]}
workflow = StateGraph(AgentState)
workflow.add_node("supervisor", supervisor)
workflow.add_node("billing", billing_agent)
workflow.add_node("technical", technical_agent)
workflow.add_edge(START, "supervisor")
workflow.add_edge("billing", END)
workflow.add_edge("technical", END)
app = workflow.compile()</multi_agent>
<advanced>
### Persistence with Checkpointer + Store
from langgraph.checkpoint.memory import MemorySaver
from langgraph.store.memory import InMemoryStore
checkpointer = MemorySaver() # Thread-level state
store = InMemoryStore() # Cross-thread memory
app = graph.compile(checkpointer=checkpointer, store=store)
app.invoke(
{"messages": [HumanMessage("Hello")]},
config={"configurable": {"thread_id": "user-123"}}
)from pydantic import BaseModel, Field
class ResearchOutput(BaseModel):
summary: str = Field(description="3-sentence summary")
sources: list[str] = Field(description="Source URLs")
confidence: float = Field(description="0-1 confidence score")
model_with_structure = model.with_structured_output(ResearchOutput)
def structured_research(state: State) -> dict:
result = model_with_structure.invoke(state["messages"])
return {"research": result.model_dump()}from deepagents import create_deep_agent
from deepagents.backends import CompositeBackend, FilesystemBackend, StoreBackend
backend = CompositeBackend({
"/workspace/": FilesystemBackend("./workspace"),
"/memories/": StoreBackend(store)
})
agent = create_deep_agent(
model=model,
tools=[search, scrape],
subagents=[researcher_agent, analyst_agent],
backend=backend
)DeepAgents provides: Filesystem (auto context files), Planning (task breakdown), Subagents (delegation), Memory (persistence).
</advanced>
<resources>
- [LangGraph Docs](https://docs.langchain.com/langgraph)
- [create_agent](https://docs.langchain.com/oss/python/langchain/agents)
- [DeepAgents](https://docs.langchain.com/oss/python/deepagents/overview)
- [LangGraph 101 Multi-Agent](https://github.com/langchain-ai/langgraph-101/blob/main/notebooks/LG201/multi_agent.ipynb)
- [Deep Research Example](https://github.com/langchain-samples/deep_research_101)
</resources>
© langchain-ai, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/benchmarks/langchain_basic of langchain-ai/skills-benchmarks.
Open the folder on GitHubat commit 9195f8c
Langchain Agents 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.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Langchain Agents this skilllangchain-ai/skills-benchmarks | 118 | — | ~2.5k | Automated safety check: Pass | MIT | |
| Deepagents Setup Configurationsoba-labs/langchain-agent-skills | 107 | — | ~1.9k | Automated safety check: Pass | MIT | |
| Langchain Langgraph Coding Assistant5zjk5/prompt-engineering | 127 | 1 repos | ~1.8k | Automated safety check: Pass | None | |
| Langgraphdavila7/claude-code-templates | 33k | 5 repos | ~1.9k | Automated safety check: Pass | MIT | |
| Langchain Architecturewshobson/agents | 40k | — | ~2k | Automated safety check: Pass | MIT | |
| Langchain Langgraph Agentsjeremylongshore/tons-of-skills-marketplace | 2.8k | — | ~3.7k | Automated safety check: Pass | MIT |
soba-labs/langchain-agent-skills
Initialize, validate, and troubleshoot Deep Agents projects in Python or JavaScript using the deepagents package.
5zjk5/prompt-engineering
当用户需要编写LangChain或LangGraph相关代码时,提供基于示例代码的编码辅助,包括RAG、Agent、工作流、工具定义、中间件等多种功能模块的实现指导。
davila7/claude-code-templates
Expert in LangGraph - the production-grade framework for building stateful, multi-actor AI applications.
wshobson/agents
Design LLM applications using LangChain 1.x and LangGraph for agents, memory, and tool integration.
jeremylongshore/tons-of-skills-marketplace
Build a correct LangGraph 1.0 ReAct agent with createreactagent — typed tools, error propagation, recursion caps, and stop conditions that actually stop.
Magic-Resume/Magic-Resume
How AI agents integrate with Magic Resume — read and safely edit a user's resumes through the native MCP server (@magic-resume/mcp).
langchain-ai/skills-benchmarks
INVOKE THIS SKILL at the START of any LangChain/LangGraph/Deep Agents project, before writing any agent code.
langchain-ai/skills-benchmarks
ALWAYS START HERE for any LangChain, Deep Agents, or LangGraph agent building project.
langchain-ai/skills-benchmarks
Modern React component patterns with hooks and TypeScript. An agent skill from langchain-ai/skills-benchmarks.
langchain-ai/skills-benchmarks
Unit testing and integration testing best practices. An agent skill from langchain-ai/skills-benchmarks.
langchain-ai/skills-benchmarks
OpenAPI documentation and REST API design patterns. An agent skill from langchain-ai/skills-benchmarks.
langchain-ai/skills-benchmarks
Database migration patterns and schema versioning. An agent skill from langchain-ai/skills-benchmarks.
Categories
Build LangChain agents with modern patterns. An agent skill from langchain-ai/skills-benchmarks. Langchain Agents is an agent skill from langchain-ai/skills-benchmarks, published by the product's own GitHub organization. Build LangChain agents with modern patterns.
Langchain Agents fits situations like: tasks that involve Building AI agents.
Run `npx skills add langchain-ai/skills-benchmarks --skill langchain-agents -a claude-code`. Or copy the skill folder (skills/benchmarks/langchain_basic in langchain-ai/skills-benchmarks) into .claude/skills/langchain-agents in your project. Claude Code loads it when a task matches its description.
Run `npx skills add langchain-ai/skills-benchmarks --skill langchain-agents -a codex`. Or copy the skill folder (skills/benchmarks/langchain_basic in langchain-ai/skills-benchmarks) into .agents/skills/langchain-agents in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add langchain-ai/skills-benchmarks --skill langchain-agents -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-agents, .gemini/skills/langchain-agents, .github/skills/langchain-agents and .opencode/skills/langchain-agents in your project.
SKILL.md names no scripts, command-line tools or credentials: Langchain Agents is instructions for the agent only. Our summary lists: Python 3.
SKILL.md names 2 domains. As links in the text: docs.langchain.com and github.com. This is read from the text; nothing was executed.
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.
Langchain Agents is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
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.
Skills that share tags, products or a category with Langchain Agents: Deepagents Setup Configuration (soba-labs/langchain-agent-skills, 107 stars), Langchain Langgraph Coding Assistant (5zjk5/prompt-engineering, 127 stars), Langgraph (davila7/claude-code-templates, 33k stars) and Langchain Architecture (wshobson/agents, 40k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
langchain-ai (a GitHub organization, an official publisher) maintains it in langchain-ai/skills-benchmarks, which has 118 GitHub stars. The repository holds 8 skills in this directory. The repository was last updated on September 21, 2026.
Source: langchain-ai/skills-benchmarks on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.