Expand description
§pe-graph — Graph execution engine for Potential Expectations
Implements the core graph primitives that agent topologies are built on:
StateGraph— declarative graph definition with typed nodes and edgesCompiledGraph— validated, executable graph withinvoke()/resume()GraphConfig— execution configuration (thread ID, recursion limit, etc.)Checkpointer— trait for durable state persistenceGraphRegistry— named storage for compiled graphs
The execution engine uses the Pregel BSP model (Bulk Synchronous Parallel): nodes execute in parallel supersteps with snapshot isolation, writes are collected and applied atomically between steps.
Depends only on pe-core plus tokio and futures for async execution.
Re-exports§
pub use checkpointer::CheckpointMeta;pub use checkpointer::Checkpointer;pub use checkpointer::InMemoryCheckpointer;pub use checkpointer::PendingWrite;pub use command::Command;pub use compiled::CompiledGraph;pub use compiled::ExecutionOutcome;pub use config::GraphConfig;pub use graph::StateGraph;pub use matrix_hook::ConvergenceRecorder;pub use matrix_hook::DefaultMatrixHook;pub use matrix_hook::MatrixHook;pub use matrix_hook::MatrixHookHandle;pub use matrix_hook::RoutingResolver;pub use pending_writes::PendingWrites;pub use registry::GraphRegistry;pub use retry::RetryPolicy;pub use retry::with_retry;pub use snapshot::StateSnapshot;
Modules§
- checkpointer
- Checkpoint persistence — trait + in-memory implementation.
- command
- Graph commands – how users send input back to a paused graph.
- compiled
- Compiled graph — the user-facing execution handle.
- config
- Graph execution configuration.
- graph
- Graph definition —
StateGraph<S>builder and validation. - matrix_
hook - Matrix integration hook — trait for the optional matrix layer.
- pending_
writes - Pending writes tracking for fault tolerance within a superstep.
- phase_
store - Phase state store – re-exported from pe-core for convenience.
- registry
- Graph registry — named storage for compiled graphs.
- retry
- Retry policy – per-phase retry with exponential backoff and jitter.
- snapshot
- State snapshots for checkpoint inspection and time travel.
Structs§
- Checkpoint
Data - Internal wrapper for checkpoint serialization.
- Phase
State Store - Stores serialized phase state for nodes, keyed by phase enum TypeId.
Enums§
- Phase
Store Error - Errors from phase state serialization/deserialization.