Agent-facing interface to the Lago knowledge substrate. Provides Karpathy-style wiki operations (ingest, search, read, write, lint, wake-up, query) on top of Lago's event-sourced, content-addressed filesystem.
Universal agent brain stem built on Lago's event-sourced persistence layer.
| Command | Description | Lago Primitive | Event Emitted |
|---|---|---|---|
lago wiki init | Initialize a wiki session | Create session + BlobStore + KnowledgeIndex | SessionCreated |
lago wiki ingest <path> | Ingest source document | lago-knowledge ingest -> BlobStore.put -> index rebuild | ObservationAppended |
lago wiki search <query> | Hybrid search (BM25 + graph) | KnowledgeIndex.search_hybrid() | -- |
lago wiki read <slug> | Read entity page with provenance | KnowledgeIndex.get_note() | -- |
lago wiki write <slug> |
| Create/update wiki page |
| BlobStore.put -> manifest update -> index rebuild |
| MemoryProposed -> MemoryCommitted |
lago wiki lint | Check health (contradictions, orphans, gaps) | KnowledgeIndex.lint() | StateEstimated |
lago wiki wake-up | Assemble L0+L1 context (~900 tokens) | MemCube::assemble() + generate_index() | -- |
lago wiki log | Show recent knowledge operations | Journal.read() filtered to knowledge events | -- |
lago wiki query <q> | Search, synthesize, optionally file back | search + optional MemoryCommitted | MemoryCommitted (if filed) |
lago wiki diff | Show what changed since last session | diff_manifests() | -- |
| Layer | Directory | Lago Backing | Mutability |
|---|---|---|---|
| Raw Sources | raw/ | BlobStore (SHA-256 + zstd, immutable) | Never modified |
| Wiki | wiki/ | KnowledgeIndex + MemCubes | LLM-maintained via write |
| Schema | CLAUDE.md + .control/ | Policy gates + setpoints | Co-evolved by user + LLM |
When the Lago daemon isn't running, all operations fall back to direct filesystem access on markdown files. The skill detects Lago availability by checking LAGO_URL or localhost:3001.
All write operations emit canonical aios-protocol EventKind events:
ObservationAppended for new knowledge ingestedMemoryProposed -> MemoryCommitted for wiki page writesPolicyEvaluated for Nous gate scoring decisionsStateEstimated for lint health assessmentsThe knowledge substrate feeds the control loop:
Environment variables:
LAGO_URL -- Lago daemon URL (default: http://localhost:3001)LAGO_DATA_DIR -- Data directory for standalone modeLAGO_WIKI_DIR -- Wiki directory for filesystem fallbackRust crates used:
lago-knowledge (BM25, graph, lint, index, ingest)lago-core (MemCubes, events, cognitive types)lago-store (BlobStore, manifest diff)lago-journal (event persistence)