# graph-flow

A stateful graph workflow framework for building complex, resumable AI agent systems in Rust, combining a LangGraph-style execution engine with optional native LLM integration.

graph-flow is a type-safe, LangGraph-inspired framework for building complex, interactive, resumable agent workflows in Rust. Its core library provides task orchestration, session persistence, conditional routing, and human-in-the-loop pauses, while an optional feature bridges chat history to a Rust-native LLM integration crate, with the agent runtime itself living in a companion crate.

Tasks are the building blocks of a workflow: each implements a task trait, reads and writes shared state through a context object, and returns a next-action value that steers the graph, supporting step-by-step, fire-and-forget, or mixed execution within the same graph. PostgreSQL-backed session storage is enabled by default and can be disabled to exclude that dependency.

The repository includes example services, such as an insurance-claims intake service with human-in-the-loop approval and a RAG-based recommendation service with vector search, alongside smaller progressive examples. It is published to crates.io under the MIT license.

Website: https://github.com/a-agmon/rs-graph-llm
