Skip to content
masterclass Buddy

AI Agents · Class

Flow

The Graph API models an agent as nodes connected by edges and sharing state. Nodes perform one task, update state, and can route to another node.

Last updated

Syntax

workflow = StateGraph(State)
workflow.add_node("name", node_function)
workflow.add_edge(START, "name")
app = workflow.compile()
result = app.invoke(input_state, config)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • StateGraph
  • START
  • END
  • Command
  • interrupt()
  • RetryPolicy
  • Send
  • Functional API

Source: Thinking in the Graph API - Docs by LangChain. Checked 2026-11-03.