building-langgraph-agents
БесплатноБез исполняемых скриптовНе проверенLangGraph development for stateful multi-agent applications, cyclic workflows, conditional routing, human-in-the-loop patterns, and persistent state…
от majiayu000★ 31 звезда на GitHubОб этом скилле
LangGraph Development Skill
Quick Reference
LangGraph is LangChain's framework for building stateful, multi-actor applications with LLMs. It enables cyclic graphs, conditional branching, persistent state management, and human-in-the-loop workflows.
Key capabilities: StateGraph for workflow orchestration, checkpointers for persistence, prebuilt ReAct agents, streaming at multiple granularities, and LangGraph Platform for managed deployment.
Table of Contents
- When to Use
- Package Ecosystem
- Quick Start - Python
- Quick Start - TypeScript
- Core Concepts
- Prebuilt Components
- Common Patterns
- Quick Persistence Setup
- CLI Commands
- Error Quick Reference
- When to Use REFERENCE.md
- Agent Integration
- See Also
When to Use
This skill is loaded by backend-developer when:
langgraphinrequirements.txt,pyproject.toml, orsetup.py@langchain/langgraphinpackage.jsondependencies- Python imports:
from langgraph.graph import StateGraph - Environment variables
LANGSMITH_API_KEY,LANGGRAPH_API_URL, orLANGCHAIN_API_KEYpresent - User mentions "LangGraph", "StateGraph", "agent workflow", "cyclic agent", or "multi-agent graph"
Package Ecosystem
| Package | Description |
|---|---|
langgraph |
Core StateGraph, MessageGraph, prebuilt components |
langgraph-checkpoint-postgres |
PostgreSQL checkpointer for production |
langgraph-checkpoint-sqlite |
SQLite checkpointer with async support |
langgraph-sdk |
Python client for LangGraph Platform API |
@langchain/langgraph |
TypeScript/JavaScript implementation |
Compatibility: LangGraph 0.2.x requires langchain-core>=0.3.0.
Quick Start - Python
"""LangGraph Quick Start - Python"""
from langgraph.graph import StateGraph, START, END
from typing import TypedDict
# 1. Define state schema
class State(TypedDict):
messages: list[str]
count: int
# 2. Define node functions
def process(state: State) -> dict:
"""Process node - increments counter."""
return {"count": state["count"] + 1}
def respond(state: State) -> dict:
"""Response node - adds message to state."""
return {"messages": state["messages"] + [f"Processed {state['count']} times"]}
# 3. Build graph
graph = StateGraph(State)
graph.add_node("process", process)
graph.add_node("respond", respond)
graph.add_edge(START, "process")
graph.add_edge("process", "respond")
graph.add_edge("respond", END)
# 4. Compile and run
app = graph.compile()
result = app.invoke({"messages": [], "count": 0})
# {'messages': ['Processed 1 times'], 'count': 1}
With LLM and Tools
"""LangGraph with ChatOpenAI and tools."""
from langgraph.graph import StateGraph, START, MessagesState
from langgraph.prebuilt import ToolNode, tools_condition
from langchain_openai import ChatOpenAI
from langchain_core.tools import tool
@tool
def get_weather(city: str) -> str:
"""Get weather for a city."""
return f"Weather in {city}: 72F, sunny"
llm = ChatOpenAI(model="gpt-4o")
tools = [get_weather]
llm_with_tools = llm.bind_tools(tools)
def agent(state: MessagesState) -> dict:
response = llm_with_tools.invoke(state["messages"])
return {"messages": [response]}
graph = StateGraph(MessagesState)
graph.add_node("agent", agent)
graph.add_node("tools", ToolNode(tools))
graph.add_edge(START, "agent")
graph.add_conditional_edges("agent", tools_condition)
graph.add_edge("tools", "agent")
app = graph.compile()
result = app.invoke({"messages": [("user", "What's the weather in NYC?")]})
Quick Start - TypeScript
import { StateGraph, START, END, Annotation } from "@langchain/langgraph";
const State = Annotation.Root({
messages: Annotation<string[]>({
default: () => [],
reducer: (curr, update) => [...curr, ...update],
}),
count: Annotation<number>({ default: () => 0 }),
});
const process = (state: typeof State.State) => ({
count: state.count + 1,
});
const respond = (state: typeof State.State) => ({
messages: [`Processed ${state.count} times`],
});
const graph = new StateGraph(State)
.addNode("process", process)
.addNode("respond", respond)
.addEdge(START, "process")
.addEdge("process", "respond")
.addEdge("respond", END);
const app = graph.compile();
const result = await app.invoke({ messages: [], count: 0 });
Core Concepts
StateGraph
The core abstraction - a directed graph where nodes read and write to shared state.
from langgraph.graph import StateGraph
graph = StateGraph(State) # State is a TypedDict
State Schema
Defines the shape of data flowing through the graph.
from t
Установить building-langgraph-agents в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл building-langgraph-agents?
LangGraph development for stateful multi-agent applications, cyclic workflows, conditional routing, human-in-the-loop patterns, and persistent state management. Use for complex AI orchestration, agent coordination, and production-grade agentic systems.
Как установить скилл building-langgraph-agents?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл building-langgraph-agents запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic