SkillAgentSearch skills...

Aqua

Aqua is a lightweight, agent-agnostic coordinator for CLI AI agents. It enables multiple AI agents (Claude Code, Codex CLI, Gemini CLI, or any CLI tool) running in separate terminal sessions to collaborate on tasks within a shared codebase. Built with Claude ❤️

Install / Use

/learn @vignesh07/Aqua
About this skill

Quality Score

0/100

Supported Platforms

Claude Code
Claude Desktop
Gemini CLI
OpenAI Codex

README

Aqua - Autonomous QUorum of Agents

PyPI version License: MIT Python 3.10+

Aqua is a lightweight, agent-agnostic coordinator for CLI AI agents. It enables multiple AI agents (Claude Code, Codex CLI, Gemini CLI, or any CLI tool) running in separate terminal sessions to collaborate on tasks within a shared codebase. Built with Claude ❤️

Aqua in action

Why Aqua?

When working with AI coding agents, you often want multiple agents working in parallel on different tasks. But without coordination, agents can:

  • Work on the same task simultaneously
  • Edit the same files and create conflicts
  • Lack visibility into what other agents are doing

Aqua solves this by providing:

  • Shared task queue with atomic claiming
  • File locking to prevent conflicts
  • Inter-agent messaging for coordination
  • Live monitoring to see all agent activity

Features

  • Task Queue: Priority-based task management with dependencies
  • Circular Dependency Detection: Prevents deadlocks by rejecting cyclic task dependencies
  • File Locking: Prevent multiple agents from editing the same file
  • Blocking Messages: Ask questions and wait for replies from other agents
  • Live Monitoring: Real-time dashboard and event stream
  • Leader Election: First agent becomes leader; leadership is heartbeat-integrated
  • Crash Recovery: Automatic detection of dead agents (5min heartbeat timeout) and task reassignment
  • Agent Agnostic: Works with Claude Code, Codex CLI, Gemini CLI, or any CLI tool
  • Zero External Dependencies: Uses SQLite - no Redis, Docker, or external services
  • JSON Mode: Full --json support and AQUA_JSON=1 env var for programmatic access
  • Agent Roles: Assign specializations (frontend, backend, reviewer) so agents self-select appropriate tasks
  • Observer/Informer: Continuous learning system that maintains project knowledge across sessions

Observer/Informer System

Aqua includes a knowledge persistence system that learns from agent activity:

# Start the Observer in background (watches all activity)
aqua observe &

# Ask the Informer about project context before starting work
aqua inform "What should I know about the auth module?"
aqua inform "What patterns should I follow for new commands?"
aqua inform "What failed recently?"

The Observer runs in the background and:

  • Watches all events, task completions, and progress messages
  • Tracks git changes
  • Continuously rewrites .aqua/summary.md with current project knowledge
  • Never fills up (constantly compacts its own context)

The Informer answers questions by reading the Observer's accumulated knowledge.

Agent Roles

Roles let you spawn specialized agents that prioritize tasks matching their expertise. This is completely optional - agents without roles work on any available task.

Assigning Roles

# Distribute roles across agents (round-robin)
aqua spawn 3 --roles frontend,backend,testing
# worker-1: frontend, worker-2: backend, worker-3: testing

# Auto-assign predefined roles
aqua spawn 4 --assign-roles
# Cycles through: reviewer, frontend, backend, testing, devops

# Single role for all agents
aqua spawn 2 --role reviewer

How Role Matching Works

  1. Tag your tasks with role-relevant tags:

    aqua add "Fix login button styling" -t frontend -p 7
    aqua add "Add user API endpoint" -t backend -p 6
    aqua add "Review authentication PR" -t review -p 8
    
  2. Agents prioritize matching tasks: A frontend agent will claim tasks tagged frontend before claiming untagged tasks.

  3. Fallback behavior: If no matching tasks exist, agents can still claim any available task (they're informed when doing so).

Predefined Roles

| Role | Focuses on tags | |------|----------------| | reviewer | review, pr, code-review | | frontend | frontend, ui, css, react, component | | backend | backend, api, database, server | | testing | test, testing, qa, e2e | | devops | devops, deploy, ci, infra |

Custom Roles

Any string works as a role - agents will match against tasks with that tag:

aqua spawn 2 --roles security,performance
aqua add "Audit auth module" -t security
aqua add "Optimize database queries" -t performance

Example: Role-Based Team

# Add tasks with appropriate tags
aqua add "Review PR #42" -t review -p 9
aqua add "Fix navbar responsiveness" -t frontend -p 7
aqua add "Add /products endpoint" -t backend -p 7
aqua add "Write integration tests" -t testing -p 6

# Spawn specialized team
aqua spawn 4 --assign-roles -b

# Each agent claims tasks matching their role first

Long-Running Projects (Serialize + Loop)

For projects that exceed a single agent's context window, Aqua provides serialize and loop mode to manage context automatically.

The Problem

AI agents have limited context windows. On multi-day projects with 10-20 tasks, the agent's context fills up with implementation details, causing mistakes and forgotten decisions.

The Solution

  1. Serialize tasks into a linear chain with checkpoints
  2. Loop mode respawns fresh agents at each checkpoint
# 1. Add your tasks
aqua add "Set up project structure" -p 10
aqua add "Create data models" -p 9
aqua add "Build API endpoints" -p 8
aqua add "Write tests" -p 7

# 2. Serialize into linear sequence with checkpoints
aqua serialize

# 3. Run with loop mode (single agent, auto-respawn)
aqua spawn 1 -b --loop

How It Works

aqua serialize creates a linear chain:

Task1 → Checkpoint → Task2 → Checkpoint → Task3 → Checkpoint → ...

When an agent completes a task and claims a checkpoint:

  1. Agent runs aqua done for the checkpoint
  2. Agent exits the session
  3. Loop mode detects the exit and respawns a fresh agent
  4. Fresh agent has full context window (200k tokens)
  5. Agent runs aqua refresh to restore context from database

Important Constraints

  • Single agent only: --loop requires count=1 because serialized tasks form a linear chain. Only one task is claimable at any time.
  • Sequential execution: Tasks run one at a time with checkpoints between them
  • Context in database: Task summaries survive in SQLite, restored via aqua refresh

Serialize Options

aqua serialize                  # Checkpoint after every task
aqua serialize --every 2        # Checkpoint every 2 tasks
aqua serialize --dry-run        # Preview without making changes

Adding Checkpoints to Individual Tasks

aqua add "Complex refactoring task" --checkpoint

When to Use

Use serialize + loop for:

  • Multi-day projects with many sequential tasks
  • Projects where context accumulation causes issues
  • Single-agent workflows that need fresh context

Don't use for:

  • Parallel work (multiple agents on independent tasks)
  • Short projects that fit in one context window
  • Tasks that don't have a natural sequence

For parallel work, use regular aqua spawn N without --loop.

Installation

pip install aqua-coord

Quick Start

1. Initialize Aqua in your project

cd your-project
aqua init
aqua setup --all  # Add instructions to CLAUDE.md, AGENTS.md, GEMINI.md

2. Add tasks with dependencies

aqua add "Set up project structure" -p 9
aqua add "Implement data models" -p 8 --after "Set up project structure"
aqua add "Build API endpoints" -p 7 --depends-on abc123
aqua add "Write tests" -p 6 -t tests

3. Spawn agents automatically

# Open 3 new terminal windows, each with an AI agent
aqua spawn 3

# Or run agents in background (fully autonomous)
# ⚠️  Prompts for confirmation - agents get full permissions!
aqua spawn 3 -b

# Use a specific CLI (auto-detects by default)
aqua spawn 2 --codex

# Mix agents with round-robin assignment
aqua spawn 4 -b --claude --codex  # 2 Claude + 2 Codex

# Assign roles to agents (see Agent Roles section below)
aqua spawn 3 --roles frontend,backend,testing

# Skip confirmation (for programmatic use or leader agents)
aqua spawn 2 -b -y

⚠️ Background Mode Warning: The -b flag grants agents full autonomous control using dangerous flags like --dangerously-skip-permissions (Claude) and --approval-mode full-auto (Codex). Agents can read, write, and execute ANY code without asking. Use -y to skip the confirmation prompt.

4. Monitor progress

aqua status   # Show current state
aqua watch    # Live dashboard (updates every 2s)
aqua logs     # Tail event stream in real-time

Alternative: Let the Agent Do It

After running aqua setup --all, you can simply start your AI agent and ask it to plan the project:

aqua init
aqua setup --all

# Start your AI agent (Claude Code, Codex, Gemini)
claude  # or: codex, gemini

# Then ask:
> "Plan this project and spawn workers to build it"

The agent reads the instructions from CLAUDE.md (or AGENTS.md/GEMINI.md), understands Aqua's capabilities, and handles task breakdown, agent spawning, and coordination autonomously.

Complete Command Reference

Core Commands

| Command | Description | |---------|-------------| | aqua init | Initialize Aqua in current directory | | aqua status | Show dashboard with agents, tasks, and leader info | | aqua refresh | Restore agent identity after context reset |

Task Management

| Command | Description | |---------|-------------| | aqua add <title> | Add a new task | | aqua show [task_id] | Show task details | | aqua claim [task_id] | Claim next pending task (or specific task) | | aqua done [--summary] | Mark current task complete | | `aqua fai

View on GitHub
GitHub Stars24
CategoryDevelopment
Updated13d ago
Forks3

Languages

Python

Security Score

95/100

Audited on Mar 23, 2026

No findings