Skip to main content

Overview

Tool Name

Purpose

The airflow_tools group lets Genesis Data Agents inspect DAGs, review runs and task failures, fetch task logs or DAG source, pause or unpause DAGs, and trigger new runs through the Airflow REST API. Genesis exposes Airflow as first-class tools such as airflow_config, airflow_list_dags, and airflow_trigger rather than a single catch-all action tool. Airflow lineage scans also add DAG schedule, source-file, repository execution, and owner-principal context to the Digital Twin and Context Graph.

Connection Requirements

Create an Airflow, Astronomer, or Amazon MWAA connection in Config -> Connections under Data Pipelines before using these tools. All three connection types use the same airflow_tools group.

Classic Airflow (username/password)

Astronomer Cloud (API token)

Amazon MWAA (IAM)

Genesis calls the environment’s Airflow REST API through the MWAA InvokeRestApi API with IAM credentials, so a private webserver works without network access to its VPC. Choose the Assume Role, Access Key, IAM Role (IRSA / Pod Identity), or Snowflake Workload Identity (keyless) mode. The first three take the AWS credential fields of that mode plus: The Airflow version is read from the environment, so there is no version field. The IAM policy the role needs is on the Connections page. On a Snowflake Native App, Snowflake Workload Identity (keyless) uses a Snowflake workload identity secret instead of a stored AWS key. Provide the role ARN and fully qualified secret name, with an optional role session name. See the MWAA connection setup for the secret grants and IAM trust policy.
Set a user or role default on one Airflow, Astronomer, or Amazon MWAA connection if you want the tools to use it automatically when connection_id is omitted. For tools that expose connection_id, pass the saved connection name to override the default. Use airflow.<name>, astronomer.<name>, or mwaa.<name> when you want to be explicit about the connection type.
Airflow tools read credentials only from saved Airflow, Astronomer, or Amazon MWAA connections. They do not fall back to legacy shared entries, local ~/.genesis/airflow_config.json, or AIRFLOW_* environment variables.
airflow_config(action="GET") and airflow_config(action="TEST") use the requester-aware scoped default Airflow, Astronomer, or Amazon MWAA connection. If more than one of those types has a scoped default for the caller, specify connection_id on other tools (for example astronomer.production) or clear the extra defaults before using the config tools. Inline base_url, username, and password values are no longer accepted.

Function Reference

Genesis injects bot_id, user_id, and thread_id automatically. The tables below list only the user-supplied parameters.

Connection and Discovery

Run and Failure Inspection

Task Inspection

Control

Usage Examples

Notes and Limitations

  • airflow_config(action="GET") returns the saved deployment URL, username, home, and DAG path for classic Airflow connections, and masks the password in the response. Astronomer connections expose the deployment URL only (no username/password fields). Amazon MWAA connections expose the environment name and region, never the AWS credentials.
  • Tools that accept connection_id resolve airflow.<name> against Airflow connections, astronomer.<name> against Astronomer connections, and mwaa.<name> against Amazon MWAA connections. A bare name (for example production) resolves against Airflow connections only. When connection_id is omitted, Genesis uses the caller’s single scoped default among the three types. If more than one type has a scoped default, Genesis returns an error until you pass connection_id.
  • On Amazon MWAA, task logs come from the CloudWatch Logs group airflow-<environment-name>-Task, and airflow_get_failed_tasks is one query returning at most 100 task instances. Results carry no Airflow UI links.
  • start_date, end_date, and logical_date should be ISO 8601 strings.
  • airflow_dag_source tries the Airflow API first. When local fallback is enabled, it looks in dags_path or home/dags.
  • If the API has no source and local fallback is disabled or finds no file, airflow_dag_source returns an unsuccessful result with any available source pointers: filepath, link, and note.
  • DAG and run inspection tools add dag_url, run_url, or both when Genesis can derive the Airflow UI link from the saved connection and version.
  • Tools that do not expose connection_id, such as airflow_config and airflow_dag_source, use the caller’s single scoped default among Airflow, Astronomer, and Amazon MWAA connections.

Troubleshooting

  • Open Config -> Connections, choose Data Pipelines, and create an Airflow, Astronomer, or Amazon MWAA connection.
  • Set a user or role default on one saved connection if you want the tool group to work without connection_id.
  • If an in-chat error says Settings -> Connections, use the same Connections page shown in the Config UI.
  • Clear the user or role default on the extra connections, or pass an explicit connection_id such as airflow.production, astronomer.production, or mwaa.production.
  • Genesis does not pick between two scoped defaults automatically.
  • For classic Airflow, confirm host, username, password, and version are populated.
  • For Astronomer, confirm host (deployment URL) and api_token are populated and version matches the deployment (2 or 3).
  • For Amazon MWAA, an “access denied” error means the IAM identity lacks airflow:InvokeRestApi or airflow:CreateWebLoginToken on the environment’s Airflow role; a task-log error that names logs:GetLogEvents means it cannot read the airflow-<environment-name>-Task log group. “Was not found” means the environment name or region is wrong.
  • Run Test Connection in the Connections UI, then retry airflow_config(action="TEST").
  • If your password or API token comes from a secret reference, verify the acting user and agent can resolve that secret.
  • Pass the saved connection name with a type prefix, for example airflow.production, astronomer.production, or mwaa.production.
  • A bare name such as production resolves only against Airflow connections.
  • Legacy shared Airflow entries are ignored by the current Airflow tools.
  • Set DAGs Path on the saved Airflow connection when Genesis can access the DAG files directly.
  • If you leave DAGs Path blank, set Airflow Home so Genesis can try home/dags.
  • If Genesis cannot reach the Airflow host filesystem, use the API-backed source path instead of local fallback.
  • Confirm the task has already started or completed in Airflow.
  • Retry with full_content=True when you need the full log body.
  • If the task retried, pass the matching try_number to inspect the same attempt shown in the Airflow UI.