Skip to main content

Crate oxidizedgraph

Crate oxidizedgraph 

Source
Expand description

§oxidizedgraph

A humble attempt at LangGraph in Rust - high-performance agent orchestration framework.

oxidizedgraph provides graph-based agent workflows with:

  • Type-safe state management with AgentState and SharedState
  • Async execution powered by Tokio
  • Flexible routing with conditional edges
  • Built-in nodes for common patterns (LLM, tools, routing)

§Quick Start

use oxidizedgraph::prelude::*;

// Define a simple node
struct MyNode;

#[async_trait]
impl NodeExecutor for MyNode {
    fn id(&self) -> &str { "my_node" }

    async fn execute(&self, state: SharedState) -> Result<NodeOutput, NodeError> {
        // Do work with state
        Ok(NodeOutput::cont())
    }
}

// Build and run the graph
let graph = GraphBuilder::new()
    .add_node(MyNode)
    .set_entry_point("my_node")
    .add_edge_to_end("my_node")
    .compile()?;

let runner = GraphRunner::with_defaults(graph);
let result = runner.invoke(AgentState::new()).await?;

Modules§

error
Error types for oxidizedgraph
git
Git operations using libgit2
graph
Graph building and compilation for oxidizedgraph
nodes
Node implementations for oxidizedgraph
prelude
Convenient re-exports for common usage Prelude module for oxidizedgraph
runner
Graph execution runner for oxidizedgraph
state
State trait and definitions for oxidizedgraph