A CLI orchestration system for managing swarms of specialized Claude agents with task queues, concurrent execution, and iterative refinement.
Task Queue Management
- Priority-based queue with task dependencies
- SQLite persistence with WAL mode
- Automatic retry with exponential backoff
- Task cancellation support
Concurrent Agent Swarms
- Multiple Claude agents running simultaneously
- Semaphore-based concurrency control
- Dynamic agent lifecycle management
- Health monitoring
Iterative Refinement Loops
- Multiple convergence strategies
- Automatic checkpointing and crash recovery
- Configurable iteration limits and timeouts
MCP Integration
- MCP server lifecycle management
- Agent-to-server binding
- Health monitoring with auto-restart
Observability
- Structured logging with audit trails
- Rich CLI output with tables and progress bars
- Resource and failure statistics
Task Tree Visualization
- Hierarchical task tree rendering in CLI
- Color-coded status indicators
- Unicode/ASCII box-drawing support
- Parent-child task relationships
- Priority-based sorting
- Rust: 1.83 or higher (install via rustup)
- SQLite: For database operations (usually pre-installed)
- Git: For version control
- Anthropic API Key: For Claude access (optional for core development)
# Clone the repository
git clone https://github.com/yourorg/abathur.git
cd abathur
# Build the project
cargo build --release
# Install locally
cargo install --path .cargo install abathur# Clone repository
git clone https://github.com/yourorg/abathur.git
cd abathur
# Build with development dependencies
cargo build
# Run tests
cargo test# Initialize database and configuration
abathur init
# Set your Anthropic API key via environment variable
export ANTHROPIC_API_KEY=YOUR_API_KEYTemplates are configured in .abathur/config.yaml. The default template is automatically configured:
# .abathur/config.yaml
template_repos:
- url: https://github.com/odgrim/abathur-claude-template.git
version: mainRun abathur init to install templates.
# Submit a task (via MCP task_enqueue)
# With optional summary for quick identification
mcp_client.call_tool("task_enqueue", {
"description": "Implement user authentication with JWT tokens and OAuth2 support",
"source": "human",
"agent_type": "python-backend-specialist",
"summary": "Add user authentication to API", # Optional: brief summary (max 500 chars)
"base_priority": 8
})
# List tasks
abathur task list --status pending
# Start swarm to process tasks
abathur swarm start --max-agents 10
# Monitor task queue status
abathur task status# Execute task with iterative refinement
abathur loop start <task-id> \
--max-iterations 10 \
--convergence-threshold 0.95Abathur follows Clean Architecture principles with clear layer separation:
ββββββββββββββββββββββββββββββββββββββββββββ
β CLI Layer (Typer + Rich) β
β 20+ commands with rich terminal output β
ββββββββββββββββββ¬ββββββββββββββββββββββββββ
β
ββββββββββββββββββΌββββββββββββββββββββββββββ
β Application Services Layer β
β β
β β’ SwarmOrchestrator β
β β’ LoopExecutor β
β β’ TaskCoordinator β
β β’ AgentExecutor β
β β’ TemplateManager β
β β’ MCPManager β
β β’ ResourceMonitor β
β β’ AgentPool β
ββββββββββββββββββ¬ββββββββββββββββββββββββββ
β
ββββββββββββββββββΌββββββββββββββββββββββββββ
β Domain Models Layer β
β Task, Agent, Result, ExecutionContext β
ββββββββββββββββββ¬ββββββββββββββββββββββββββ
β
ββββββββββββββββββΌββββββββββββββββββββββββββ
β Infrastructure Layer β
β β’ Database (SQLite + WAL) β
β β’ ConfigManager (Hierarchical) β
β β’ Logger (Structlog) β
β β’ MCPConfigLoader β
β β’ ClaudeClient (Anthropic SDK) β
ββββββββββββββββββββββββββββββββββββββββββββ
- Priority Queue: Task scheduling with dependency resolution
- Semaphore Control: Concurrent agent execution with resource limits
- Exponential Backoff: Retry with jitter for transient errors
- Checkpoint/Resume: Crash-resistant loop execution
abathur task submit <template> [--input-file FILE] [--priority 0-10]
abathur task list [--status STATUS] [--limit N]
abathur task list --tree # Show tasks as hierarchical tree
abathur task show <task-id>
abathur task status # Show task queue statistics
abathur task cancel <task-id>
abathur task retry <task-id>abathur swarm start [--task-limit N] [--max-agents N]
abathur swarm statusabathur loop start <task-id> [--max-iterations N] [--convergence-threshold F]abathur init # Install configured templatesabathur mcp list
abathur mcp start <server>
abathur mcp stop <server>
abathur mcp restart <server># Show tasks as hierarchical tree
abathur task list --tree
# Filter by status
abathur task list --tree --status pending
abathur task list --tree --status running
# Combine with other filters
abathur task list --tree --status pending --limit 20
# Feature branch task overview
abathur feature-branch summary <branch-name>
abathur feature-branch listAbathur uses a 4-level configuration hierarchy:
- Template defaults:
.abathur/config.yaml - User overrides:
~/.abathur/config.yaml - Project overrides:
.abathur/local.yaml - Environment variables:
ABATHUR_*
version: "1.0"
log_level: INFO
template_repos:
- url: https://github.com/odgrim/abathur-claude-template.git
version: main
swarm:
max_concurrent_agents: 10
agent_spawn_timeout: 5
agent_idle_timeout: 300
retry:
max_retries: 3
initial_backoff: 10 # seconds
max_backoff: 300 # 5 minutes
backoff_multiplier: 2.0
jitter: trueCreate .mcp.json in your project root:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/allowed/path"],
"env": {}
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}# Clone repository
git clone https://github.com/yourorg/abathur.git
cd abathur
# Install Rust toolchain (if not already installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Install development tools
rustup component add rustfmt clippy
# Build the project
cargo build# Debug build (fast compilation, slower runtime)
cargo build
# Release build (optimized, slower compilation)
cargo build --release
# Run without installing
cargo run -- <command>
# Example: List tasks
cargo run -- task list# Run all tests
cargo test
# Run tests with output
cargo test -- --nocapture
# Run specific test
cargo test test_task_creation
# Run tests for specific module
cargo test domain::models
# Run with coverage (requires cargo-tarpaulin)
cargo install cargo-tarpaulin
cargo tarpaulin --all-features --workspace --timeout 120 --out Html# Format code
cargo fmt
# Check formatting without making changes
cargo fmt --check
# Run clippy (linter)
cargo clippy --all-targets --all-features
# Clippy with warnings as errors
cargo clippy --all-targets --all-features -- -D warnings
# Check all (format, clippy, test)
cargo fmt --check && cargo clippy --all-targets --all-features -- -D warnings && cargo test# Run in debug mode
cargo run -- --help
# Run with logging
RUST_LOG=debug cargo run -- task list
# Run with trace logging for specific module
RUST_LOG=abathur::domain::task=trace cargo run -- task show <id># Run all benchmarks
cargo bench
# Run specific benchmark
cargo bench task_queue
# Generate benchmark report
cargo bench -- --save-baseline main- Contributing Guide: Development setup and guidelines
- Architecture: System architecture and design patterns
- API Documentation: Rust API documentation (cargo doc)
- User Guide: Comprehensive usage guide
# Generate and open API documentation
cargo doc --open
# Generate documentation for all dependencies
cargo doc --document-private-items --openRust Rewrite in Progress - This project is being rewritten from Python to Rust for improved performance, type safety, and concurrency.
Phase 1: Foundation β
- Cargo project structure with Clean Architecture
- Domain models (Task, Agent, ExecutionResult)
- Error types with thiserror
- SQLite database layer with sqlx
- Configuration management with figment
Phase 2: In Progress π§
- Service layer implementations
- Repository pattern with async traits
- Port definitions for hexagonal architecture
Phase 3: Planned π
- CLI layer with clap
- Application orchestration services
- Swarm coordination
- MCP integration
The Python implementation remains functional with all features:
- SQLite database with WAL mode
- Configuration system with hierarchy
- Structured logging with audit trails
- Task Coordinator (priority queue, retry logic)
- Swarm Orchestrator
- MCP Manager
- CLI with rich output
- Task Scheduling: O(log n) with indexed queries
- Dependency Check: O(d) per task
- Concurrent Agents: Configurable limit
- Database: SQLite with WAL mode
Contributions are welcome! Please see CONTRIBUTING.md for detailed guidelines.
Quick Start:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes following the style guide
- Add tests for new functionality
- Ensure all checks pass:
cargo fmt --check cargo clippy --all-targets --all-features -- -D warnings cargo test --all-features - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
See CONTRIBUTING.md for complete development workflow, code style guidelines, and testing requirements.
MIT License - see LICENSE file for details
- Built with Anthropic Claude
- Inspired by StarCraft II's Abathur character
- Clean Architecture principles by Robert C. Martin
- Documentation:
docs/ - Issues: GitHub Issues
- Discussions: GitHub Discussions
Version: 0.1.0