aasm start / aasm stop
Start and stop the locally-managed Agent Assembly gateway. These are the
high-level developer-laptop commands: aasm start picks a deployment mode,
binds the right address, runs the gateway in the background, and (in local
mode) enables the dashboard. aasm stop terminates it gracefully and cleans
up the PID file.
For low-level gateway control (explicit listen address, Unix socket, policy path), see
aasm gateway.
aasm start
Synopsis
aasm start [OPTIONS]
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--mode <MODE> | local | remote | local | Deployment mode. local binds 127.0.0.1 (loopback only); remote binds 0.0.0.0. |
--port <PORT> | integer | 7391 | TCP port the gateway listens on. |
--config <CONFIG> | path | ~/.aasm/config.yaml | YAML config file consumed by the gateway. |
--foreground | flag | off | Stay in the foreground; do not daemonize. |
--no-dashboard | flag | off | Disable dashboard serving (even in local mode). |
Behavior
- Resolve the listen address from
mode+port. - Exit early (idempotent) if a gateway is already running at that address — verified by a live PID file and a successful TCP probe.
- Spawn
aa-gateway(background, or foreground with--foreground). - In background mode, write the PID file and wait for the listener before printing the success banner.
Exit 0 on a normal start, an idempotent “already running” path, or a clean
foreground exit. Exit non-zero if the readiness probe times out or the spawn
fails.
Example
aasm start --mode local --port 7391
Agent Assembly gateway started (pid 48213)
Gateway: http://localhost:7391
Dashboard: http://localhost:7391
aasm stop
Synopsis
aasm stop [OPTIONS]
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--timeout <TIMEOUT> | integer (seconds) | 30 | Seconds to wait for graceful shutdown before sending SIGKILL. |
Behavior
Resolves the PID file (~/.aasm/gateway.pid) and chooses one of four terminal
states — no PID file, stale PID file, graceful SIGTERM, or escalated SIGKILL —
always cleaning up the PID file so the next aasm start sees a clean slate.
Example
aasm stop --timeout 15
Sent SIGTERM to pid 48213; exited gracefully.
Last updated: 2026-06-11 by Chisanan232