https://github.com/sayiir/sayiir
Sayiir — Lightweight embeddable durable workflow engine in Rust with Python bindings. Checkpoint-based recovery, no deterministic replay. Alternative to Temporal, Restate, Airflow..
https://github.com/sayiir/sayiir
ai-agents async-rust checkpointing distributed distributed-systems durable-execution durable-workflows embeddable orchestration pyo3 python rust temporal-alternative workflow workflow-automation workflow-engine
Last synced: about 1 month ago
JSON representation
Sayiir — Lightweight embeddable durable workflow engine in Rust with Python bindings. Checkpoint-based recovery, no deterministic replay. Alternative to Temporal, Restate, Airflow..
- Host: GitHub
- URL: https://github.com/sayiir/sayiir
- Owner: sayiir
- License: mit
- Created: 2026-01-06T17:46:15.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-02-22T21:50:40.000Z (about 1 month ago)
- Last Synced: 2026-02-23T00:56:09.870Z (about 1 month ago)
- Topics: ai-agents, async-rust, checkpointing, distributed, distributed-systems, durable-execution, durable-workflows, embeddable, orchestration, pyo3, python, rust, temporal-alternative, workflow, workflow-automation, workflow-engine
- Language: Rust
- Homepage: http://docs.sayiir.dev/
- Size: 4.12 MB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Sayiir
**Durable, fast workflow engine that feels like writing normal code.** Graph-based, continuation-driven execution with a Rust core and Python/Node.js bindings — no DSL, no replay, workflows from your plain code.
[](LICENSE)
[](https://discord.gg/A2jWBFZsNK)
[](https://crates.io/crates/sayiir-core)
[](https://docs.rs/sayiir-core)
[](https://crates.io/crates/sayiir-core)
[](https://blog.rust-lang.org/2025/02/20/Rust-1.85.0.html)
[](https://pypi.org/project/sayiir/)
[](https://pepy.tech/project/sayiir)
[](https://www.python.org)
[](https://www.npmjs.com/package/sayiir)
[](https://www.npmjs.com/package/sayiir)
[](https://nodejs.org)
> Sayiir is under active development. Core functionality works. We welcome contributors, maintainers, and sponsors.
- 🦀 **Rust core** — High-performance, memory-safe workflow engine
- 🛡 **Durable** — Automatic checkpointing & crash recovery with pluggable persistence
- 🧰 **Multi-language** — Type-safe Python, TypeScript, and Rust bindings
- ✨ **Built for developers** — Low learning curve; native language idioms, async code you already know, no DSL. No separate server or infra to deploy; get up and running in minutes. [Enterprise server](https://docs.sayiir.dev/roadmap/) in active development for when you need one
- ⏸ **Workflow control** — Cancel, pause, and resume running workflow instances
- 👁 **Observability** — Built-in OpenTelemetry tracing and logging for full workflow visibility
---
## Why Sayiir?
⚡ **No replay overhead.** Resume from the last checkpoint, not from the beginning of your workflow history. JSON by default, swap to zero-copy rkyv or any binary format via the pluggable codec abstraction.
🔒 **No determinism constraints.** Continuation-based execution means your code can call any API, use any library — no purity rules, no sandboxing.
✍ **Minimal learning curve.** Familiar language patterns with sensible defaults that get out of your way. No DSL, no YAML — just code.
#### 🐍 Python
```python
from sayiir import task, Flow, run_workflow
@task
def fetch_user(user_id: int) -> dict:
return {"id": user_id, "name": "Alice"}
@task
def send_email(user: dict) -> str:
return f"Sent welcome to {user['name']}"
workflow = Flow("welcome").then(fetch_user).then(send_email).build()
# Quick run — no persistence
result = run_workflow(workflow, 42)
# Or plug in a durable backend for crash recovery
from sayiir import run_durable_workflow, PostgresBackend
instance_id = f"welcome-{user_id}"
status = run_durable_workflow(workflow, instance_id, 42, backend=PostgresBackend("postgresql://localhost/sayiir"))
```
#### 🦀 Rust
```rust
use sayiir_runtime::prelude::*;
#[task(timeout = "30s", retries = 3)]
async fn fetch_user(id: UserId) -> Result {
db.get_user(id).await
}
#[task]
async fn send_email(user: User) -> Result<(), BoxError> {
email_service.send_welcome(&user).await
}
// Compose — workflow! auto-registers all tasks
let workflow = workflow! {
name: "welcome",
steps: [fetch_user, send_email]
}
.unwrap();
// Quick run — no persistence
workflow.run_once(user_id).await?;
// Or plug in a durable backend for crash recovery
let runner = CheckpointingRunner::new(PostgresBackend::connect("postgres://...").await?);
let instance_id = format!("welcome-{user_id}");
runner.run(&workflow, &instance_id, user_id).await?;
```
#### 
```typescript
import { task, flow, runWorkflow } from "sayiir";
const fetchUser = task("fetch-user", (id: number) => {
return { id, name: "Alice" };
});
const sendEmail = task("send-email", (user: { id: number; name: string }) => {
return `Sent welcome to ${user.name}`;
});
const workflow = flow("welcome")
.then(fetchUser)
.then(sendEmail)
.build();
// Quick run — no persistence
const result = await runWorkflow(workflow, 42);
// Or plug in a durable backend for crash recovery
import { runDurableWorkflow, PostgresBackend } from "sayiir";
const instanceId = `welcome-${42}`;
const status = runDurableWorkflow(workflow, instanceId, 42, PostgresBackend.connect("postgresql://localhost/sayiir"));
```
---
## When to Use Sayiir
Sayiir is a full-featured, embeddable workflow engine — branching, loops, fork/join, signals, cancel, pause, resume, retries, timeouts — that lives inside your application as a library, not beside it as a platform.
**Sayiir shines when you:**
- Need durable workflows (order sagas, onboarding flows, ETL, data pipelines) without deploying separate infrastructure
- Want `cargo add` / `pip install` / `npm install` and a working workflow engine in minutes, not days
- Already have a Postgres (or just want in-memory for dev) and don't want to manage a separate cluster
- Value a low learning curve — write normal async code, add `@task`, ship to production
> Sayiir isn't trying to replace major workflow platforms. But for many use cases, those platforms add significant infrastructure overhead and complexity that feels like overkill. Sayiir gives you real durability and covers most workflow composition and execution scenarios with less ceremony.
---
## Documentation
**[docs.sayiir.dev](https://docs.sayiir.dev)** — Full documentation with guides, tutorials, and API reference.
**Getting Started**
[Python](https://docs.sayiir.dev/getting-started/python/) ·
[Node.js](https://docs.sayiir.dev/getting-started/nodejs/) ·
[Rust](https://docs.sayiir.dev/getting-started/rust/)
**Learn**
[How It Works](https://docs.sayiir.dev/concepts/how-it-works/) ·
[Architecture](https://docs.sayiir.dev/concepts/architecture/) ·
[Guides](https://docs.sayiir.dev/guides/durable-workflows/) ·
[Tutorials](https://docs.sayiir.dev/tutorials/order-processing-python/) ·
[Examples](https://github.com/sayiir/sayiir/tree/main/examples)
**Reference**
[Python API](https://docs.sayiir.dev/reference/python-api/) ·
[Node.js API](https://docs.sayiir.dev/reference/nodejs-api/) ·
[Rust API](https://docs.sayiir.dev/reference/rust-api/) ·
[Observability & OpenTelemetry](https://docs.sayiir.dev/guides/observability/) ·
[Roadmap](https://docs.sayiir.dev/roadmap/) ·
[Contributing](CONTRIBUTING.md)
---
## Status
| Component | Status |
|:--|:--|
| **Rust** sayiir-core · sayiir-macros · sayiir-runtime · sayiir-persistence |  |
| **Python** bindings |  |
| **Node.js** bindings |  |
| **PostgreSQL** backend |  requires PG 13+ |
| **Cloudflare Workers** |  |
| **Enterprise server** |  |
---
## Community
We're looking for **contributors**, **maintainers**, **sponsors**, and **early adopters**.
[](https://discord.gg/A2jWBFZsNK)
[GitHub Issues](https://github.com/sayiir/sayiir/issues) — Bugs and feature requests · PRs welcome — check `good first issue` labels · [CONTRIBUTING.md](CONTRIBUTING.md)
## License
MIT
---
> **Stop fighting your workflow engine. Start shipping.**