skills/langgraph-project-setup/SKILL.md
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.
npx skillsauth add lubu-labs/langchain-agent-skills langgraph-project-setupInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Initialize 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]
tools
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
tools
Fetch, organize, and analyze LangSmith traces for debugging and evaluation. Use when you need to: query traces/runs by project, metadata, status, or time window; download traces to JSON; organize outcomes into passed/failed/error buckets; analyze token/message/tool-call patterns; compare passed vs failed behavior; or investigate benchmark and production failures.
tools
Use this skill when you need to test or evaluate LangGraph/LangChain agents: writing unit or integration tests, generating test scaffolds, mocking LLM/tool behavior, running trajectory evaluation (match or LLM-as-judge), running LangSmith dataset evaluations, and comparing two agent versions with A/B-style offline analysis. Use it for Python and JavaScript/TypeScript workflows, evaluator design, experiment setup, regression gates, and debugging flaky/incorrect evaluation results.
development
Design state schemas, implement reducers, configure persistence, and debug state issues for LangGraph applications. Use when users want to (1) design or define state schemas for LangGraph graphs, (2) implement reducer functions for state accumulation, (3) configure persistence with checkpointers (InMemorySaver/MemorySaver, SqliteSaver, PostgresSaver), (4) debug state update issues or unexpected state behavior, (5) migrate state schemas between versions, (6) validate state schema structure, (7) choose between TypedDict and MessagesState patterns, (8) implement custom reducers for lists, dicts, or sets, (9) use the Overwrite type to bypass reducers, (10) set up thread-based persistence for multi-turn conversations, or (11) inspect checkpoints for debugging.