From deepagents-skills
Initialize and configure LangGraph projects with proper structure, langgraph.json configuration, environment variables, and dependency management. Use when users want to (1) create a new LangGraph project, (2) set up langgraph.json for deployment, (3) configure environment variables for LLM providers, (4) initialize project structure for agents, (5) set up local development with LangGraph Studio, (6) configure dependencies (pyproject.toml, requirements.txt, package.json), or (7) troubleshoot project configuration issues.
How this skill is triggered — by the user, by Claude, or both
Slash command
/deepagents-skills:langgraph-project-setupThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Initialize and configure LangGraph projects for local development and deployment.
assets/templates/package.jsonassets/templates/pyproject.tomlreferences/deployment-targets.mdreferences/javascript-project-structure.mdreferences/langgraph-json-schema.mdreferences/provider-configuration.mdreferences/python-project-structure.mdscripts/init_langgraph_project.jsscripts/init_langgraph_project.pyscripts/setup_providers.pyscripts/validate_langgraph_config.pyInitialize and configure LangGraph projects for local development and deployment.
# Initialize new project
uv run scripts/init_langgraph_project.py my-agent
# Fallback if uv not available
python3 scripts/init_langgraph_project.py my-agent
# Or with options
uv run scripts/init_langgraph_project.py my-agent \
--pattern multiagent \
--python-version 3.12
# Fallback if uv not available
python3 scripts/init_langgraph_project.py my-agent \
--pattern multiagent \
--python-version 3.12
# Initialize new project
node scripts/init_langgraph_project.js my-agent
# TypeScript project
node scripts/init_langgraph_project.js my-agent --typescript
# Multi-agent pattern
node scripts/init_langgraph_project.js my-agent \
--pattern multiagent \
--typescript
Simple Pattern: Single agent with straightforward workflow
Multi-Agent Pattern: Modular architecture with separated concerns
Run the init script with your chosen pattern:
# Python - simple
uv run scripts/init_langgraph_project.py my-agent
# Fallback if uv not available
python3 scripts/init_langgraph_project.py my-agent
# Python - multi-agent
uv run scripts/init_langgraph_project.py my-agent --pattern multiagent
# Fallback if uv not available
python3 scripts/init_langgraph_project.py my-agent --pattern multiagent
# JavaScript/TypeScript - simple
node scripts/init_langgraph_project.js my-agent --typescript
# JavaScript/TypeScript - multi-agent
node scripts/init_langgraph_project.js my-agent --pattern multiagent --typescript
The script creates:
langgraph.json configuration.env template.gitignorePython:
cd my-agent
uv venv --python 3.12
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e '.[dev]'
# Fallback if uv not available
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -e '.[dev]'
JavaScript:
cd my-agent
npm install # or: yarn install / pnpm install
Option A: Interactive Setup (Recommended)
uv run scripts/setup_providers.py
Follow the prompts to configure:
Option B: Manual Configuration
Edit .env file directly:
# Required: Choose at least one LLM provider
OPENAI_API_KEY=sk-...
# or
ANTHROPIC_API_KEY=sk-ant-...
# Optional: Enable tracing
LANGSMITH_API_KEY=lsv2_...
LANGSMITH_TRACING=true
LANGSMITH_PROJECT=my-project
See references/provider-configuration.md for provider-specific setup.
Replace TODO comments in generated files:
Python Simple:
my_agent/agent.pycall_model functionPython Multi-Agent:
my_agent/utils/state.pymy_agent/utils/nodes.pymy_agent/utils/tools.pymy_agent/agent.pyJavaScript/TypeScript:
src/ directoryThe init script creates a basic configuration. Customize as needed:
{
"dependencies": ["."],
"graphs": {
"agent": "./my_agent/agent.py:graph"
},
"env": ".env",
"python_version": "3.11"
}
Key configuration options:
dependencies: Package dependencies locationgraphs: Mapping of graph IDs to code pathsenv: Path to environment filepython_version or node_version: Runtime versionFor complete schema reference, see references/langgraph-json-schema.md.
Option A: langgraph dev (Recommended for development)
langgraph dev
Option B: langgraph up (Production-like testing)
langgraph up
Access Studio in your browser:
https://smith.langchain.com/studio/?baseUrl=http://127.0.0.1:2024
Safari users: Use --tunnel flag:
langgraph dev --tunnel
uv run scripts/validate_langgraph_config.py
Checks:
# Start server
langgraph dev
# In another terminal, test with curl
curl -X POST http://localhost:2024/invoke \
-H "Content-Type: application/json" \
-d '{"input": {"messages": [{"role": "user", "content": "Hello"}]}}'
# pyproject.toml
[project.optional-dependencies]
openai = ["langchain-openai>=1.1.0"]
# agent.py
from langchain_openai import ChatOpenAI
model = ChatOpenAI(model="gpt-4o-mini")
# pyproject.toml
[project.optional-dependencies]
anthropic = ["langchain-anthropic>=1.1.0"]
# agent.py
from langchain_anthropic import ChatAnthropic
model = ChatAnthropic(model="claude-haiku-4-5-20251001")
// package.json
{
"dependencies": {
"@langchain/openai": "^1.1.0"
}
}
// agent.ts
import { ChatOpenAI } from "@langchain/openai";
const model = new ChatOpenAI({ model: "gpt-4o-mini" });
references/python-project-structure.mdreferences/javascript-project-structure.mdreferences/langgraph-json-schema.mdreferences/provider-configuration.mdreferences/deployment-targets.mdEnsure dependencies are installed:
# Python
uv pip install -e '.[dev]'
# Fallback if uv not available
pip install -e '.[dev]'
# JavaScript
npm install
Check graph path format:
./package_name/agent.py:graph./src/agent.ts:graphValidate: uv run scripts/validate_langgraph_config.py (fallback: python3 scripts/validate_langgraph_config.py)
.env file exists in project root"env": ".env" in langgraph.jsonlanggraph dev--tunnel flaglanggraph dev (not langgraph up)After setup:
Initialize Python project:
uv run scripts/init_langgraph_project.py <name> [--pattern simple|multiagent] [--python-version 3.11|3.12|3.13]
# Fallback if uv not available
python3 scripts/init_langgraph_project.py <name> [--pattern simple|multiagent] [--python-version 3.11|3.12|3.13]
Initialize JavaScript project:
node scripts/init_langgraph_project.js <name> [--pattern simple|multiagent] [--typescript]
Validate langgraph.json:
uv run scripts/validate_langgraph_config.py [path/to/langgraph.json]
# Fallback if uv not available
python3 scripts/validate_langgraph_config.py [path/to/langgraph.json]
Interactive provider setup:
uv run scripts/setup_providers.py [--output .env]
# Fallback if uv not available
python3 scripts/setup_providers.py [--output .env]
npx claudepluginhub mindxpansion/langchain-agent-skills --plugin langgraph-skillsGuides collaborative design exploration before implementation: explores context, asks clarifying questions, proposes approaches, and writes a design doc for user approval.
Creates structured, bite-sized implementation plans from specs or requirements before writing code. Useful for breaking down multi-step tasks into testable steps with file structure and task boundaries.
Implements work from a spec or tickets using TDD at agreed seams, with regular typechecking and test runs, followed by code review.