env/profile.env.example

Generic swarm-mcp profile env file.

Copy to ~/.config/swarm-mcp/.env and edit. Each profile you want

isolated gets its own copy, named the same as the profile (e.g.

"personal.env", "work.env", "client-x.env"). swarm-mcp loads this file by

profile name when it needs to know how to map a generic harness request to

this profile's launcher alias.

Pair this with a swarm_define_profile call in your shell config (see

env/launchers.zsh.example) that defines launcher functions whose names

match the SWARM_HARNESS_* values below.

Identity tokens this profile uses on the wire. Keep them identical and

matching the file name (without .env) — this is the "identity:" token

the swarm coordinator uses for boundary checks.

export AGENT_IDENTITY=PROFILE_NAME export SWARM_IDENTITY=PROFILE_NAME

Per-profile coordinator database. The parent dir is created on first use.

export SWARM_DB_PATH="$HOME/.swarm-mcp-PROFILE_NAME/swarm.db"

Visible herdr control socket. Use a profile-scoped path so multiple

profiles can coexist without colliding on a single shared socket.

export HERDR_SOCKET_PATH="${HERMES_HOST_HOME:-$HOME}/.config/herdr/sessions/PROFILE_NAME/herdr.sock"

Harness aliases. Each canonical agent (claude/codex/opencode/hermes) maps

to two launcher aliases per profile:

SWARM_HARNESS_ worker — registers as identity:

SWARM_HARNESS__LEAD gateway — same identity, mode:gateway role:planner

The third launch shape is "vanilla": the raw binary (no alias). It skips

swarm registration entirely. See env/README.md "Three ways to launch each

agent" for the long form. To preserve a vanilla path, pick worker aliases

that don't shadow the canonical binary name (avoid SWARM_HARNESS_CODEX=codex).

Comment out any harness you don't use. Auto-discovery in

env/launchers.zsh.example reads these to materialize launcher functions

automatically — no manual swarm_define_profile call needed.

export SWARM_HARNESS_CLAUDE=cl export SWARM_HARNESS_CODEX=cx export SWARM_HARNESS_OPENCODE=oc export SWARM_HARNESS_HERMES=hm export SWARM_HARNESS_CLAUDE_LEAD=clg export SWARM_HARNESS_CODEX_LEAD=cxg export SWARM_HARNESS_OPENCODE_LEAD=ocg export SWARM_HARNESS_HERMES_LEAD=hmg export SWARM_HARNESS_HERDR=hd

Sandbox directory roots for this profile. Coordination writes are blocked

from instances registered outside these paths. Use this to keep a profile's

work scoped to a specific checkout root. Colon-separated list.

Pattern: SWARM_MCP_<PROFILE_UPPER>_ROOTS=

export SWARM_MCP_PROFILE_NAME_ROOTS="$HOME/code/PROFILE_NAME"

Let hooks/scripts find the local swarm-mcp CLI when the package binary is

not installed.

export SWARM_MCP_BIN="bun run /absolute/path/to/swarm-mcp/src/cli.ts"

Account-scoped MCP config roots. Keep each profile's auth state under a

distinct root so MCP servers see only their profile's secrets/sessions.

export CLAUDE_CONFIG_DIR="$HOME/.claude-PROFILE_NAME" export CODEX_HOME="$HOME/.codex-PROFILE_NAME" export OPENCODE_CONFIG_DIR="$HOME/.config/opencode-PROFILE_NAME" export HERMES_HOME="$HOME/.hermes/profiles/PROFILE_NAME"

Work tracker routing metadata. This is policy, not credentials. The

matching MCP server (declared by mcp) must be installed in this profile's

config root above. Drop this whole block if the profile doesn't track work

in an external tool.

export SWARM_WORK_TRACKER='{ "provider": "github_issues", "mcp": "github_PROFILE_NAME", "repo": "OWNER/REPO" }'