Skip to main content
The Aion Python SDK installs the aion command. Use it to run local Aion projects, start the proxy and agent servers defined in aion.yaml, and chat with A2A-compatible agents during development.

Commands

aion itself comes with the base install, so aion --help, aion --version and aion chat work anywhere the SDK is installed. aion serve needs the server behind it and says which extra to install when it is missing.

aion logs

Streams the log events of the deployment version the current credentials authenticate as. It needs AION_CLIENT_ID and AION_CLIENT_SECRET.

aion db

Applies or checks the migrations of the PostgreSQL database at POSTGRES_URL: the SDK’s tables, then those of the installed agent frameworks, such as LangGraph checkpoints and ADK sessions. It needs the server extra, as aion serve does; it does not read aion.yaml or run agent code.
aion db migrate is safe to run while servers start. aion db check changes nothing: it prints one line per set of tables and exits with a non-zero status when the database lacks migrations this SDK version needs. A database migrated by a newer SDK version is reported and accepted, so a server can be rolled back onto it. A server applies the migrations itself when it starts. To give the servers a database user that cannot change the schema, run aion db migrate before they start and set DB_MIGRATE_ON_START=false: each server then only checks the migrations and refuses to start while the database is behind. See Environment Variables.

aion db strip-request-metadata

Removes the extension payloads that requests carry from the stored tasks of the PostgreSQL database at POSTGRES_URL. A task’s metadata holds what the server and its extension handlers write, such as the routed extension and aion:settledReason. The payloads a request carries in its params.metadata belong to that request: the server gives them to the agent for that turn and does not store them on the task. The Daemon extension payload among them holds the environment’s configuration variables, secrets included, in plain text. Run this command without --apply to see whether any stored task carries such a payload, then with --apply to remove them.
The keys it removes are the URIs of the extensions whose payload arrives in request metadata: Daemon, Distribution, Cron and Traceability. It looks for them in the metadata column of tasks and in the Task snapshots of the task_events journal, which keeps a task’s events until the task is deleted. Every other key stays, and a task left with no metadata reads as a task without any. The command changes no task’s version and may run while servers serve. Running it again finds nothing, unless a task that was still being written put a key back. Like aion db migrate, it needs the server extra and does not read aion.yaml. The standalone Aion Chat npm package provides the same terminal chat interface without requiring the Python SDK.