Module graph

Module graph 

Source
Available on crate feature graph only.
Expand description

Graph-based workflow engine (LangGraph-inspired).

Build complex agent workflows with:

  • StateGraph - Graph builder with nodes and edges
  • GraphAgent - ADK Agent integration
  • Checkpointer - Persistent state for human-in-the-loop
  • Router - Conditional edge routing helpers
  • Cycle support with recursion limits
  • Streaming execution modes

Available with feature: graph

Modules§

agent
GraphAgent - ADK Agent integration for graph workflows
checkpoint
Checkpointing for persistent graph state
edge
Edge types for graph control flow
error
Error types for adk-graph
executor
Pregel-based execution engine for graphs
graph
StateGraph builder for constructing graphs
interrupt
Human-in-the-loop interrupt types
node
Node types for graph execution
prelude
Prelude module for convenient imports
state
State management for graph execution
stream
Streaming types for graph execution

Structs§

AgentNode
Wrapper to use an existing ADK Agent as a graph node
Channel
Channel definition for a state field
Checkpoint
Checkpoint data structure for persistence
CompiledGraph
A compiled graph ready for execution
ExecutionConfig
Configuration passed to nodes during execution
FunctionNode
Function node - wraps an async function as a node
GraphAgent
GraphAgent wraps a CompiledGraph as an ADK Agent
GraphAgentBuilder
Builder for GraphAgent
InterruptedExecution
Information about an interrupted execution
MemoryCheckpointer
In-memory checkpointer for development and testing
NodeContext
Context passed to nodes during execution
NodeOutput
Output from a node execution
PregelExecutor
Pregel-based executor for graphs
Router
Router helper functions for common patterns
StateGraph
Builder for constructing graphs
StateSchema
State schema defines channels and their reducers
StateSchemaBuilder
Builder for StateSchema

Enums§

Edge
Edge type
EdgeTarget
Target of an edge
GraphError
Errors that can occur during graph operations
Interrupt
Interrupt request from a node or configuration
Reducer
Reducer determines how state updates are merged
StreamEvent
Events emitted during streaming
StreamMode
Stream mode options

Constants§

END
START
Special node identifiers

Traits§

Checkpointer
Checkpointer trait for persistence
Node
A node in the graph

Functions§

interrupt
Helper to create a dynamic interrupt from within a node
interrupt_with_data
Helper to create a dynamic interrupt with data

Type Aliases§

Result
Result type for graph operations
State
Graph state - a map of channel names to values