Airflow Summit 2026 is coming August 31 - September 2 in Austin, TX. Register now to secure your spot!

Examples

Every operator, decorator, and integration in this provider has a runnable Dag under example_dags. This page groups them by scenario. Guides embed the same Dags inline where a step-by-step walkthrough exists; the rest are linked directly to source below.

New to the provider? Start with Common AI Operators to pick an operator, then come back here for a worked example of the pattern you need.

Single-prompt tasks

Guide

What it shows

LLMOperator

@task.llm for text, structured output, classification, and dynamic task mapping over LLM results (example_llm.py, example_llm_classification.py, example_llm_analysis_pipeline.py).

LLMBranchOperator

@task.llm_branch picking which downstream task runs.

LLMFileAnalysisOperator & @task.llm_file_analysis

@task.llm_file_analysis reasoning over files, images, and PDFs.

LLMSchemaCompareOperator

@task.llm_schema_compare comparing two schemas with an LLM.

LLMSQLQueryOperator

@task.llm_sql generating SQL from a natural-language question.

Agents & tools

Guide

What it shows

AgentOperator & @task.agent

AgentOperator / @task.agent multi-turn tool use, durable execution, and pydantic-ai capabilities (example_agent.py, example_agent_durable.py, example_agent_capabilities.py).

Toolsets

Loading SKILL.md Agent Skills (example_agent_skills.py), allow-listed AWS API access via AWSToolset (example_aws_toolset.py), and exposing an Airflow toolset to a LangChain agent, the reverse bridge (example_langchain_toolset_bridge.py).

MCP Server Connection

Connecting an agent to an MCP server through an Airflow connection.

Human-in-the-Loop (HITL) Review For Agentic Operators

Adding a human-in-the-loop review gate to agent output.

example_langchain_tool_agent.py

A LangChain ReAct agent that decides its own tool calls, composed with LLMOperator for report formatting and AIP-90 HITL review.

Retrieval & document processing

Guide

What it shows

DocumentLoaderOperator

Parsing PDF, DOCX, CSV, and JSON into list[dict] for embedding.

PydanticAIHook

Calling PydanticAIHook and a pydantic-ai Agent directly.

LangChainHook

LangChainHook chat-only, embedding-only, and combined patterns.

LlamaIndexHook

LlamaIndexHook plus the embedding and retrieval operators.

End-to-end scenarios

Production-shaped Dags that combine several of the patterns above into one pipeline. See End-to-End Pipelines for the architecture behind each one.

Example

What it shows

example_llamaindex_rag.py

Three RAG shapes with LlamaIndex: a single load-embed-retrieve-answer Dag, a production-shaped split into scheduled indexing plus on-demand query Dags, and multi-source RAG.

example_llamaindex_10k.py, example_langchain_10k.py

SEC 10-K financial analysis against live EDGAR filings: one Dag indexes filings on a schedule, the other decomposes a comparison question at runtime and fans out retrieval with Dynamic Task Mapping. One variant per RAG library.

example_llm_survey_analysis.py

Natural-language querying of a CSV via LLMSQLQueryOperator and AnalyticsOperator, interactive and scheduled variants.

example_llm_survey_agentic.py

The same survey data, analyzed by fanning a multi-dimensional research question into an agentic multi-query synthesis pipeline.

example_aip_progress_tracker.py

The same use case – tracking Airflow Improvement Proposal progress – solved two ways, a deterministic pipeline and an autonomous agent, to compare the tradeoff.

Reliability

Guide

What it shows

LLM Retry Policies

Classifying task failures with an LLM to decide retry, fail, or delay. Source: example_llm_retry_policy.py.

Was this entry helpful?