Skip to main content

9 docs tagged with "langgraph"

View all tags

Checkpointing

A checkpointer saves the graph's state after every step, keyed by a thread_id. Compile with one and any run becomes resumable — after a crash, a restart, or a deliberate pause for human review.

Conditional Edges

A plain addedge("a", "b") always routes from a to b. addconditional_edges routes based on a function of the current state — this is how a graph loops an agent node against a tool node until the model stops requesting calls.

Human in the Loop

interrupt() pauses a graph mid-run, persists its full state via the checkpointer, and waits — no polling, no separate queue. A Command(resume=...) call later continues execution from that exact point with the human's input folded in.

Multi-Agent Patterns

A single agent with more tools is usually simpler and cheaper than several agents talking to each other. Multi-agent earns its complexity when one model juggling every tool starts picking the wrong one, or when responsibilities are cleanly separable (a researcher, a writer, a reviewer) and keeping their contexts and system prompts separate improves each one's accuracy.

React Agent

createagent builds a ReAct-style agent — reason, act, observe, repeat — from a model and a tool list. The constructor itself lives in LangGraph's prebuilt layer; langchain.agents.createagent is the stable entry point.

State and Nodes

A StateGraph is built around a state schema — usually a TypedDict — and a set of nodes, each a plain function that receives the current state and returns a partial update, not the whole state.

The LangChain ecosystem

"LangChain" is often used loosely to mean four separate projects that compose together: LangChain

Thread Persistence

Checkpointing covers how a checkpointer saves state. This page covers the specific case of a conversation surviving a process restart — the thing users actually expect from "the app remembers me."