Skip to main content

Local-first swarm agent framework: a Commander plans and dispatches a swarm of Workers that research, code, test, and interactively drive the computer to complete long-horizon codebase goals.

Project description

OpenCommand

Local-first swarm agent framework. A Commander model plans and dispatches a swarm of Workers that research, code, test, and interactively drive the computer (mouse, keyboard, screen) to complete long-horizon codebase goals.

Everything runs embedded — models are GGUF files loaded directly with llama-cpp-python (no API servers, no network at runtime). Designed for Python 3.14 (free-threaded).

Install

# Run without installing (ephemeral):
uv tool run opencommand --help

# Or install globally:
uv tool install opencommand
playwright install   # optional, for the playwright tool

Note: the llama-cpp-python prebuilt CPU wheel may crash on older CPUs (illegal-instruction). If so, rebuild from source with AVX2:

call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
set CMAKE_ARGS=-DGGML_AVX2=ON
uv pip install --no-binary llama-cpp-python --no-cache llama-cpp-python

Usage

opencommand models list                 # list built-in embedded models
opencommand models pull all             # download GGUF models into ./models
opencommand config                      # interactive menu: workers, batch size, GPU, etc.
opencommand run "Add unit tests for the engine module."
opencommand run --goal-file Goal.md    # run from a Goal.md spec (intended state)
opencommand run "Build a Panda3D FPS" --pipeline advanced --verify "uv run pytest -q"
opencommand tui                         # live swarm dashboard
opencommand cron add healthcheck "every 1h" "echo ok"

Goal.md spec

Instead of an inline goal, point run at a Goal.md file that defines the intended end state / requirements for the session. Its contents become the goal fed to the swarm (and the advanced pipeline's review gate checks against it):

opencommand run --goal-file Goal.md

The file name is configurable via opencommand config (default Goal.md).

Built-in models

Role Model
commander deepreinforce-ai/Ornith-1.0-9B-GGUF
worker unsloth/Qwen3-4B-Instruct-2507-GGUF
vision unsloth/Qwen3-VL-4B-Instruct-GGUF
vision_small openbmb/MiniCPM-V-4.6-gguf

Links

  • DESIGN.md — full architecture & research notes
  • TODO.md — roadmap tracker

Micro-wiki: running & configuring OpenCommand on any system

OpenCommand is local-first and cross-platform (Windows, Linux, macOS). Everything runs embedded — no API keys, no external servers. The only hard requirement is Python 3.14+ and enough RAM for the GGUF models.

1. Install

# Ephemeral (no install):
uv tool run opencommand --help

# Global install (recommended):
uv tool install opencommand
playwright install        # optional, only for the playwright tool

CPU illegal-instruction crash? The llama-cpp-python prebuilt wheel is built with a newer ISA than some CPUs (e.g. Zen 3 / Ryzen 5000). Rebuild from source with your ISA flags:

call "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
set CMAKE_ARGS=-DGGML_AVX2=ON
uv pip install --no-binary llama-cpp-python --no-cache llama-cpp-python

2. Scaffold a workspace

opencommand init            # creates README.md, TODO.md, .opencommand/ + GOAL.md

init is idempotent — it never overwrites existing files, so re-running it is safe. Fill out .opencommand/GOAL.md with the intended end state, then run the full advanced pipeline against it:

opencommand run --goal-file .opencommand/GOAL.md --pipeline advanced

3. Configure (interactive menu)

opencommand config

Sets: vision on/off, vision model (vision = Qwen3-VL-4B, vision_small = MiniCPM-V-4.6 0.8B for low-RAM), max workers, batch size, retries, pipeline, live-verify, GPU layers, goal file, desktop safety policy, and per-role device placement.

4. Device placement (low-VRAM hosts)

Models can be pinned per role to GPU (offload all layers) or CPU+RAM (RAM only) via opencommand config → "Model device placement". Roles: commander, worker, vision, vision_small. Example for an 8 GB VRAM / 32 GB RAM machine:

Role Device Why
commander GPU Small planner; keep it fast & resident on GPU
worker CPU Heavy pool; scales with RAM, not VRAM
vision GPU VL desktop agent needs the GPU for screen理解
vision_small GPU Lightweight fallback for the desktop agent

Roles you don't pin fall back to the legacy global n_gpu_layers (-1 = all GPU, 0 = CPU). During live-verify the Commander is unloaded from the GPU while the VL desktop agent runs (freeing VRAM), then re-loaded to review the agent's report and continue the loop.

5. Run modes

opencommand run "Add unit tests for the engine module."          # inline goal
opencommand run --goal-file .opencommand/GOAL.md                 # from spec
opencommand run "Build a Panda3D FPS" --pipeline advanced \
    --verify "uv run pytest -q"                                # verify gate
opencommand run "..." --live-verify                            # interactive desktop check
opencommand tui                                                  # live dashboard
  • standard pipeline: plan → research → workers.
  • advanced pipeline: scaffold → research loop (until accurate) → workers → test+debug loop → Commander review gate → optional live-verify.

6. Desktop safety

The desktop agent drives the real mouse/keyboard, so it is the most dangerous capability. opencommand config exposes a safety policy that the Commander enforces before every action: allow/deny mouse, keyboard, typing; require confirmation for risky-but-permitted actions; max steps; pause between actions; and a built-in deny-list of destructive actions (restart/shutdown), dangerous key combos (win+r, ctrl+alt+del), and typed tokens (rm -rf, sudo, curl | sh). OS-specific safe-operation skills ship for Windows / Linux / macOS.

7. Scheduling

opencommand cron add healthcheck "every 1h" "echo ok"   # shell command
opencommand cron add build "daily 09:00" "uv run pytest -q"  # cron expr
opencommand cron edit healthcheck --schedule "every 30m"  # change without remove+add
opencommand cron list / remove / status / start

Persisted jobs auto-boot with run / cron start and dispatch goals through the Commander or run shell commands.

8. Security tooling

opencommand run "Scan the workspace for stray scripts" --goal-file Goal.md

The system tool lists processes, watches paths (watchdog), and scans files / directories / live processes with YARA (yara-python, with a bundled default ruleset detecting stray agent loops, obfuscation, suspicious PowerShell, and known malware markers). Falls back to the yara CLI if the binding is absent.

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

opencommand-0.1.5.tar.gz (59.7 kB view details)

Uploaded Source

Built Distribution

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

opencommand-0.1.5-py3-none-any.whl (79.0 kB view details)

Uploaded Python 3

File details

Details for the file opencommand-0.1.5.tar.gz.

File metadata

  • Download URL: opencommand-0.1.5.tar.gz
  • Upload date:
  • Size: 59.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opencommand-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4d5d3f4b14c4d1ff68a05ce39be0c0e49cba2d781ef2ea2e69fe1917e40949f5
MD5 8601e528a1687ce74aae427281e92008
BLAKE2b-256 500fff7b6c9b67ee1d52c841c7033e809549649c7b96c8c17040a8c09d78a208

See more details on using hashes here.

File details

Details for the file opencommand-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: opencommand-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 79.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for opencommand-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ba520717b336e38eeeab11cc4310cdc5a8007238274c752a039445cc2f300ad2
MD5 327767559b170c12c4c168956629cc1a
BLAKE2b-256 8e71544b045844051b011727beec95dba69e0e8142b4fc70109df6da78bac317

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