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_URLset, each agent server applies the database migrations, or only checks them whenDB_MIGRATE_ON_START=false; seeaion 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
FAILEDwithaion:settledReasonset toserver_shutdown. - Set
AION_SHUTDOWN_TIMEOUTa few seconds below the stop timeout of the platform runningaion serve; see Environment Variables.