Wingman is the orchestration and control-plane layer for the Wingman suite.
In the current stack:
wingman-toweris the workspace authority for auth, groups, encrypted record sync, storage, and service discoverywingman-fdis Flight Deck, the human-first local-first browser workspacewingman-yokeis the agent/operator CLI workspace clientwingman-flightlogis the optional memory/history layerwingmenis the session harness that launches, supervises, and connects agents to the rest of the suite
Wingmen does not replace Tower as the source of truth for workspace data. It sits beside the workspace stack and manages agents, sessions, live views, app runtimes, MCP tooling, NIP-98-protected operational APIs, and per-user bot-key flows.
- Launch and manage agent sessions for Codex, Claude, Goose, OpenCode, and other supported adapters
- Provide browser control surfaces such as
/homeand/live - Broker MCP tools and agent-side capabilities back into Wingman over HTTP
- Manage per-user bot keys, session identity, and delegated NIP-98 flows
- Expose operational APIs for apps, git/Gitea, jobs, memories, Nostr, and SuperBased/Flux operations
- Inject agent-local environment and MCP configuration, including bot-key material when available
Some internal routes and modules still use older naming:
autopilot-jobsis the current internal/API path for the Jobs subsystemAGENT_NSECis the environment variable used to inject a session bot key into an agent process- some
wm21references are deployment-specific defaults or admin fallbacks, not product concepts
Those names are still real implementation details, but the current product framing is:
- Wingman = orchestration platform
- Jobs = reusable job definitions and runs
- Delegate sessions / agent sessions = the programmable session layer around agents
Install dependencies:
bun installLaunch the orchestration server:
bun startVisit:
http://localhost:<PORT>/homefor the session dashboardhttp://localhost:<PORT>/livefor the real-time live/session surface
Wingmen is a long-running Bun server that:
- serves the web UI and operational HTTP APIs
- allocates ports and spawns agent runtimes
- tracks sessions, logs, messages, and status
- injects MCP config and per-session identity/env context
- exposes higher-level app, git, job, memory, and Nostr tooling to agents and operators
The current Jobs subsystem is user-facing as “Jobs”, but internally still uses autopilot-jobs in API paths and some module names.
Examples:
/api/autopilot-jobs/definitions/api/autopilot-jobs/runssrc/jobs-api.ts
Treat this as a naming-compatibility layer rather than a separate product.
Use scripts/wingman-appctl.ts to control registered apps over HTTP with NIP-98 auth headers.
export WINGMAN_NSEC=nsec1...
bun run appctl list
bun run appctl status <app-id>
bun run appctl start <app-id>
bun run appctl stop <app-id>
bun run appctl setup <app-id>Options:
--base-url <url>target Wingman base URL--key <nsec|hex>override signing key for this invocation--jsonprint raw API responses
| Variable | Description | Default |
|---|---|---|
PORT |
Primary Wingman UI/API port | 3600 |
AGENT_PORTS |
Starting port assigned to agent subprocesses | 3700 |
AGENT_MAX |
Total number of concurrent agent ports available | 10 |
HOST_URL_BASE |
Template for app links; <port> is replaced with the app's assigned port |
https://host.otherstuff.ai/<port> |
DIRECTORY_DEF |
Working directory used when launching agent subprocesses | ~/code |
FOLDERACCESS |
Comma-separated directories exposed to file browsers and pickers | DIRECTORY_DEF |
AGENT_SPAWN_MODE |
Primary spawn-mode setting: bun or pm2 |
bun |
AGENT_MODE |
Deprecated compatibility input only | unset |
AGENTAPI_BIN |
Primary binary path for the AgentAPI executable | ./out/agentapi |
CLAUDE_CLI |
Executable invoked for Claude sessions | claude |
GLOVES |
Claude approval mode; OFF adds skip-permissions |
unset |
GOOSE_CLI |
Executable invoked for Goose sessions | goose |
CODEX_CLI |
Executable invoked for Codex sessions | codex |
OPENCODE_CLI |
Executable invoked for OpenCode sessions | opencode |
AGENTAPI_ALLOWED_ORIGINS |
Value passed to AgentAPI --allowed-origins |
* |
AGENTAPI_ALLOWED_HOSTS |
Value passed to AgentAPI --allowed-hosts |
localhost,127.0.0.1,[::1] |
Homelists sessions and lets operators start or stop agents.Liveshows running sessions, conversation state, logs, and prompt dispatch.- Jobs let operators define reusable manager/worker execution patterns.
- App management controls registered local apps.
- MCP tooling exposes memories, git, Nostr, image generation, SuperBased access, and more to agents.
Refer to docs/architecture.md for the current technical split.
For persistence across Wingman restarts, use PM2-backed spawning:
AGENT_SPAWN_MODE=pm2 bun startLegacy fallback also works:
AGENT_MODE=pm2 bun startActive contract:
- use
AGENT_SPAWN_MODEto choosebunorpm2 - use
AGENTAPI_BINto choose whichagentapibinary Wingman launches AGENT_MODEis deprecated compatibility only
docs/architecture.mdis the main current technical mapdocs/asbuilt/anddocs/as_built/contain historical snapshots and implementation notes- design docs may still mention older internal names such as
autopilot-jobs; treat those as implementation compatibility unless they explicitly propose a new contract