Langgraph

From mkurman/zorai · View interactive version

Langgraph is an AI agent skill from the GitHub repository mkurman/zorai. LangGraph — orchestrate LLM agents as stateful graphs. Multi-agent coordination, persistent state, human-in-the-loop, streaming, checkpointing, and conditional control flow. Build complex agent workflows.

How to use this skill

Skill file

Overview

LangGraph builds stateful, multi-step agent workflows as graphs. Supports conditional routing, human-in-the-loop checkpoints, persistent state, streaming, and multi-agent orchestration. The graph-based design enables complex, controllable agent behavior.

Installation

uv pip install langgraph

Simple Graph

from typing import TypedDict
from langgraph.graph import StateGraph, END

class AgentState(TypedDict):
    messages: list
    next_step: str

def research(state):
    return {"messages": state["messages"], "next_step": "write"}

def write(state):
    return {"messages": state["messages"], "next_step": "review"}

def review(state):
    return {"messages": state["messages"], "next_step": "__end__"}

graph = StateGraph(AgentState)
graph.add_node("research", research)
graph.add_node("write", write)
graph.add_node("review", review)
graph.set_entry_point("research")
graph.add_edge("research", "write")
graph.add_conditional_edges("write", lambda s: s["next_step"])
graph.add_edge("review", END)
app = graph.compile()

result = app.invoke({"messages": [], "next_step": ""})

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.