From deepagents-skills
Initializes LangGraph projects in Python or JavaScript/TypeScript with structure, langgraph.json config, .env for LLMs, dependencies, and multi-agent patterns for dev and deployment.
npx claudepluginhub lubu-labs/langchain-agent-skills --plugin langgraph-skillsThis skill uses the workspace's default tool permissions.
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.pyGuides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
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]