Open notes from the lab
We publish the ideas, ship the implementations, and keep learning from the feedback.
Lucid — a four-tier cognitive framework for AI agents
Most memory systems store the past. Lucid adds three more tiers: Awake (live agent state), Dream Cycles (nightly consolidation, enrichment, linking, decay), and REM (a portable markdown dialect that mirrors binary memory bundles). Together they close a cognitive loop — Awake drains into Dream Cycles; Dream Cycles produce REM + Engram entries; Engram recollection informs the next Awake cycle. Six cognitive primitives map across the tiers: Perception, Cognition, Imagination, Recollection, Hallucination, and Consciousness as the emergent goal.
Engram — portable, graph-compressed memory for agents
One portable file per agent. 97% smaller than traditional vector databases via LEANN-style graph pruning. Three-tier search auto-selects based on query complexity: LEANN (0.025ms, keywords), Tantivy hybrid (0.1ms, mixed), PageIndex reasoning (2–5s, deep multi-hop). MIT licensed. The file format is stable at v0.1; v1.0 adds backwards-compatibility guarantees.
Craft cache — making coding a commodity
Every coding task is either craft (shared, infrastructure, identical across users — wire an API route, fix a TypeScript error) or pattern (user-facing, must stay unique). Craft cache stores the solution; pattern cache stores the pattern + variation axes + prior instances, and the next generation is instructed to differ from the instances. Naive caching kills diversity; this structure increases it over time.
Council — free-first LLM routing
A single router in front of every LLM call. Classifies each task by shape and cost tolerance, then routes: commodity tasks go to free local models on our owned VMs (Gemma 4 26B, Qwen 3, Llama 3.1); medium tasks go to cheap cloud (Groq, DeepSeek, Together); only novel-architecture or ambiguous-spec tasks escalate to Opus / Sonnet / GPT-5. Target: 60% free local, 30% cheap cloud, 10% premium. Drops session cost by 10× compared to Premium-default tools.
