Persistent Memory for AI Coding Agents
Your AI agent starts every session with amnesia. Sugar remembers your decisions, conventions, and patterns - per project, across projects, locally on your machine.
Your memory. Your machine. Your data.
Your AI coding agent is brilliant - and it forgets everything.
Every new Claude Code, Cursor, or Copilot session starts from zero. The context you built last week is gone.
Session Amnesia
Every new session starts from zero. The architecture decisions, conventions, and gotchas you explained last week are gone. You re-explain them every time.
Endless Re-Onboarding
"We use async/await, never callbacks." "JWT is RS256." "Check __init__.py exports first." You tell your agent the same things, in every repo, in every session.
Token Waste
Re-establishing context every session burns tokens and time. You pay for the same explanations dozens of times, and the agent still misses unwritten context.
Cloud Memory Lock-In
The memory tools that ship with cloud agents live on someone else's server. Your hard-won knowledge sits in a vendor's database, locked behind their pricing and uptime.
Your agent doesn't need to be smarter. It needs to remember.
Sugar is the memory layer for your AI agents.
A local SQLite database your coding agent reads and writes through MCP. Context persists across sessions and across repos. Nothing leaves your machine.
| Approach | What it does | Where it falls short |
|---|---|---|
| Agent built-in memory | Scratchpad for the current session | Gone when the session ends |
| Cloud memory tools | Store context on vendor servers | Locked behind pricing and uptime |
| Wikis and READMEs | Document conventions in prose | Agent has to find and read them |
| Sugar | Local-first memory, semantic recall via MCP | It doesn't - context just shows up |
Without Sugar
[re-explaining the same context every time]
With Sugar
[context compounds, never repeats]
What Sugar Does
Local-first persistent memory for AI coding agents - with optional autonomous task execution built on top.
Project Memory
Per-repo memory stored in a local SQLite database. Decisions, conventions, error patterns, and file context persist across every session in that codebase.
Global Memory
Cross-project knowledge at ~/.sugar/memory.db. Team standards, shared architecture decisions, and tooling preferences surface in every repo automatically.
Semantic Search
Sentence-transformer embeddings plus FTS5 full-text search. Your agent recalls relevant context by meaning, not just keywords - with a LIKE fallback when vectors are unavailable.
MCP Native
Five MCP tools and three resources expose memory to Claude Code, Cursor, Goose, OpenCode, and any MCP-compatible client. Context shows up automatically in every session.
Task Orchestration
New in 3.10. Break large features into a 4-stage workflow - research, plan, implement, review - with specialist agent routing and dependency-ordered sub-tasks. The most capable way to run the task queue.
Task Queue
Queue bug fixes, features, tests, refactors, and docs. Sugar's executor runs them with full memory context and opens PRs. Optional - use Sugar purely as memory and never run a task.
GitHub Discovery
Watch repos for labeled issues - security, bug, dependabot, or your own. Matching issues become tasks automatically. Full control over which labels trigger action.
Verified PRs
The executor runs your test suite and quality gates before opening any PR. It iterates until tests pass - no broken fixes land in your repo.
7 Memory Types
Decision, preference, file context, error pattern, research, outcome, and guideline - structured for accurate recall.
Zero-Config Setup
pip install sugarai, run sugar init, point your agent at the MCP server. No accounts, no cloud, no API keys required.
Local-First
Your memory lives in SQLite on your machine. No vendor lock-in, no uptime dependency, no pricing cliff.
Slash Commands
6 slash commands included for direct workflow integration from your agent's chat interface.
Store once. Recall forever.
Four steps. No cloud. Your agent's context just shows up.
Install and initialize
pip install sugarai, then sugar init. Sugar creates a local SQLite database and registers its MCP server. No accounts, no cloud, no API keys.
Store context as you work
Capture decisions, conventions, error patterns, and file context through the CLI or MCP tools. Sugar indexes everything for semantic search.
Your agent recalls it automatically
Claude Code, Cursor, or any MCP client queries Sugar by meaning. Relevant context surfaces in every session - no re-explaining, no re-onboarding.
Context compounds across projects
Project memory stays scoped to its repo. Global memory - team standards, shared patterns - surfaces everywhere. Outcomes feed back automatically.
Anyone whose AI agent keeps forgetting their codebase.
If you re-explain your stack to Claude, Cursor, or Copilot in every session, Sugar is for you.
Solo Developers
You switch between projects and contexts constantly. Sugar remembers where you left off in each one - no re-onboarding yourself, no re-explaining conventions to your agent.
Small Teams
Store team standards and architectural decisions in global memory. Each developer runs Sugar locally and inherits the same conventions - onboarding a teammate's agent to your stack is one command, not a walkthrough.
Privacy-First Orgs
Your codebase knowledge stays on your machines in SQLite. No vendor servers, no cloud dependency, no data leaving your network. Local-first by design.
Give Your Agent a Memory.
Install Sugar in 30 seconds. Store your first memory. Your agent never starts from zero again.