Skip to content

Sugar

Persistent memory for AI coding agents. Local-first, cross-session context, global knowledge, and optional autonomous task execution.

Install

$claude mcp add sugar -- sugar mcp memory

Install command taken from the project's README or registry entry. Always review code before running it.

Sugar

Persistent memory for AI coding agents.

Your AI agent starts every session with amnesia. The architecture decisions, conventions, and gotchas you explained last week are gone. Sugar is the local-first memory layer that remembers them for you - per project, across projects, on your machine.

Your memory. Your machine. Your data.

What Sugar Does

Sugar is a memory layer your AI coding agent can read and write directly:

  • Project memory - Decisions, preferences, error patterns, and research stored per-project
  • Global memory - Standards and guidelines shared across every project you work on
  • Semantic search - Retrieve relevant context by meaning, not just keywords
  • MCP integration - Your AI agent reads and writes memory directly during sessions
  • Local-first - SQLite on your disk, no API keys, fully offline-capable
  • Task queue - Optional autonomous execution, powered by the same memory layer

Quick Start

# Install once, use in any project
pipx install sugarai

# Initialize in your project
cd ~/dev/my-app
sugar init

# Store what you know
sugar remember "We use async/await everywhere, never callbacks" --type preference
sugar remember "JWT tokens use RS256, expire in 15 min - see auth/tokens.py" --type decision
sugar remember "When tests fail with import errors, check __init__.py exports first" --type error_pattern

# Retrieve it later
sugar recall "authentication"
sugar recall "how do we handle async"

Your AI agent can also read and write memory directly - no copy-pasting required.

MCP Integration

Connect Sugar's memory to your AI agent so it can access project context automatically.

Claude Code - Memory server (primary):

claude mcp add sugar -- sugar mcp memory

Claude Code - Task server (optional):

claude mcp add sugar-tasks -- sugar mcp tasks

Once connected, Claude can call store_learning to save context mid-session and search_memories to pull relevant knowledge before starting work. The memory server works from any directory - global memory is always available even outside a Sugar project.

Other MCP clients (Goose, Claude Desktop):

# Goose
goose configure
# Select "Add Extension" -> "Command-line Extension"
# Name: sugar
# Command: sugar mcp memory

# OpenCode - one command setup
sugar opencode setup

Skills

Sugar ships Agent Skills - folders of instructions that teach coding agents to apply Sugar's methodology. Skills live under skills/ and follow the Agent Skills specification (a SKILL.md with name/description frontmatter plus instructions).

Skill What it does
sugar-memory Store and surface project context via Sugar's memory MCP server: recall context at task start, search before deciding, store learnings after completing work
sugar-task-planner Turn a high-level task into a detailed execution plan: subtasks, dependencies, time estimates, risks, and measurable success criteria
sugar-quality-guardian Review code across quality, testing, security, and performance, ending with a structured verdict
sugar-orchestrator Coordinate multi-step workflows: analyze complexity, decompose tasks, assign roles, monitor execution

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

Give your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.