astro otto
Labs
This feature is in Labs.Launch Otto, Astronomer’s data engineering agent, in your terminal. Otto helps you author, upgrade, debug, and manage Airflow Dags with deep context about your project and environment.
The astro otto command handles binary management, authentication, and local Airflow discovery automatically. All flags and arguments passed to astro otto are forwarded directly to Otto. For more information about Otto’s capabilities, see the Otto overview.
Usage
When run without a prompt, Otto opens an interactive terminal user interface. When a prompt is provided, Otto runs in one-shot mode and exits after responding.
Subcommands
The first time you run astro otto, the CLI downloads the Otto binary to ~/.astro/bin/otto. On subsequent launches, the CLI checks for newer releases and applies them automatically before launching the agent. Set otto.auto_update to false to opt out and apply updates manually with astro otto update.
Otto versions independently of the Astro CLI. You don’t need to upgrade the Astro CLI to pick up new Otto features or fixes. Use astro otto update to pull the latest Otto release at any time.
Options
All options are forwarded to Otto.
Usage modes
astro otto supports three modes via --mode:
interactive(default): Full TUI with streaming output, tool call rendering, and session persistence. In a session, use/commands like/airflow(project context),/skills(browse and load skills),/model(switch the active model),/permissions,/extensions,/bootstrap, and/remember.text: Plain-text response on stdout. Useful for piping to other tools or shell scripts. Streams to a TTY by default and suppresses streaming when piped or redirected. Override with--streamor--no-stream.json: Newline-delimited JSON event stream covering messages, tool calls, tool results, and session lifecycle. Useful for programmatic integration.
Sessions
Otto persists every session to disk by default. Use --continue to resume the most recent, --resume to pick from an interactive list, or --session <path> to open a specific file. Session files are stored as JSONL at ~/.astro/otto/sessions/. Pass --no-session for ephemeral runs that don’t save history, which is useful in CI.
Headless mode flags
--output-schema (in text and json modes only) requires Otto to return a final answer matching a JSON schema. It accepts a raw JSON string or @path/to/file.json. --allowed-tools <names> restricts active tools to a comma-separated allowlist.
Model selection
Otto supports models from OpenAI, Anthropic, and Google through the Astronomer Gateway. The exact set available to your Organization is fetched at runtime.
In an interactive session, run /model to browse the current list and switch mid-session. To pin a model at launch or in headless modes, pass --model <id> and optionally --provider <name>. Run astro otto --list-models [search] to list what’s available from your shell.
Configuration
astro otto sets ASTRO_TOKEN, ASTRO_DOMAIN, ASTRO_ORGANIZATION, and the local AIRFLOW_* variables automatically. For the full list of environment variables, config files, and settings precedence, see Otto settings.