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 edgesGraphAgent- ADK Agent integrationCheckpointer- Persistent state for human-in-the-loopRouter- 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
- cache
node-cache - Node-level caching for graph execution.
- checkpoint
- Checkpointing for persistent graph state
- child
- Invoking a node from inside another node’s body.
- deferred
- Deferred node (fan-in barrier) support for graph workflows.
- delta
delta-checkpoint - Delta checkpoint compression for graph state.
- edge
- Edge types for graph control flow
- error
- Error types for adk-graph
- executor
- Pregel-based execution engine for graphs
- functional
functional - Functional API for Graph Workflows
- 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
- retry
- Per-node retry with exponential backoff.
- state
- State management for graph execution
- stream
- Streaming types for graph execution
- subgraph
- Running one graph as a node of another.
- time_
travel time-travel - Time-travel debugging for graph execution history.
- timeout
- Timeout enforcement for graph node execution.
- tool
- Exposing a node or a whole graph as a tool an LLM can call.
Structs§
- Agent
Node - Wrapper to use an existing ADK Agent as a graph node
- Append
Reducer - Built-in reducer: append to a Vec (list concatenation).
- Channel
- Channel definition for a state field
- Checkpoint
- Checkpoint data structure for persistence
- Compiled
Graph - A compiled graph ready for execution
- Deferred
Node Config - Configuration for a deferred (fan-in) node.
- Delta
Checkpointer - Wraps any
Checkpointerwith delta compression. - Delta
Config - Configuration for delta-based checkpoint compression.
- Execution
Config - Configuration passed to nodes during execution
- Execution
Log - Tracks task completion status within a workflow run. Stored as part of the checkpoint metadata.
- FanIn
Tracker - Tracks which upstream paths have completed for a deferred node.
- Function
Node - Function node - wraps an async function as a node
- Graph
Agent - GraphAgent wraps a CompiledGraph as an ADK Agent
- Graph
Agent Builder - Builder for GraphAgent
- Interrupted
Execution - Information about an interrupted execution
- MapDelta
- Delta representation for
HashMap<String, Value>. - Memory
Checkpointer - In-memory checkpointer for development and testing
- Merge
Reducer - Built-in reducer: deep merge for JSON-like structures.
- Messages
Value - Chat message container with ID-based deduplication.
- Node
Cache - Node cache that stores and retrieves execution results.
- Node
Cache Policy - Cache policy for a graph node.
- Node
Context - Context passed to nodes during execution
- Node
Output - Output from a node execution
- Pregel
Executor - Pregel-based executor for graphs
- Progress
Handle - A shared progress handle that nodes can use to report progress, resetting the idle timeout counter.
- Reduced
Value - Append-only state container. Accumulates values across tasks. Persisted to checkpoints on each task completion.
- Replace
Reducer - Built-in reducer: replace with incoming value (last-write-wins).
- Router
- Router helper functions for common patterns
- State
Graph - Builder for constructing graphs
- State
Schema - State schema defines channels and their reducers
- State
Schema Builder - Builder for StateSchema
- State
Schema Validator - Validates workflow state against a declared schema.
- Step
Info - Information about a single execution step in the graph history.
- String
Delta - Delta representation for
String. - Task
Context - Runtime context passed to
#[entrypoint]and#[task]functions. - Time
Travel Handle - Handle for time-travel operations on a graph thread.
- Timeout
Policy - Timeout configuration for a graph node.
- Untracked
Value - Transient runtime value excluded from checkpoints.
- VecDelta
- Delta representation for
Vec<Value>.
Enums§
- Cache
Backend - Cache backend selection.
- Checkpoint
Type - Discriminates between full state snapshots and incremental delta records.
- Edge
- Edge type
- Edge
Target - Target of an edge
- Expected
Type - Expected JSON value type for a state field.
- Functional
Error - Errors specific to the functional API.
- Graph
Error - Errors that can occur during graph operations
- Interrupt
- Interrupt request from a node or configuration
- Merge
Strategy - How to combine outputs from multiple upstream parallel paths.
- OnTimeout
- Recovery action when a node times out.
- Reducer
- Reducer determines how state updates are merged
- Stream
Event - Events emitted during streaming
- Stream
Mode - Stream mode options
- String
Op - An individual edit operation for string diffs.
Constants§
Traits§
- Checkpointer
- Checkpointer trait for persistence
- Diff
- Trait for types that can compute and apply incremental diffs.
- Node
- A node in the graph
- Typed
Reducer - Trait for defining custom merge strategies for state values.
Functions§
- compute_
cache_ key - Computes a deterministic cache key from a node name and its input state.
- execute_
with_ timeout - Execute a node with timeout enforcement.
- interrupt
- Helper to create a dynamic interrupt from within a node
- interrupt_
with_ data - Helper to create a dynamic interrupt with data