In use
Agents & AI
Coding agents are some of the fleet's busiest users. Collective installs them on every machine with the same credentials, skills and model gateway, keeps their configuration editable while they run, and recovers their logins from other machines when a token expires.
Agent CLIs everywhere
The ai.tools options in Home Manager select what each machine gets. Most are on by default, so a new machine is ready for agent work after its first switch.
| Option | Installs |
|---|---|
ai.tools.pi | The Pi coding agent, with its settings, skills, extensions, prompts and themes linked from standalone/pi |
ai.tools.claude.code | Claude Code and wrappers: one routes it through the gateway, one asks before running outside tmux unless it is a one-shot -p call |
ai.tools.openai.codex, ai.tools.gemini.cli | Codex and Gemini CLI |
ai.tools.herdr | herdr, a terminal workspace manager for agent sessions across machines |
ai.tools.mcp.* | MCP servers; 21 are declared in one shared mcp.json, linked into every home |
ai.tools.cacophony | The agent orchestrator's daemon, and how many turns this node's agent daemon runs at once |
ai.tools.vastai.cli, vllm, kittentts, openai.whisper | Rented GPUs, local model serving, offline speech |
Agents also get worktree helpers. agent-checkout creates an agent branch in a separate worktree and runs a command there in tmux; pi-checkout, claude-checkout and codex-checkout specialise it, so parallel agents never share a working tree.
The model gateway
Each node runs four isolated LiteLLM processes, one per GitHub Copilot account, on ports 4000 to 4003: systemd units on NixOS, launchd agents on the Mac and supervisord programs on Android. They share one model list of 81 entries in standalone/litellm, edited without a rebuild. Azure keys are disabled: a request hook swaps an entra placeholder for a fresh Entra token from az-token, which uses the node's own Azure login or, on machines that cannot sign in, asks one of ten token broker machines over SSH.
A Bifrost gateway module is still available, but it is opt-in and no machine enables it. LM Studio is reached directly by Pi as a dynamic provider rather than through the gateway.
Credentials and recovery
Agents need GitHub, Copilot and Azure credentials that expire. Three helpers recover a login from another machine instead of opening a browser:
gh-login-via # repair every configured GitHub identitycopilot-login-via --all # every configured Copilot accountaz-login-via # a refreshable Azure CLI sessiongh-login-via --discover # list valid sources; install nothing
Look locally first
A valid local credential is left alone.
Then ask the fleet
Sources are the registry's live machines, Azure preferring its token brokers, or an explicit list. Nothing else on the tailnet is scraped. SSH uses only already-trusted host keys, batch mode and short timeouts. A small read-only exporter runs on the source over SSH's standard input, so the source does not need the helpers installed.
Validate before installing
A GitHub token must answer
/useras the right account. A Copilot credential must also mint a fresh token and list models: a recent file or an unexpired cached token is not proof.Report without secrets
Standard output is a tab-separated table of account, source and result; errors are summarised and never include provider responses or credentials. Exit codes: 0 all recovered, 1 partial or failed, 2 misuse.
Account maps for Copilot and GitHub tokens live in standalone/gh-auth-tokens. Git over SSH picks a key per organisation through a multiplexing helper, so work and personal repositories keep separate identities.
Skills and plugins
| For | What | Where |
|---|---|---|
| Claude Code | A plugin marketplace of 6 plugins and 65 skills: Git and GitHub, Nix, self-management such as hand-offs and compaction, utilities, meta-skills for writing skills, and work | plugins/ |
| Pi | 12 engineering skills (software, Android, Apple, frontend style, distributing software, static sites and more), extensions, prompts and themes, all live-linked | standalone/pi |
| Every agent | A shared MCP configuration | standalone/mcp.json |
Because skills are linked out of the store, an agent that improves a skill changes it for every agent on that machine immediately, and for the fleet once the commit is pulled. cltv pi test checks that every Pi extension imports, exports a default function and registers against a mock Pi.
Local inference
Machines with large AMD GPUs serve models locally. These modules share one pattern of ownership:
- Nix owns the launcher, the pinned engine and immutable defaults;
- persistent overrides live outside Nix and are deep-merged over the defaults, written atomically;
- systemd owns the server process, and the tools never adopt or kill a process they did not start;
- model weights stay in the home directory and never enter Nix; enabling a module does not start it unless asked.
| Module | Serves |
|---|---|
prism | LLM inference on ROCm, from a pinned upstream build or entirely from source, with GPU, UI and host stages cached separately |
audioml | Text to speech with reference voices on audio.cpp, as named instances, published through the gateway |
lmstudio | LM Studio with a per-GPU ROCm policy |
kittentts | Small offline speech models |
The agent fleet
Collective is also where the owner's agent infrastructure is installed and configured. Each has its own site:
| Service | Collective's part |
|---|---|
| Cacophony | Installs the orchestrator daemon through its Home Manager module, with its environment and per-node concurrency |
| pi-daemon | Runs one owner instance, with a watchdog and web unit, on five devboxes from the rolling input. Admission is based on protocol capabilities and health, never on matching versions |
| Paratenic | Runs one session host beside Pi, bound to the machine's tailnet address when it has one |
| ctx | Installs the shared context store's client and module everywhere |
| Pebble | Archives audio from a wearable on a loopback receiver and forwards transcripts, never audio, to the orchestrator |
The agent services' configuration (endpoints, workspaces, chat bridges) lives in standalone/ too, so adding a machine to the agent fleet is a configuration edit, not a rebuild.