This repository has been archived on 2026-07-09. You can view files and clone it, but cannot push or open issues or pull requests.
agent-knowledge-base-archived/skills/multi-machine-agent-orchestration.md

5.7 KiB

Multi-Machine Agent Orchestration

Purpose

Coordinate agents running on multiple computers while keeping commands auditable, recoverable, and safe.

Current Operating Mode

Use chat-driven GitHub synchronization as the default.

The user gives an agent this repository link. The agent reads the repository, works in the local chat/session, updates durable knowledge, commits, pulls/rebases if needed, and pushes to GitHub.

Do not run persistent realtime heartbeats, polling daemons, or automatic after-reboot knowledge uploads by default.

Use these channels in priority order:

  1. GitHub knowledge-base commits for durable memory, project status, technical specifications, decisions, and handoffs.
  2. SSH for live control when a machine is reachable and credentials/keys are available.
  3. VNC for visual control and inspection when GUI access is needed.
  4. Local Git server 192.168.1.66 for project source repositories when the project requires it.
  5. agent-bus/ command/result files only for explicit on-demand diagnostics.

Avoid exposing a custom always-open command API unless it is explicitly needed and secured.

Disabled Runner Rule

garage-agent-runner is a legacy/on-demand diagnostic tool. It is not the normal coordination layer.

Rules:

  • Do not install or enable garage-agent-runner-* scheduled tasks unless the user explicitly asks for a live runner or monitor.
  • If a garage-agent-runner-* scheduled task already exists, disable it during setup unless the user explicitly says to keep it running.
  • Keep the runner scripts and old agent-bus files as historical tooling and manual diagnostics.
  • agent-bus/heartbeats/*.md are last-known snapshots, not live status truth.
  • Normal OS services such as sshd, ssh-agent, TightVNC Server, and Git credential/key access may remain enabled and configured for autostart.

For Windows garage machines, disable legacy scheduled runners with:

powershell -NoProfile -ExecutionPolicy Bypass -File .\agent-bus\runners\windows\disable-garage-agent-runner.ps1

Command Bus Layout

This structure may still be used for a one-time diagnostic when the user asks:

agent-bus/
  commands/<machine>/
  results/<machine>/
  heartbeats/<machine>.md
  locks/

Command files should be Markdown or YAML text files. Do not store secrets.

On-Demand Command Lifecycle

Use this only when explicitly requested:

  1. Controller writes a command file to agent-bus/commands/<machine>/.
  2. Target machine pulls the repository during an active chat/session or a temporary runner invocation.
  3. Agent validates the command against a narrow allowlist.
  4. Agent creates a lock in agent-bus/locks/.
  5. Agent runs the task.
  6. Agent writes result to agent-bus/results/<machine>/.
  7. Agent commits and pushes the result.
  8. Agent disables any temporary runner unless the user explicitly asked to keep it running.

Windows mapped-share note: if the knowledge base or project repositories are accessed through mapped drives or UNC paths between different Windows users, Git may report dubious ownership. Runner or diagnostic scripts should call Git as git -c safe.directory=* ... for inventory/status operations, or configure a narrow safe.directory entry outside the repository. Do not fix this by changing repository ownership on another machine without explicit approval.

Security note: inventory writers must redact remote URL userinfo before writing Git remotes to the knowledge base, for example ssh://<redacted>@host/path.git.

Live Control

For immediate work, use SSH:

ssh <user>@<host> '<command>'

Use SSH for:

  • starting/stopping services;
  • checking process state;
  • running inventory commands;
  • launching interactive agent sessions where supported;
  • troubleshooting network or access failures.

Use VNC when GUI confirmation, projector setup, hardware utilities, or visual calibration are required. Keep VNC passwords outside Git.

Safety Rules

  • Use per-machine users matching hostnames for normal repository work, not root.
  • Standard machine identities are wuu, qore, pump, and airM1.
  • Git commits and pushes from a machine should use that machine identity in user.name.
  • Do not store passwords, API tokens, VNC passwords, camera credentials, or SSH private keys.
  • A shared temporary SSH/VNC password may exist out-of-band for setup convenience, but its value must not be committed to this repository.
  • Commands and results that matter must be summarized in Markdown and pushed to GitHub.
  • Destructive commands require explicit user approval.
  • Git commits from a machine should use that machine's configured identity.

Minimum Machine Setup

Each machine should have:

  • SSH access where possible;
  • VNC access where GUI control is useful;
  • Git;
  • access to krustophski/agent-knowledge-base;
  • machine identity configured in Git;
  • local AGENTS.md where applicable;
  • local project repositories under C:\git on Windows garage machines;
  • optional VNC/camera access documented in locations/.

Git Identity Convention

Use host-based identities:

Machine/User Git user.name
wuu wuu
qore qore
pump pump
airM1 airM1

Use machine-local or project-approved email addresses. If no official email is available, use a local placeholder such as <machine>@garage.local.

First Implementation Recommendation

Start simple:

  1. Use GitHub commits for durable shared memory.
  2. Use SSH for direct control.
  3. Use VNC for visual control.
  4. Use local Git server access for project repositories.
  5. Use agent-bus only when the user explicitly asks for a one-time asynchronous diagnostic.

This keeps coordination understandable and avoids unwanted background writes.