Most memory tools give you one bucket, which means either your project notes drown your general standards or the reverse. Reserving result slots for guidelines from the global store fixes that directly: a brand-new project inherits how you work, and a mature one still gets reminded of it. The per-type expiry is the other quiet good idea — an error pattern from last quarter should age out, an architecture decision should not.
A memory layer for AI coding agents that lives in SQLite on your disk. Two stores — one inside the project, one global — and a search that reads both, so project context wins while your cross-project standards still surface.
- `search_memory` — searches both stores and labels which scope each result came from
- `store_learning` — saves a memory; passing `scope: "global"` writes to the cross-project store
- `recall` — formatted markdown context for a topic, ready to read
- `get_project_context` — a project summary including the global guidelines that apply
- `list_recent_memories` — browse recent memories filtered by type
- Seven memory types with different lifetimes: `decision`, `preference`, `file_context` and `guideline` never expire, while `error_pattern` lasts 90 days, `research` 60 and `outcome` 30
- A search that reserves slots for global guidelines, so a mature project's local context cannot bury your standards
- Resources `sugar://project/context`, `sugar://preferences` and `sugar://global/guidelines`
- An optional second server, `sugar mcp tasks`, backing a task queue that reads the same memory
`pipx install sugarai`, then `sugar init` in the project. Memory lives in `.sugar/memory.db` for the project and `~/.sugar/memory.db` globally. Semantic search comes from the `[memory]` extra — sentence-transformers `all-MiniLM-L6-v2`, 384-dimension vectors, with sqlite-vec — and without it search falls back to FTS5 keyword matching and then LIKE. The memory server needs no API key and makes no external calls. The task server takes optional `ANTHROPIC_API_KEY`, `GITHUB_TOKEN` and `SUGAR_DEFAULT_REPO`.
One command — pipx install sugarai
