Skip to main content
aion serve reads aion.yaml, starts one process per configured agent, and starts a proxy server for unified routing.

Usage

Options

Examples

Startup Behavior

  • Validates and loads aion.yaml.
  • Loads environment variables from system or .env.
  • With POSTGRES_URL set, each agent server applies the database migrations, or only checks them when DB_MIGRATE_ON_START=false; see aion db.
  • Reserves proxy and agent ports.
  • Starts agent server processes and proxy process.
  • Prints direct and proxy URLs for each agent.
  • If control plane credentials are present, attempts deployment metadata lookup, platform websocket connection, and manifest registration.
  • Without control plane credentials, local direct and proxy A2A endpoints still start, but control plane connectivity and automatic registration are unavailable.

Shutdown Behavior

  • On SIGINT or SIGTERM, every agent server is asked to stop at once and given AION_SHUTDOWN_TIMEOUT (default 25 seconds); what is still running when that time is spent is killed.
  • Each agent server stops accepting requests, waits for the connections still open, and settles the tasks it was still running as FAILED with aion:settledReason set to server_shutdown.
  • Set AION_SHUTDOWN_TIMEOUT a few seconds below the stop timeout of the platform running aion serve; see Environment Variables.