LabscoConnect MCP ↗
astronomer logo✓ Official★ 397

airflow-adapter

Airflow 2 and Airflow 3 answer requests differently, and this is the translation layer inside this codebase that hides the difference and picks the right one by itself.

by astronomerpart of astronomer/agents

One of 35 skills in the astronomer/agents package — works on its own, and pairs well with its siblings.

WHEN YOUR AGENT SHOULD USE IT

A QUICK BOUNDARY

USE FOR

  • Add a new API call that needs to work against Airflow 2.x and 3.x alike.

Documents

This is the playbook your agent receives when the skill activates — you don't need to read it to use the skill, but it's here to audit before installing.

Airflow Adapter Pattern

Enables compatibility with both Airflow 2.x (/api/v1) and 3.x (/api/v2).

Architecture
MCP Tool → _get_adapter() → AirflowV2Adapter or AirflowV3Adapter → Airflow API

Version is auto-detected at startup.

Key Files
  • adapters/base.py - Abstract interface
  • adapters/airflow_v2.py - Airflow 2.x (/api/v1)
  • adapters/airflow_v3.py - Airflow 3.x (/api/v2)
Related Files
  • @api-differences.md - V2 vs V3 field/endpoint differences
  • @patterns.md - Implementation patterns
Quick Reference
adapter = _get_adapter()
dags = adapter.list_dags(limit=100)
run = adapter.trigger_dag_run("my_dag", conf={"key": "value"})

Installation

Copy & paste — that's it
npx skills add astronomer/agents --skill "airflow-adapter" --full-depth

Run this in your project — your agent picks the skill up automatically.

BEFORE IT WILL WORK

Nothing — it works as soon as it is installed.

License

Licensed under Apache-2.0— you can use, modify, and redistribute it under that license's terms.

View the full license file on GitHub →