Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

FlagTypeDefaultDescription
--mode <MODE>local | remotelocalDeployment mode. local binds 127.0.0.1 (loopback only); remote binds 0.0.0.0.
--port <PORT>integer7391TCP port the gateway listens on.
--config <CONFIG>path~/.aasm/config.yamlYAML config file consumed by the gateway.
--foregroundflagoffStay in the foreground; do not daemonize.
--no-dashboardflagoffDisable dashboard serving (even in local mode).

Behavior

  1. Resolve the listen address from mode + port.
  2. Exit early (idempotent) if a gateway is already running at that address — verified by a live PID file and a successful TCP probe.
  3. Spawn aa-gateway (background, or foreground with --foreground).
  4. 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

FlagTypeDefaultDescription
--timeout <TIMEOUT>integer (seconds)30Seconds 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