| Crates.io | serdes-ai-graph |
| lib.rs | serdes-ai-graph |
| version | 0.1.2 |
| created_at | 2026-01-15 23:08:40.768531+00 |
| updated_at | 2026-01-23 16:42:39.847341+00 |
| description | Graph-based execution and multi-agent orchestration for serdes-ai |
| homepage | |
| repository | https://github.com/janfeddersen-wq/serdesAI |
| max_upload_size | |
| id | 2047324 |
| size | 92,461 |
Graph-based execution and multi-agent orchestration for serdes-ai
This crate provides graph-based workflow execution for SerdesAI:
Graph builder for defining workflowsBaseNode trait for custom nodes[dependencies]
serdes-ai-graph = "0.1"
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?;
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.
MIT License - see LICENSE for details.