|
This AIP proposes an opt-in, plugin-based AI Assistant for Apache Airflow that provides a conversational UI and a minimal backend API to answer user questions about Airflow.
Phase 1 is read-only: the assistant can only retrieve and explain information the authenticated user already has access to (e.g., Dags, runs, task instances, logs, configuration metadata), and it must not modify Airflow state.
Airflow, as a leading open-source platform for data engineering and orchestration, sits at the center of many production data platforms - coordinating critical pipelines, integrations, and cross-team dependencies.
As AI-assisted development and operations become mainstream, Airflow users increasingly expect to see productivity gains for operational debugging and day-to-day troubleshooting: faster root-cause analysis, clearer next steps, and reduced dependence on tribal knowledge. Several vendors and large deployments are already experimenting with AI-assisted debugging for orchestration systems, indicating clear demand in the ecosystem.
When things go wrong, the cost is paid in on-call time, delayed pipelines, and repeated tribal-knowledge debugging across Dag runs, task instances, logs, configs, and permissions.
Today, teams that want AI-assisted debugging in Airflow create ad-hoc, private integrations, or rely on paid solutions. This creates duplicated effort, inconsistent security controls, and uneven user experience across deployments.
An official, opt-in plugin provides a safe and consistent foundation for AI assistance: a standard UI entry point, a supported backend API surface, and a controlled way to connect tools via MCP (Airflow API, logs, metadata, etc.) so answers can be grounded in real system state. This proposal does not embed any specific model or vendor into core Airflow, but instead defines an extension point and UI surface that allows organizations to integrate AI capabilities according to their own policies.
Because Airflow already centralizes the key signals needed for debugging (Dag definitions, task metadata, run state, logs, configs, and RBAC), it is well positioned to benefit from “AI + tools” to reduce time-to-diagnosis and improve operational reliability, without requiring Dag authors to change their code.
The design must respect existing RBAC boundaries and ensure that any tool access is scoped to the current user’s permissions, preserving Airflow’s security model and minimizing data exposure risks.
Making this official lets the community define best practices around security, auditability, and rollout, so organizations can adopt AI debugging responsibly rather than reinventing it.
Moreover, by defining clear and supported extension points for AI integrations, Airflow becomes an attractive platform for experimentation and contribution from developers working in AI, observability, and tooling, strengthening the community and accelerating innovation around the project.
Today, troubleshooting Airflow issues often requires manually navigating between Dag definitions, task instances, scheduler/worker logs, configuration files, and external documentation. This diagnostic process can be slow and error-prone, particularly for new users or on-call responders who must piece together information from multiple sources.
While Airflow’s plugin infrastructure and public APIs support custom integrations for monitoring, logging, or secret backends, there is no standardized, secure way to integrate conversational assistants or tooling that can interpret and correlate Airflow state across these artifacts. As a result, teams experimenting with AI-assisted tools often build ad-hoc solutions with inconsistent security controls and uneven user experience, leading to duplicated effort and uneven risk handling.
Actionable AI-assisted insights require access to live Airflow state (run status, task logs, configuration) through a standardized, secure interface. No such interface exists today. Standardizing this integration surface reduces fragmentation across deployments, enables consistent security controls, and allows users to adopt AI assistance with predictable behavior. The opt-in, plugin-based approach aligns with Airflow's extensibility philosophy.
This AIP defines the first phase of an AI Assistance capability for Airflow.
Phase 1 includes a read-only assistant delivered as an opt-in plugin primarily focused on state-backed (grounded) assistance:
For general or exploratory questions (for example, “what does this error usually mean?”), the assistant MAY respond without performing tool-based grounding. When a response is produced without live Airflow state, the UI MUST clearly label it as not based on live system state.
Phase 1 does not require implementing a documentation ingestion/indexing pipeline. If the project later adds retrieval from Airflow documentation (RAG or equivalent), it SHOULD be proposed and scoped explicitly (either as a follow-up phase or a separate AIP, depending on impact).
Across all Phase 1 behavior:
The following capabilities are explicitly out of scope for this AIP:
Creation, modification, or deletion of Airflow objects.
Triggering or retrying Dag runs or task instances.
Automated remediation or execution of workflows.
Privilege escalation beyond the requesting user’s permissions.
Autonomous background execution or unsupervised actions.
Future enhancements may explore safe and permission-controlled state-modifying actions (e.g., create/update/delete operations). Such capabilities would require a separate AIP that defines:
Explicit permission models
Guardrails and confirmation mechanisms
Additional audit and safety controls
Operational impact analysis
No state-modifying capabilities are included in this proposal.
This section documents the key architectural decisions for the AI Assistant plugin design. Each decision establishes choices that have cascading implications throughout the AIP and implementation strategy. Rather than presenting alternatives as mere options, this section documents what was chosen, why, what trade-offs it introduces, and how those consequences shape other parts of the proposal.
Resolution: Deliver as a standalone plugin either in a separate repository or as part of airflow-core - not as part of the ai provider package.
Considered alternatives:
Rationale for standalone plugin vs. provider
Trade-off: Users cannot install the assistant via pip install apache-airflow-providers-ai . Instead, they use pip install apache-airflow[ai-assistant], which in turn installs the plugin.
Consequence: The assistant's lifecycle (versioning, security response, feature planning) is independent of Airflow's provider release schedule. This requires clear ownership and a documented SLA for security patches.
Resolution: Delivered as an optional plugin in a separate module/repository.
Considered alternatives:
Rationale for plugin approach:
Trade-off: Users who want the assistant must explicitly install and manage it; it is not included in standard Airflow distributions.
Consequence: Dependency management (see below).
Resolution: Use standardized MCP interface (as defined in AIP-91) to expose tool capabilities.
Considered alternatives:
Rationale for MCP approach:
Trade-off: MCP introduces an abstraction layer and an additional component (MCP tool service) that must be deployed and monitored. Performance is determined by the tool service's efficiency.
Consequence: The assistant is partially dependent on AIP-91's completion and stability. If AIP-91 is delayed or significantly redesigned, the assistant's tool integration timeline may shift.
Resolution: Use Pydantic AI to invoke LLM providers with structured request/response schemas.
Considered alternatives:
Rationale for Pydantic AI approach:
Trade-off: Adds Pydantic AI as a dependency required for the plugin to operate. While Pydantic is already in Airflow, pydantic-ai is a separate package.
Consequence: Users installing the assistant plugin must also install Pydantic AI. Version compatibility between Pydantic AI and Airflow must be managed explicitly (see packaging section).
Resolution: Separate assistant plugin package, versioned independently from core Airflow. The plugin may live either in a separate repository or as an independently-versioned package within the `apache/airflow` monorepo.
Considered alternatives:
Rationale:
Trade-offs:
- Requires explicit compatibility management with supported Airflow versions.
- Adds minor operational complexity for users installing the plugin.*
Consequences:
The assistant needs persistence for audit metadata and operational diagnostics when the feature is enabled.
Resolution: Plugin-managed schema and migrations, independent of core Airflow's Alembic chain.
Considered alternatives:
Core Alembic migrations:
Rationale:
The assistant is packaged independently, so core Alembic migrations are not a reliable mechanism.
Plugin-managed or self-contained schema control aligns with independent releases and keeps ownership boundaries clear.
Trade-offs:
Consequences:
Deployment managers must run plugin-specific migrations during install/upgrade.
The plugin must publish clear upgrade guidance and compatibility requirements.
This AIP introduces an official, opt-in AI Assistance capability for Airflow that enables users to ask natural-language questions about their workflows and receive grounded answers based on real Airflow state.
At a high level, this change introduces the usage of the following components (only when the feature is enabled):
The first phase of this capability focuses on read-only insights and explanations of Airflow state. Actions that modify state (create, update, delete) such as triggering runs, modifying tasks, or altering configurations are explicitly out of scope for the initial implementation and may be considered in a future phase once safe action patterns, permission controls, and guardrails have been established.
This design uses Airflow’s plugin infrastructure (custom UI and API extension points) to minimize core changes while providing a secure and extensible foundation for AI-assisted workflow insights.
To avoid confusion, unless defined explicitly, the implicit term "Provider" in this document refers to LLM Provider rather than Airflow provider. |
When enabled, the assistant appears as an embedded UI surface within the Airflow web interface (see Figure 1 for illustration).
The assistant operates in a conversational model:
Users submit natural-language queries.
Responses are generated in context of live Airflow state.
Each interaction is scoped to the current authenticated user.


Figure 1 - Illustrations of the assistant plugin UI
For each user query (see Figure 2):
The request is associated with the currently authenticated Airflow user.
The system evaluates the user’s RBAC permissions.
The assistant may invoke read-only tools to retrieve relevant Airflow state.
Retrieved data is filtered according to the user’s permissions.
The assistant generates a response grounded in tool outputs.
The response is displayed in read-only format.

Figure 2 - Query processing semantics diagram
The assistant never bypasses permission checks or accesses data unavailable to the requesting user.
In Phase 1, tool invocation MUST be controlled by the Assistant Backend, not by the model:
The model's output MAY include tool call suggestions (e.g., "retrieve Dag runs for Dag_id=X"), but these suggestions are treated as hints, not directives. The Assistant Backend MUST independently:
Validate the suggested tool against a configured allowlist.
Verify that the authenticated user has RBAC permission for the requested resource.
Enforce redaction rules, rate limits, and maximum query scope.
Execute or reject the tool call based on its own policy evaluation.
The model MUST NOT directly invoke tools, construct API calls, or determine execution order. The backend is the sole authority for tool execution.

The assistant must gracefully handle:
LLM provider timeouts
Rate limits
Tool invocation failures
Permission denials
Failure states must:
Not block the Airflow UI
Not affect scheduler or task execution
Display clear user-facing error messages

Each interaction is associated with the authenticated user identity and recorded according to audit policy. Detailed audit requirements, including record structure, redaction, and retention, are specified in [Security and controls > Auditability and Traceability].

Responses must:
If grounding fails or required tools are unavailable, the assistant must communicate this explicitly rather than hallucinate.
The assistant UI:
Follows existing Airflow UI conventions.
Does not obscure core UI functionality.
Provides indicators for backend & MCP connectivity.
Clearly communicates rate limits and errors.
Clearly distinguishes between facts retrieved from Airflow state and model-generated analysis or suggestions.
The assistant operates in a session-based conversational model:
The assistant backend is delivered as an Apache Airflow plugin by subclassing airflow.plugins_manager.AirflowPlugin.
The plugin uses supported Airflow 3.x extension points to:
Register a dedicated FastAPI application via fastapi_apps.
Optionally register a FastAPI root middleware for UI integration purposes.
No modifications to Airflow core modules are required.
The plugin can be installed or removed independently of core Airflow functionality.
Assistant API Surface
The plugin exposes a dedicated FastAPI application mounted under a stable URL prefix (e.g., /assistant).
The API surface is intentionally minimal and scoped to Phase 1 (read-only assistance):
GET /assistant/health
Provides readiness and configuration diagnostics (e.g., LLM configuration status, MCP reachability).
POST /assistant/chat
Accepts a user message and returns a structured assistant response.
Requests and responses are JSON-based and validated using explicit schemas to ensure predictable behavior and clear error reporting.
No state-modifying endpoints are exposed in Phase 1.
Configuration Model
The plugin relies exclusively on Airflow-native configuration primitives:
LLM credentials are resolved from an Airflow Connection.
Runtime settings (e.g., model selection, MCP endpoint URL) are configurable via Airflow configuration.
This ensures:
Consistency with existing Airflow secret management patterns.
No introduction of a parallel configuration system.
All configuration is explicit and required for enablement; the feature remains disabled by default.
LLM Invocation Model
The assistant backend uses Pydantic AI to invoke an LLM provider using structured request and response schemas, using the credentials provided from Airflow Connections. This ensures validated, predictable outputs and avoids reliance on ad-hoc parsing of model responses.
The abstraction layer allows support for multiple LLM providers without changing the plugin’s public API surface.
The backend constructs prompts, enforces redaction and permission boundaries prior to invocation, validates structured outputs, and returns normalized responses to the Airflow UI.
When enabled, the backend connects to an MCP-compatible tool service as defined in AIP-91.
Key properties:
Tool access is read-only in Phase 1.
Tool invocation occurs under explicit backend control.
Tool calls retrieve Airflow state through RBAC-enforced APIs.
State-backed assistance in Phase 1 depends on a properly configured and reachable MCP endpoint. If MCP is configured but unreachable, the assistant enters the "Enabled but Not Configured" state (see Feature States): the UI entry point MAY be shown with a clear diagnostic indicator, but no tool calls or grounded responses are served. If MCP is not configured at all and non-grounded mode is not enabled, the assistant MUST remain in the Disabled state.
Deployments may optionally enable a non-grounded mode as part of Phase 1. In this mode:
No live Airflow state is accessed.
Tool invocation is disabled.
Responses are limited to general Airflow knowledge or documentation-style assistance.
Responses must be clearly labeled as model-generated and not based on system data.
The UI must visually distinguish this mode from state-backed assistance.
Grounded and non-grounded modes must not be implicitly interchangeable, and the active mode must be clearly communicated to the user.
The assistant MUST enforce authorization on every request and tool call.
If an MCP Tool Service is used:
The assistant introduces persistence of audit metadata and operational diagnostics when the feature is enabled:
ai_assistant_* ).This feature introduces new integration points between Airflow and external systems. As such, it expands the overall security surface of an Airflow deployment. The following sections describe the primary risks and the controls required to mitigate them.
When enabled, the assistant may initiate outbound network requests to a configured external LLM provider. Misconfiguration or insufficient network controls could result in unintended data exposure or violations of organizational network policies.
The feature is disabled by default.
External LLM integration must be explicitly configured.
Approved LLM provider endpoints and credentials must be defined via Airflow Connections.
Network egress policies remain under the control of the deployment environment (e.g., firewall, proxy, or VPC controls).
The assistant may process operational signals such as Dag code, task logs, configuration metadata, and runtime context. These artifacts may contain secrets, access tokens, connection passwords, or personally identifiable information (PII).
The assistant must adhere to a data minimization principle, including only the fields necessary for the requested interaction.
An assistant operating on behalf of a user could inadvertently expose objects outside that user’s permissions, escalate privileges through tool misuse, or access metadata beyond the intended scope of the authenticated user.
All data retrieval performed on behalf of a user must be subject to Airflow’s role-based access control:
MCP tooling must not bypass RBAC protections. Tooling access should be mediated in ways consistent with how Airflow enforces resource-based permissions (e.g., Dag, TaskInstance, Log access) via authenticated API calls.
The assistant must not operate with elevated or system-level privileges. It must never grant higher access than the authenticated user’s role would ordinarily allow in the Airflow UI or API.
Privileged state must not be cached or reused across interactions. Stored or shared state across users must not be permitted unless it respects the originating user’s RBAC boundaries.
Each interaction must be evaluated independently against the authenticated user’s identity. The assistant must treat user identity as the sole authority for permission decisions.
The assistant must strictly inherit, and never expand, the permissions of the requesting user. It must never provide a user with access to data or operations they could not otherwise access through the Airflow UI or API under their assigned roles.
In addition to resource-level RBAC, access to the assistant UI/API MUST be gated by a dedicated permission. This allows operators to:
LLM-integrated systems are susceptible to prompt injection and manipulation via malicious free-text artifacts (e.g., logs, comments, task output). Without safeguards, such content could be leveraged to influence the assistant’s behavior, attempt to override system instructions, or expose unauthorized data.
Tool invocation must be explicitly controlled by the plugin backend.
The model must not autonomously determine which internal tools to call or what data to request; all tool calls must be initiated and authorized by backend logic.
System prompts and interaction scaffolding must enforce strict behavioral boundaries.
Prompt templates must explicitly constrain:
Read-only semantics
Disallowed operations
External communication policies
All retrieved content must be treated as untrusted input.
Logs, configuration text, and other free-text artifacts must not be interpreted as executable instructions or as directives to change assistant behavior.
Sensitive system instructions must not be surfaced to the model or rendered in user responses.
System instruction text used internally to constrain model behavior must not be exposed in output visible to end users.
The assistant must not infer or execute control logic from untrusted content.
Model outputs must be validated against expected structure and semantics; the assistant must not treat model suggestions as operational directives unless explicitly authorized.
Without structured auditing, misuse, misconfiguration, or unintended data exposure may go undetected and difficult to investigate.
Every assistant interaction must be associated with the authenticated user identity.
Each interaction must be timestamped and persistently recorded in a structured audit log stored within the Airflow metadata database.
Audit records must capture sufficient metadata to support investigation, including:
Requested action,
Audit persistence must respect configured redaction policies.
Retention policies for assistant audit records must be configurable.
These controls ensure accountability and enable operational review, incident response, and compliance verification.
External LLM provider instability, high latency, or rate limiting could degrade assistant responsiveness or, if improperly integrated, introduce cascading failures into core Airflow components.
The assistant backend operates within the Airflow webserver context and must not run within scheduler or executor processes.
Assistant failures must not impact scheduler execution, task execution, or overall Airflow availability.
LLM and tool invocations must be subject to configurable timeouts and retry limits to prevent blocking behavior.
Assistant logic must not block, delay, or interfere with core scheduling, execution, or metadata database operations.
The assistant must remain operationally isolated from scheduler and executor components, both logically and at the process level.
The following MUST always hold:
Rationale: Airflow cannot guarantee that arbitrary user-controlled content (e.g., task logs) never contains secrets. Therefore the system MUST enforce best-effort redaction and MUST prohibit transmission of known sensitive sources by construction.
This feature adds a new integration surface area. Documentation should clearly describe provider-side limits and behaviours, and - where feasible - Airflow should expose corresponding configuration controls (such as client-side timeouts and retry policies) to help operators manage dependencies on external services and reduce the impact of provider rate limits on Airflow stability.
The initial implementation phase is an integration framework and a minimal assistant UX; it is not a fully autonomous expert system and should not be relied upon for automated remediation without explicit operator verification.
The assistant has three operator-visible states:
404 (or 403 ) and MUST NOT attempt external calls{"llm_configured": false, "mcp_reachable": false, "mode": "grounded"} ) to aid troubleshooting, without leaking secrets or credentials.Reliability Controls
Cost Observability
LLM API calls incur direct cost (typically per-token). The assistant backend SHOULD expose basic usage metrics (e.g., total tokens consumed, requests per user, requests per time window) via Airflow's existing metrics/logging infrastructure. Administrators MAY use these metrics to set budgets or alerts. Detailed cost management is out of scope for Phase 1 but the metric surface SHOULD be designed to support it.
Repository location: The assistant is delivered as a standalone plugin package, either:
apache/airflow-ai )apache/airflow monorepo.Versioning: The plugin is versioned independently from core Airflow.
Compatibility matrix: The plugin publishes supported Airflow versions and maintains a compatibility policy.
Release cadence and ownership: The plugin has its own release cadence and explicit ownership/maintenance responsibilities.
Dependency management: The plugin declares its own dependencies (including pydantic-ai ) in its pyproject.toml . Users should install the plugin using apache-airflow[ai-assistant] .
Security surface expansion
Enabling AI assistance introduces outbound network egress and a new integration surface for accessing operational metadata. Although mitigated by RBAC enforcement, redaction, audit logging, and default-off behavior, the feature increases overall system complexity and security review scope. Organizations with strict data handling requirements may choose not to enable it.Operational complexity
The assistant introduces additional configuration and runtime considerations, including external LLM provider management, rate limits, timeouts, and monitoring. While isolated from core scheduling and task execution, it adds components that deployment managers must configure and operate when the feature is enabled.
Maintenance burden
This feature increases long-term maintenance overhead across UI, backend, MCP integration, and provider compatibility. Ongoing testing of security boundaries, API stability, and cross-version compatibility will be required. Clear ownership of interface contracts is essential.
Dependency on MCP implementation (AIP-91)
The assistant depends on the MCP tooling surface defined in AIP-91. Changes or delays in that interface may impact implementation timelines or require adaptation. This introduces cross-AIP coordination requirements.
By default (feature disabled)
When enabled (opt-in)
A feature enable flag (e.g., `AIRFLOW__AI__ENABLED` or equivalent plugin configuration).
LLM provider credentials and endpoint (e.g., API key, URL) stored via an Airflow Connection.
The MCP tooling service endpoint and credentials, according to AIP-91, which the plugin backend uses to securely retrieve Airflow state.
A database migration must be applied to create required AI-related tables (e.g., audit logs).
The MCP tooling service must be reachable from the plugin backend.
Enabling the feature changes the system's security posture and requires documented guardrails.
What is the level of migration effort (manual and automated) needed for the users to adapt to the breaking changes?
The migration strategy depends on the chosen packaging model (see Database Schema and Migration Scope). Under the recommended packaging model (Option 3 — separate repository), database schema changes are managed by the assistant plugin's own migration mechanism, not by core Airflow's Alembic chain. Users must run the plugin's migration tooling after installation or upgrade. The plugin's documentation MUST provide clear upgrade instructions.
This AIP is considered complete when the following criteria have been satisfied for the first phase (read-only AI-assisted insights):
Functional completeness
Security and controls
Configurability and operational behavior
Quality assurance (QA)
Optional (non-gating) system tests MAY be documented for deployment administrators who want to validate their configured LLM integration and tool service in their own environment.
Documentation
Distribution and Release Readiness
The packaging, repository location, and release model for the assistant feature (e.g., inclusion in apache/airflow or a separate official repository under the Airflow project) are defined and approved.
Versioning and compatibility expectations with supported Airflow 3.x releases are documented.
Ownership and maintenance responsibilities are clearly defined.
Once all of these criteria are met, the feature in its first phase (read-only AI assistance) can be considered done and ready for adoption with production usage expectations.