Skip to main content

Hierarchical multi-cluster coding swarm CLI

Project description

Autobots

Hierarchical multi-cluster coding swarm CLI powered by NVIDIA NIM

Autobots is a Python CLI tool that orchestrates multiple AI models as a coding swarm to autonomously plan, implement, review, repair, and validate code in your target repositories. It routes tasks to specialized clusters, injects project context into model prompts, and runs validation loops with automatic repair and rollback support.


Quick Start

pip install autobot-swarm
# Check context files in your project
autobots init /path/to/your/project

# Generate an implementation roadmap
autobots plan /path/to/your/project

# Execute a task through the swarm
autobots run P1-T1

# Launch the interactive mode
autobots engage

What Autobots Does

  1. Plans — Parses a roadmap into phases and tasks with dependencies
  2. Routes — Intelligently assigns tasks to the best-fit AI cluster
  3. Implements — Specialist models generate code with your project context
  4. Reviews — A reviewer cluster validates correctness and safety
  5. Repairs — A repair cluster fixes issues found during review
  6. Validates — Runs your tests, linters, and build commands
  7. Rolls Back — Snapshots before writes, autobots undo reverts changes

Key Features

Skill Injection

Autobots reads your context/ directory (architecture, conventions, testing strategy, security docs) and injects them into model prompts. Models see your project's actual documentation before writing code.

Nine Specialized Clusters

Cluster Role Use Case
Optimus Planner Mission briefs and orchestration
UltraMagnus Backend APIs, databases, server logic
Jazz Frontend UI components, React, CSS
RedAlert Reviewer Code review, security checks
Ratchet Repair Bug fixes, validation failures
Perceptor Retrieval Document parsing, RAG
Bumblebee Media Speech, audio, video
Ironhide Simulation Physics, optimization
Wheeljack Science Molecular, research

Execution Modes

  • Supervised — Approval required before each phase
  • Milestone — Approval every N phases (configurable)
  • Autonomous — No approval, runs to completion

Configurable Models

# .autobots.toml
[autobots]
model_selection_profile = "balanced"  # fast, balanced, quality
temperature = 0.2
max_tokens = 4096

Additional Features

  • Rollback/Undo — Snapshot system with autobots undo and autobots snapshots
  • Response Streaming — Live character counter during model calls
  • Doctor Preflight — Health checks for API, git, config, and dependencies
  • Structured Errors — Contextual messages with actionable suggestions
  • Test Gate — Run tests before commit
  • Git Integration — Auto-commit after phase completion
  • Config Validationautobots config validate checks TOML settings
  • Shell Completions — bash, zsh, and fish tab completion
  • Context Budget — Warns and truncates when prompts approach model limits
  • Plugin System — before/after hooks for custom extensions
  • Skill Marketplace — Built-in packs for FastAPI, Django, React, Next.js
  • Web Dashboard — Real-time status on port 8080
  • Rich Status Output — Progress bars, estimated time, branch info
  • Explain Commandautobots explain P2-T3 shows audit trail details
  • Usage Statsautobots stats shows totals, averages, costs
  • Verbose Mode--verbose flag logs full prompts sent to models

Requirements

  • Python 3.11+
  • NVIDIA NIM API key (free tier available at build.nvidia.com)

Configuration

# .autobots.toml (place in project root or $HOME)
[autobots]
model_selection_profile = "balanced"
safety_branch = "autobots-safety"
default_mode = "supervised"
milestone_threshold = 3
max_verification_attempts = 3
temperature = 0.2
max_tokens = 4096

All settings can also be set via environment variables:

export AUTOBOTS_MODEL_SELECTION_PROFILE=quality
export AUTOBOTS_SAFETY_BRANCH=main

CLI Commands

Command Description
autobots init Check context files in target project
autobots init --interactive Interactive setup wizard
autobots plan Generate implementation roadmap
autobots run <task> Execute a specific task
autobots resume Resume from last checkpoint
autobots engage Interactive mode with startup screen
autobots status Rich status with progress bars
autobots explain <id> Show audit trail for a phase/task
autobots stats Usage statistics and costs
autobots undo Rollback to previous snapshot
autobots snapshots List available snapshots
autobots diff Compare workspace to snapshot
autobots logs View audit trail
autobots doctor Preflight health checks
autobots catalog Browse NVIDIA model registry
autobots config validate Validate TOML configuration
autobots completions Generate shell completions
autobots marketplace Browse skill packs
autobots dashboard Launch web dashboard
autobots validate-models Test NVIDIA API connectivity
autobots publish Build and publish to PyPI

Context Architecture

Create these files in your project's context/ directory:

context/
  architecture.md       # System design, tech stack, patterns
  conventions.md        # Code style, naming, formatting rules
  testing-strategy.md   # Test framework, coverage, patterns
  security-auth.md      # Auth patterns, OWASP checklist
  roadmap.md            # Implementation plan (autobots reads this)
  progress-tracker.md   # Current status (autobots updates this)

These files are injected into model prompts so generated code matches your project's patterns.


How It Works

[Your Task] → [Optimus Planner] → [Specialist Cluster] → [RedAlert Reviewer]
                                          ↓                      ↓
                                    [Code Output]         [Pass / Revise]
                                                              ↓
                                                      [Ratchet Repair]
                                                              ↓
                                                      [Validation Loop]
                                                              ↓
                                                      [Snapshot + Write]

Safety Features

  • Command whitelist blocks dangerous operations (rm -rf, sudo, etc.)
  • File locking prevents concurrent writes to critical context files
  • Atomic writes ensure no partial file corruption
  • Path traversal protection keeps writes within allowed directories
  • Audit trail logs all actions for debugging
  • Test gate runs tests before commit
  • Pre-commit snapshots enable rollback

Development Status

  • Version: 0.1.8
  • Status: Production-ready
  • Tests: 465 passing
  • License: MIT

Links


License

MIT License — see LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autobot_swarm-0.1.8.tar.gz (161.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

autobot_swarm-0.1.8-py3-none-any.whl (136.5 kB view details)

Uploaded Python 3

File details

Details for the file autobot_swarm-0.1.8.tar.gz.

File metadata

  • Download URL: autobot_swarm-0.1.8.tar.gz
  • Upload date:
  • Size: 161.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for autobot_swarm-0.1.8.tar.gz
Algorithm Hash digest
SHA256 db221a500a7e9d4f0701714362bf4a6f76df50af0fdee7019318d9173eaf04fc
MD5 fdcf2539106dcb4ebe01186b0cf783e2
BLAKE2b-256 5067a4fc159267787646905c6da50806e0b54436811d2135836682cb42c731fd

See more details on using hashes here.

File details

Details for the file autobot_swarm-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: autobot_swarm-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 136.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for autobot_swarm-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 175c616eda91b06a7f1c258973d1e543bf7db1b6e8e658bb51845bd858ccb18c
MD5 305bbae07eb53cadef60b92c48f34def
BLAKE2b-256 137f8756c39669e29a5e24042ac3c737499704885c6e2ce7e9d06669f91faf1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page