Otto tools

Labs
This feature is in Labs.

Otto uses several tools when working in an Astro project. This page covers what each tool does and how Otto uses it.

Tools are the primitive actions Otto takes, such as reading a file, running a shell command, or querying Airflow. For multi-step workflows that compose these actions into structured playbooks, such as Dag authoring or upgrades, Otto loads skills.

File and shell tools

Otto reads, writes, and edits files in your project, runs shell commands, and searches your codebase:

ToolDescription
readRead a file’s contents
writeCreate a new file or overwrite an existing one
editModify an existing file with targeted changes
bashRun shell commands
grepSearch file contents with regular expressions
findLocate files by name pattern
lsList folder contents

All file and shell tools are sandboxed to your project folder. Otto won’t write or edit files outside the project root.

af CLI

For Airflow state — Dags, runs, tasks, connections, variables, and health checks — Otto uses the af CLI, an open-source command-line wrapper for the Airflow REST API maintained in the astronomer/agents repository. The af CLI supports Airflow 2.x and 3.x with automatic version detection. When Otto is launched from an Astro project with a connected Airflow instance, AIRFLOW_API_URL is set automatically.

If no Airflow instance is connected, Otto can still inspect and edit local Dag code, but it doesn’t run af commands by default. To test against a local Airflow environment, start one with astro dev start or ask Otto to start it for you. Once it is detected, af commands become available.

Before creating or editing Dags, Otto checks your project’s requirements.txt and installed Airflow providers so it doesn’t suggest operators, hooks, or sensors that aren’t available in your environment.

The af CLI covers system health, Dag and run management, tasks, assets, connections, variables, instance management, and the provider registry, along with direct API access for endpoints not wrapped by a dedicated subcommand. For the full command reference, see the af CLI documentation in the astronomer/agents repository.

Example workflows

You interact with these tools by asking Otto questions in natural language. Otto selects and runs the appropriate af commands automatically.

Debug a failed Dag run

“The etl_orders Dag failed last night. What happened?”

Otto checks system health, looks for import errors, finds the failed run, reads task logs, and identifies the root cause. If the fix is a code change, Otto proposes the edit and validates it.

Explore an unfamiliar Dag

“Walk me through the customer_pipeline Dag — what does it do and how has it been running?”

Otto reads the Dag source, inspects its tasks and dependencies, checks recent run history, and summarizes the connections it uses.

Check upgrade readiness

“Which of my Dags would break if I upgrade to Airflow 3?”

Otto evaluates your Dags against Astronomer’s compatibility knowledge base and produces a prioritized list of changes needed, grouped by risk level. Available to Team, Business, and Enterprise tier customers.

Trigger and monitor

“Trigger the daily_etl Dag with config {'env': 'staging'} and tell me when it finishes.”

Otto triggers the run and monitors it until completion, reporting the outcome.

Automatic Dag validation

After Otto edits or creates a Dag file, it runs af dags errors to check for import errors when an Airflow instance is connected. If errors are found, Otto attempts to fix them in the same turn. If no Airflow instance is connected, Otto can still edit Dag files, but it can’t verify imports until you connect an environment or start a local one with astro dev start.

Astro CLI

Otto can use the Astro CLI through the bash tool for project-level operations. For example, Otto can run astro dev pytest to execute the tests in your project’s tests/ folder against your local Airflow environment. Any Astro CLI command available in your shell is available to Otto.