ri-agent-graph 0.2.2

Graph-based agent orchestration for Rust — LangGraph-inspired execution engine with checkpointing, parallel fan-out/fan-in, interrupt/resume, and event streaming
Documentation
use crate::router::RoutingFunction;

/// Type of edge in the graph
pub enum EdgeType {
    /// Normal edge: always goes to specified node
    Normal(String),

    /// Conditional edge: calls router to determine next node
    Conditional(Box<dyn RoutingFunction>),
}

impl std::fmt::Debug for EdgeType {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            EdgeType::Normal(next) => write!(f, "Normal({})", next),
            EdgeType::Conditional(_) => write!(f, "Conditional(<router>)"),
        }
    }
}