serdes-ai-graph

Crates.ioserdes-ai-graph
lib.rsserdes-ai-graph
version0.1.2
created_at2026-01-15 23:08:40.768531+00
updated_at2026-01-23 16:42:39.847341+00
descriptionGraph-based execution and multi-agent orchestration for serdes-ai
homepage
repositoryhttps://github.com/janfeddersen-wq/serdesAI
max_upload_size
id2047324
size92,461
(janfeddersen-wq)

documentation

README

serdes-ai-graph

Crates.io Documentation License: MIT

Graph-based execution and multi-agent orchestration for serdes-ai

This crate provides graph-based workflow execution for SerdesAI:

  • Graph builder for defining workflows
  • BaseNode trait for custom nodes
  • State management across nodes
  • Conditional branching and loops
  • Multi-agent orchestration

Installation

[dependencies]
serdes-ai-graph = "0.1"

Usage

use serdes_ai_graph::{Graph, BaseNode, NodeResult, GraphRunContext, GraphResult};
use async_trait::async_trait;

#[derive(Debug, Clone, Default)]
struct MyState {
    data: String,
}

struct ProcessNode;

#[async_trait]
impl BaseNode<MyState, (), String> for ProcessNode {
    fn name(&self) -> &str { "process" }
    
    async fn run(
        &self,
        ctx: &mut GraphRunContext<MyState, ()>,
    ) -> GraphResult<NodeResult<MyState, (), String>> {
        ctx.state.data = "processed".to_string();
        Ok(NodeResult::end(ctx.state.data.clone()))
    }
}

let graph = Graph::new()
    .node("process", ProcessNode)
    .entry("process")
    .build()?;

let result = graph.run(MyState::default(), ()).await?;

Part of SerdesAI

This crate is part of the SerdesAI workspace.

For most use cases, you should use the main serdes-ai crate which re-exports these types.

License

MIT License - see LICENSE for details.

Commit count: 42

cargo fmt