DagSmith
A visual, block-based DAG editor for Apache Airflow 3 — right inside the Airflow UI.
DagSmith is an Airflow plugin (Airflow ≥ 3.1) that adds a full DAG editor to the Airflow web UI:
- 🧱 Visual editor — build DAGs from blocks: drag operators from a searchable
palette onto a canvas, connect them with dependency edges (tasks and TaskGroups),
configure parameters in typed forms (key:value editors for dicts, a rich-text editor
for HTML fields, connection pickers for
conn_ids, a cron builder for schedules). - ✍️ Code editor — edit the
.pyfiles in CodeMirror with syntax and import validation before anything is deployed. - 🔁 Two-way sync, code is the source of truth — canvas edits are applied to your
file as minimal, surgical changes (via libcst);
comments and formatting you didn't touch stay byte-for-byte identical. Editing the
code updates the canvas. Dynamic constructs (loops,
.partial().expand()) appear as code-only blocks instead of breaking the parser. - 🧰 Auto-generated operator palette — installed provider packages are introspected
(operators, sensors, their
__init__signatures across the class hierarchy), so hundreds of blocks with typed parameter forms appear without any manual definitions. - 💾 Draft → Deploy — work-in-progress is saved as versioned drafts in the Airflow
metadata database (with autosave, history, diffs and restore). The live
.pyfile changes only when you hit Deploy, after validation, with a backup and conflict detection. The scheduler never sees half-finished work. - 👥 Teams — give each team a directory in a DAG bundle and a git repository: members-only editing, per-DAG reassignment by admins, team-tagged DAGs, and a Commit & push button (GitHub/GitLab) plus optional push-on-deploy.
- 🔒 Safety by default — deploy is disabled until explicitly enabled, all endpoints are authorized through the Airflow Auth Manager, user code is only ever executed in an isolated subprocess, every path is confined to the bundle root, and every deploy is audit-logged.
Demo
Requirements
| Component | Version |
|---|---|
| Apache Airflow | ≥ 3.1 (uses the react_apps + fastapi_apps plugin APIs; no Airflow 2.x support) |
| Python | ≥ 3.10 |
| Metadata DB | PostgreSQL recommended (DagSmith stores drafts in its own dagsmith_* tables) |
| File access | to deploy, the Airflow api-server needs write access to the DAG bundle directory; working on drafts needs no file access at all |
Installation
pip install airflow-dagsmith # in the environment running the Airflow api-server
The plugin registers itself via the airflow.plugins entry point — don't copy anything
into $AIRFLOW_HOME/plugins. After restarting the api-server, DagSmith appears in
the Airflow navigation. Its dagsmith_* tables are created automatically on startup
(or run python -m dagsmith db upgrade manually).
Enabling deploy
For safety, writing .py files is off by default — without it DagSmith works in
read-and-draft mode. Enable it consciously:
[dagsmith]
deploy_enabled = True
# optional hardening / team split:
# editors = data-platform-team # who can create and edit drafts
# deployers = admin # who can write .py files
# admins = admin # who manages teams
# git_commit = True # commit to the bundle checkout on deploy
(or AIRFLOW__DAGSMITH__DEPLOY_ENABLED=True etc.)
⚠️ Security note: deploying DAGs from the UI is equivalent to executing arbitrary code in your Airflow environment — exactly like shipping a DAG file any other way. Enable
deploy_enabledonly with proper access control on the Airflow UI. Import validation executes the file's top level in an isolated, time-limited subprocess.
How it works
Airflow UI ─▶ react_app "DagSmith" (React Flow canvas + CodeMirror)
│ REST /dagsmith/api/v1 (Airflow JWT)
▼
FastAPI app inside the api-server
│ parse (libcst) / codegen / validation (subprocess)
┌────────────┴────────────┐
Save / autosave Deploy (validated)
▼ ▼
Airflow metadata DB .py files in the DAG bundle
(draft versions, (atomic write, backup,
canvas layout) conflict detection, git)
Three tiers of support for existing code:
- DAGs created in DagSmith — full visual editing with remembered layout.
- Typical hand-written DAGs (
with DAG(...),@dag,@task,>>,chain(), nested TaskGroups, edgeLabels) — full visual editing without touching your formatting. - Dynamic constructs (task-generating loops,
.expand()) — shown on the canvas as read-only blocks, editable in the code view.
Development
pip install -e ".[dev]"
pytest # backend (incl. byte-exact round-trip corpus)
cd frontend && npm install
npm run build # UMD bundle -> src/dagsmith/static/
npm test && npm run lint
The frontend follows Airflow's AIP-68 react-plugin contract (single UMD bundle, host provides React); everything ships inside the bundle — no CDNs.
Support the project
If DagSmith saves you time, you can buy me a coffee ☕
License
Metadata
Release files for airflow-dagsmith 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| airflow_dagsmith-0.2.0.tar.gz | 477.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| airflow_dagsmith-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 875.7 kB
Release files / airflow_dagsmith-0.2.0.tar.gz
| Download URL | airflow_dagsmith-0.2.0.tar.gz |
|---|---|
| Size | 477.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4b47c236e5b8a8384d4fb36621f860acb59b8d94c35b5202de2d4552ca5b269b
|
|
BLAKE2b-256 checksum How to use checksums |
b8b6055e0374488ece4e74ce6831a6940e7d27322421341960daed5171702582
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency logRelease files / airflow_dagsmith-0.2.0-py3-none-any.whl
| Download URL | airflow_dagsmith-0.2.0-py3-none-any.whl |
|---|---|
| Size | 398.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aacf79c655d0b6e6447e42e1ee7fed69bc2deeb624a5870c6a3c3f64187c4c1c
|
|
BLAKE2b-256 checksum How to use checksums |
f4ccfaf2b601ee6c3ed0e541b007d5599e84a7cca1e46b93376b1ae6b4c2dbf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency logSecurity for airflow-dagsmith 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for airflow_dagsmith-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.