Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
High-performance framework for building interactive workflow systems in Rust. Designed for complex workflows and multi-agent systems
| Date | Stars |
|---|---|
| 2026-07-24 | 352 |
| 2026-07-25 | 354 |
| 2026-07-28 | 356 |
| 2026-07-30 | 358 |
| 2026-08-06 | 358 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<div align="center">
<img src="image.png" alt="graph-flow" width="300">
# graph-flow
### Stateful Graph Workflow Framework for AI Agents in Rust
*A type-safe, LangGraph-inspired framework for building complex, interactive, resumable agent workflows*
[](https://crates.io/crates/graph-flow)
[](https://docs.rs/graph-flow)
---
</div>
**graph-flow** combines the two ideas that make LangGraph pleasant to use — a graph execution engine for stateful workflows, and tight LLM ecosystem integration — and rebuilds them natively in Rust:
- **[`graph-flow`](graph-flow/)** — the core graph execution library: task orchestration, session persistence, conditional routing, human-in-the-loop pauses
- **[Rig](https://github.com/0xPlaygrounds/rig)** — Rust-native LLM integration and agent capabilities (optional `rig` feature)
You get LangGraph-style workflow design with Rust's performance and type safety, a clean database schema for session state, and flexible execution models — step-by-step, fire-and-forget, or a mix of both in the same graph.
## Repository Layout
| Crate | What it shows |
|---|---|
| [`graph-flow/`](graph-flow/) | The framework library (published to crates.io) |
| [`insurance-claims-service/`](insurance-claims-service/) | Production-style HTTP service: LLM-driven claim intake, conditional routing, human-in-the-loop approval |
| [`recommendation-service/`](recommendation-service/) | RAG recommendation system with vector search |
| [`examples/`](examples/) | Small progressive examples: `simple_example`, `complex_example`, `recommendation_flow`, `fanout_basic`, `terminal_client` |
> **Start here**: read [`examples/simple_example.rs`](examples/simple_example.rs) for the core concepts, then the services for real-world patterns.
## Quick Start
```toml
[dependencies]
graph-flow = { version = "0.6", features = ["rig"] } # drop "rig" if you don't need LLM helpers
```
### 1. Define tasks
Tasks are the building blocks of a workflow. Each implements the [`Task`](graph-flow/src/task.rs) trait, reads and writes shared state through `Context`, and returns a `NextAction` that steers the graph:
```rust
use async_trait::async_trait;
use graph_flow::{Context, NextAction, Task, TaskResult};
struct HelloTask;
#[async_trait]
impl Task for HelloTask {
// id() defaults to the type name; override it for a custom identifier
async fn run(&self, context: Context) -> graph_flow::Result<TaskResult> {
let name: String = context.get("name").unwrap_or_default();
let greeting = format!("Hello, {name}");
// Store result for the next task
context.set("greeting", greeting.clone())?;
// Continue to the next task, but hand control back to the caller
Ok(TaskResult::new(Some(greeting), NextAction::Continue))
}
}
```
### 2. Build the graph
```rust
use graph_flow::GraphBuilder;
use std::sync::Arc;
let hello_task = Arc::new(HelloTask);
let excitement_task = Arc::new(ExcitementTask);
let graph = Arc::new(
GraphBuilder::new("greeting_workflow")
.add_task(hello_task.clone())
.add_task(excitement_task.clone())
.add_edge(hello_task.id(), excitement_task.id())
.build()?, // validates edges and start task
);
```
### 3. Execute with sessions
Workflows are **stateful**: they can pause, wait for user input, and resume later — across process restarts if you use persistent storage. `FlowRunner` wraps the load → execute one step → save cycle:
```rust
use graph_flow::{ExecutionStatus, FlowRunner, InMemorySessionStorage, Session, SessionStorage};
use std::sync::Arc;
let storage = Arc::new(InMemorySessionStorage::new());
let runner = FlowRunner::new(graph.clone(), storage.clone());
// Create a session positioned at the first task
let session = Session::new_from_task("session_001".to_string(), hello_task.id());
session.context.set("name", "BatmaExcerpt of 15,129 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:b4db517154c58cbc, topic:agents, topic:langgraph, readme:ai agents