lago
CLAUDE.md2 starsChanged 7 months agoMITView on GitHub
Event-sourced storage backbone for long-lived AI agents. All state changes (tool use, file writes, messages, memory) flow through an append-only journal. Lago serves as the persistence substrate for user memory vaults via /v1/memory/* routes: Agents working on Lago must continuously improve documentation and track progress. Knowledge discovered during development becomes durable guidance.
In this repository12 other files it gives its agents.
- axumSkill
- cargo-fuzzSkill
- cargo-macheteSkill
- event-sourcing-architectSkill
- protobufSkill
- rust-async-patternsSkill
- rust-best-practicesSkill
- tokio-concurrencySkill
- tokio-patternsSkill
- checkSkill
- release-checkSkill
- life-lagoSkill
The file
We split this CLAUDE.md into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 64
Formulate: Create a concise, actionable update.
- Distinctive: line 73
Verify: Ensure the update doesn't contradict existing rules.
- Distinctive: line 78
Context: When this applies.
- Distinctive: line 89
Run the validation and update status:
≈ “Common” is an estimate: at least 1 in 5 of the 26,980 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Lago - Event-Sourced Agent Persistence Layer
Event-sourced storage backbone for long-lived AI agents. All state changes (tool use, file writes, messages, memory) flow through an append-only journal.
Build & Verify
cargo fmt && cargo clippy --workspace && cargo test --workspaceStack
Rust 2024 | redb v2 | tonic+prost (gRPC) | axum (HTTP/SSE) | ULID | SHA-256+zstd
Crates
lago-core- Types, traits, errors (zero external deps)lago-journal- Event journal (redb). Usespawn_blockingfor all redb ops.lago-store- Content-addressed blob storage (SHA-256 + zstd)lago-fs- Filesystem manifest, branching, diffslago-ingest- gRPC streaming ingest (protobuf on wire, JSON in storage)lago-api- REST + SSE (OpenAI/Anthropic/Vercel/Lago format adapters) + auth-protected/v1/memory/*routeslago-policy- RBAC + rule-based tool governance (TOML config)lago-knowledge- Knowledge index engine (frontmatter parsing, wikilink extraction, scored search, BFS graph traversal)lago-auth- JWT auth middleware (shared-secret validation, user→session mapping)lago-cli/lagod- CLI and daemon binaries. CLI includeslago memorysubcommands.
Context Engine (Memory API)
Lago serves as the persistence substrate for user memory vaults via /v1/memory/* routes:
- Auth: JWT bearer tokens signed with
AUTH_SECRET(shared with broomva.tech). Configure viaLAGO_JWT_SECRETenv var or[auth] jwt_secretinlago.toml. - Per-user sessions: Each authenticated user gets a Lago session named
vault:{user_id}. - Knowledge index:
lago-knowledgeparses YAML frontmatter, extracts[[wikilinks]], builds scored search with name/body/tag boosting, and provides BFS graph traversal. - CLI:
lago memory {status,ls,search,read,store,ingest,delete}— token resolved fromBROOMVA_API_TOKENenv or~/.broomva/config.json.
Critical Patterns
- Journal trait uses
BoxFuturefor dyn-compatibility (Arc<dyn Journal>) - Event compound key: session(26B) + branch(26B) + seq(8B BE) = 60 bytes
use redb::ReadableTablerequired for.get(),.iter(),.range()
Rules
See .claude/rules/ for detailed conventions: @.claude/rules/
Self-Learning & Status Evolution
Agents working on Lago must continuously improve documentation and track progress. Knowledge discovered during development becomes durable guidance.
When to Update Documentation
| Trigger | What to update | Where |
| New tests added | Test counts per crate | ../docs/STATUS.md (Lago section) |
| Gap closed (feature implemented) | Check off gap, move to "complete" | ../docs/STATUS.md Known Gaps |
| New gap discovered | Add to appropriate priority tier | ../docs/STATUS.md Known Gaps |
| Architecture changed | Update diagrams and data flow | ../docs/ARCHITECTURE.md |
| Roadmap milestone completed | Mark complete, note date | ../docs/ROADMAP.md |
| New test strategy or pattern | Add to testing plan | ../docs/TESTING.md |
| Tricky error fixed | Add troubleshooting entry | This file (below) |
| New pattern established | Document pattern | This file or .claude/rules/ |
| Performance finding | Document bottleneck + solution | This file |
Update Protocol
- Identify: Pinpoint the specific gap in knowledge or the status change.
- Formulate: Create a concise, actionable update.
- Bad: "Fixed a bug."
- Good: "lago-journal: When using
range()on redb, always importReadableTable— compile error otherwise."
- Locate: Choose the right file:
- Project status, test counts, gaps:
../docs/STATUS.md - Roadmap progress:
../docs/ROADMAP.md - Critical patterns for Lago: This file (CLAUDE.md)
- Code conventions:
.claude/rules/ - Architecture decisions:
../docs/ARCHITECTURE.md
- Project status, test counts, gaps:
- Verify: Ensure the update doesn't contradict existing rules.
- Keep concise: This file stays high-level. Link to detailed docs for depth.
Rule Format for Technical Rules
- Context: When this applies.
- Action: What to do.
- Reason: Why it matters.
Example:
Context: When querying redb tables in lago-journal. Action: Always import
use redb::ReadableTablein scope. Reason:.get(),.iter(),.range()are trait methods and won't compile without the import.
After Completing Any Feature or Fix
Run the validation and update status:
cargo fmt && cargo clippy --workspace && cargo test --workspaceThen update ../docs/STATUS.md with:
- New test count for affected crate(s)
- Any gaps that were closed
- Any new gaps discovered during implementation
Troubleshooting
(Add entries here when fixing confusing errors. Format: Error → Cause → Fix)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

