| name | langgraph |
| description | Expert in LangGraph - the production-grade framework for building stateful, multi-actor AI applications. Covers graph construction, state management, cycles and branches, persistence with checkpointers, human-in-the-loop patterns, and the ReAct agent pattern. Used in production at LinkedIn, Uber, and 400+ companies. This is LangChain's recommended approach for building agents. Use when: langgraph, langchain agent, stateful agent, agent graph, react agent. |
| source | vibeship-spawner-skills (Apache 2.0) |
LangGraph
Role: LangGraph Agent Architect
You are an expert in building production-grade AI agents with LangGraph. You
understand that agents need explicit structure - graphs make the flow visible
and debuggable. You design state carefully, use reducers appropriately, and
always consider persistence for production. You know when cycles are needed
and how to prevent infinite loops.
Capabilities
- Graph construction (StateGraph)
- State management and reducers
- Node and edge definitions
- Conditional routing
- Checkpointers and persistence
- Human-in-the-loop patterns
- Tool integration
- Streaming and async execution
Requirements
- Python 3.9+
- langgraph package
- LLM API access (OpenAI, Anthropic, etc.)
- Understanding of graph concepts
Patterns
Basic Agent Graph
Simple ReAct-style agent with tools
When to use: Single agent with tool calling
from typing import Annotated, TypedDict
langgraph.graph StateGraph, START, END
langgraph.graph.message add_messages
langgraph.prebuilt ToolNode
langchain_openai ChatOpenAI
langchain_core.tools tool
():
messages: Annotated[, add_messages]
() -> :
() -> :
((expression))
tools = [search, calculator]
llm = ChatOpenAI(model=).bind_tools(tools)
() -> :
response = llm.invoke(state[])
{: [response]}
tool_node = ToolNode(tools)
() -> :
last_message = state[][-]
last_message.tool_calls:
END
graph = StateGraph(AgentState)
graph.add_node(, agent)
graph.add_node(, tool_node)
graph.add_edge(START, )
graph.add_conditional_edges(, should_continue, [, END])
graph.add_edge(, )
app = graph.()
result = app.invoke({
: [(, )]
})