Open Source β€’ AGPL-3.0

The Autonomous Layer
For AI Coding Agents

Sugar manages your task queue, runs 24/7, and ships working code while you focus on what matters. Works with Claude Code, OpenCode, Aider, and more.

terminal
# Install Sugar
$ pipx install sugarai
# Add tasks to the queue
$ sugar add "Fix auth timeout" --type bug_fix --urgent
$ sugar add "Add user profiles" --type feature
# Start autonomous execution
$ sugar run
🍰 Sugar running... picking up highest priority task
β†’ Executing: Fix auth timeout
β†’ Tests passing, committing...
β†’ Complete. Moving to next task...

The Problem

AI coding assistants are powerful, but they need constant supervision.

😡

Context Amnesia

Re-explaining project requirements every session. AI forgets everything between conversations.

βœ‚οΈ

Manual Breakdown

Splitting tasks into tiny steps yourself. You become the project manager for AI.

πŸ‘€

Constant Monitoring

Watching every action to ensure quality. You can't walk away and trust it.

⏸️

Reactive, Not Proactive

AI waits for instructions. It doesn't discover work or identify what needs to be done.

You spend more time managing AI than benefiting from it.

The Solution

Sugar = AI Agent + Persistence + Autonomy

Instead of one-off interactions, Sugar works like a development team.

Without Sugar
You: "Fix the auth bug"
AI: "Done. What's next?"
You: "Now add rate limiting"
AI: "Done. What's next?"
[repeat forever...]
With Sugar
You: Add tasks with rich context
Sugar: Picks up work autonomously
Sugar: Tests, commits, moves to next
You: Review completed work
[continuous execution]

Core Principles

Built for developers who want AI that actually works autonomously.

🎯

Delegation, Not Babysitting

You define what and why. Sugar figures out how and executes. Rich context gives AI everything it needs.

πŸ”„

Continuous Execution

Sugar runs 24/7 through a priority queue. It picks up the next task and keeps going until the queue is empty.

πŸ€–

Specialized Agents

Orchestrator coordinates. Planner breaks down features. Guardian enforces quality. Like a real team.

πŸ”Œ

Agent-Agnostic

Works with Claude Code, OpenCode, Aider, or any CLI-based AI agent. Use /sugar-task to delegate work mid-conversation.

πŸ”

Smart Discovery

Sugar finds work: error logs, code quality issues, missing tests, GitHub issues. It doesn't just wait.

πŸ“Š

Rich Task Context

Business context, technical requirements, success criteria. More context = better autonomous execution.

Updated in v3.7 Agent Integrations

πŸ”·

OpenCode Integration

UPDATED

One-command setup with OpenCode, the open-source AI coding agent with 80k+ stars. Run sugar opencode setup and you're done.

  • β€’ MCP servers for tasks & memory
  • β€’ 11 slash commands including /sugar-remember
  • β€’ Persistent memory across sessions
  • β€’ Automatic config detection
Learn more β†’
🟣

Claude Code Plugin

Native integration with Claude Code via MCP servers and slash commands. Delegate tasks mid-conversation with /sugar-add.

  • β€’ MCP server for memory & tasks
  • β€’ Slash command integration
  • β€’ SessionStart hooks
  • β€’ Context auto-injection
Learn more β†’

New in v3.5 Memory System

🧠

Persistent Memory

Remember decisions, preferences, and error patterns across sessions. No more context loss.

πŸ”

Semantic Search

Find relevant context with AI-powered search. sugar recall "auth" finds authentication memories.

πŸ”Œ

MCP Servers

Expose memory and tasks to any MCP-compatible agent. Works with Claude Code, OpenCode, and more.

πŸ“

Six Memory Types

Decisions, preferences, file context, error patterns, research, outcomes. Organized and searchable.

v3.4 Security & Control

πŸ”’

Tool Restrictions

Tier-based security controls which tools are available per task type.

⚑

Bash Permissions

Wildcard patterns control command execution. Dangerous commands always blocked.

πŸͺ

Task Hooks

Pre/post execution hooks with variable substitution for automation.

πŸ’­

Thinking Capture

View Claude's reasoning via sugar thinking for debugging.

How It Works

The Sugar Loop: continuous autonomous development.

πŸ‘€
You
β†’
πŸ“‹
Task Queue
β†’
πŸ€–
AI Agent
β†’
βœ…
Done

↻ Repeat continuously until queue is empty

1

You Assign

Add tasks with priorities and rich context. Define what needs to be built and why.

2

Sugar Picks Up

Grabs highest priority work from the queue. No prompting needed.

3

AI Agent Executes

Runs in background. Uses specialized agents as needed. Tests and validates.

4

Completes & Repeats

Commits working code, moves to next task. Continuous until queue is empty.

New in v3.1

Ralph Wiggum: Self-Correcting AI

Complex tasks need iteration. Ralph keeps going until tests actually pass.

βœ—

Without Ralph

1. Task: "Implement rate limiting"
2. Claude attempts once...
3. Tests: 2 pass, 3 fail
4. Task marked "done" anyway

80% right isn't shipped code.

βœ“

With Ralph

1. Iteration 1: Creates class, 2/5 tests pass
2. Iteration 2: Fixes bugs, 4/5 tests pass
3. Iteration 3: Handles edge case, 5/5 pass
4. <promise>DONE</promise> - Actually complete

Iterates until it actually works.

The Iteration Loop

πŸ“
Same Prompt
β†’
πŸ”§
Execute
β†’
πŸ§ͺ
Test
β†’
πŸ‘οΈ
See Results

↻ Repeats until <promise>DONE</promise> or max iterations

When to Use Ralph

πŸ›

Complex Bugs

Iterates through debugging until the fix actually works

πŸ”„

Refactoring

Self-corrects when changes break existing tests

βœ…

TDD Features

Keeps implementing until all tests go green

Terminal
# Enable iterative execution
sugar add "Implement rate limiting" --ralph --max-iterations 10

# Sugar iterates until tests pass
# Iteration 1: implement β†’ test β†’ 2/5 pass
# Iteration 2: fix β†’ test β†’ 4/5 pass
# Iteration 3: fix edge case β†’ test β†’ 5/5 pass
# Output: <promise>DONE</promise>
βœ“ Task completed after 3 iterations
New in v3.3

Intelligent Triage

Not sure if your task needs Ralph? Let Sugar decide.

Terminal
# Let Sugar analyze complexity and decide
sugar add "Refactor auth to use repository pattern" --triage

# Sugar analyzes:
# - Task complexity (keywords, scope, risk)
# - Codebase capabilities (pytest, eslint, etc.)
# - Generates completion criteria automatically

πŸ” Triage: Ralph recommended (78% confidence)
   Completion: "All tests pass, no lint errors"
βœ“ Task added with Ralph mode enabled

Triage auto-enables Ralph when confidence is 60%+. Simple tasks run single-pass.

Who It's For

Sugar scales with your needs.

πŸ‘¨β€πŸ’»

Solo Developers

Run Sugar while you sleep. Wake up to completed features and fixed bugs. Multiply your output without burning out.

πŸ‘₯

Small Teams

Sugar becomes your always-on teammate. Handles the backlog while humans focus on architecture and product.

🏒

Enterprises

24/7 autonomous development with audit trails, multi-project isolation, and team collaboration.

Ready to Ship Faster?

Install Sugar in 30 seconds. Start delegating work to AI that actually executes.

pip install sugarai