3 unstable releases
Uses new Rust 2024
| new 0.2.1 | Mar 1, 2026 |
|---|---|
| 0.2.0 | Feb 14, 2026 |
| 0.1.0 | Feb 13, 2026 |
#542 in Database implementations
Used in 5 crates
(3 directly)
155KB
4K
SLoC
Lago
Event-sourced persistence layer for long-lived AI agents.
Lago consolidates all agent state changes — tool use, file writes, messages, memory — into a single event-sourced, versioned system with streaming I/O.
Features
- Event sourcing — All state derived from an append-only journal
- Content-addressed blobs — SHA-256 hashing with zstd compression
- Filesystem branching — Git-like branching and diffing for agent workspaces
- gRPC streaming ingest — Bidirectional streaming via tonic
- HTTP REST + SSE — Axum-based API with Server-Sent Events
- Multi-format SSE — OpenAI, Anthropic, Vercel AI SDK compatible
- Policy engine — Rule-based tool governance with RBAC
- Embedded storage — redb (ACID, pure Rust, zero external dependencies)
Architecture
lago-cli / lagod Binaries (CLI + daemon)
├── lago-api HTTP REST + SSE streaming (axum)
├── lago-ingest gRPC bidirectional streaming (tonic)
├── lago-policy Policy engine + RBAC
├── lago-fs Filesystem manifest + branching
├── lago-journal Event journal (redb-backed)
├── lago-store Content-addressed blob storage
└── lago-core Foundation types, traits, errors
Installation
From GitHub Releases
curl -fsSL https://raw.githubusercontent.com/broomva/lago/main/install.sh | bash
From Source
cargo install lago
From crates.io (library crates)
[dependencies]
lago-core = "0.1"
lago-journal = "0.1"
lago-store = "0.1"
Quick Start
# Start the daemon
lagod --config lago.toml
# Create a session
lago session create --name my-agent
# List sessions
lago session list
# Stream events via SSE
curl -N http://localhost:3000/v1/sessions/<id>/events
Development
# Build
cargo build --workspace
# Test (295 tests)
cargo test --workspace
# Lint
cargo clippy --workspace
# Format
cargo fmt --all
# Check dependencies
cargo deny check
Crates
| Crate | Description |
|---|---|
lago-core |
Foundation types, traits, and error definitions |
lago-journal |
Event journal backed by redb |
lago-store |
Content-addressed blob storage (SHA-256 + zstd) |
lago-fs |
Filesystem manifest with branching and diffing |
lago-ingest |
gRPC streaming ingest service |
lago-api |
HTTP REST API + SSE streaming |
lago-policy |
Policy engine with rule-based tool governance |
lago-aios-eventstore-adapter |
aiOS canonical event-store adapter |
lago |
CLI tool |
lagod |
Daemon binary |
License
Dependencies
~14–21MB
~294K SLoC