Flights: Agent-Native Ingest in Motherduck

gglanzani1 pts0 comments

Introducing Flights: Agent-Native Ingest in MotherDuckIntroducing Flights: agent-native ingestRead the announcement

START FREE

GO BACK TO BLOG

Introducing Flights: Agent-Native Ingest in MotherDuck<br>2026/06/10 - 4 min read<br>BYDoo Shim<br>,Miguel Miranda

GO BACK TO BLOG

Introducing Flights: Agent-Native Ingest in MotherDuck<br>2026/06/10 - 4 min read<br>BYDoo Shim<br>,Miguel Miranda

From raw data to answers in a single AI agent session, with Python flexibility and millisecond analytics in one pond.

The data stack is being rapidly deconstructed and remade for a new practitioner: AI agents. Agents don't query like humans–they require new interfaces, clear documentation, and highly performant infrastructure.

Today, we're introducing Flights, our agent-native data piplines feature in MotherDuck. With the MCP server and an AI agent of choice, you can build and deploy data pipelines in minutes using a flexible, general-purpose Python runtime. The combination of Flights and Dives in MotherDuck means that you can get from source data to answers in a single agent session–backed by serverless, sub-second analytics.

Ingesting data with Flights is powerful, and the use cases extend far beyond–run flexible transformations, call an LLM, replicate from an existing warehouse, ETL from SaaS APIs, and more.

It's an incredible time to build in data, and we're excited to deliver infrastructure that keeps pace with how modern users and their agents want to work.

Flights is currently in public preview. Get started in the documentation and see our Flight Plan templates for examples.

Or join us live on June 17 for a walkthrough.

Old duck, new interfaces<br>Data movement has been technically "solved" for a long time–it's only recently that modern data stack vendors delivered freedom from the brittle ETL code we used to live with. Customers got simple point-and-click UIs and durability, and the code got abstracted away.<br>In the agent era, code is the most important primitive. Agents doing data work need code-first interfaces to build effectively, and a flexible yet secure environment in which to operate.<br>We've taken this to heart with Flights, which support a growing list of agent-friendly interfaces while executing inside a general-purpose Python runtime. Anything you can pip install, you can build. Flights are tightly integrated with MotherDuck databases–they connect the Python runtime to your Ducklings (compute instances) using the DuckDB Python client.<br>Building Flights with the MCP server<br>Connect any MCP-capable agent (Claude, Cursor, ChatGPT, your own) to the MotherDuck MCP server and the agent gets the full Flights surface as tools: create, run, schedule, update, inspect logs, version, delete. It also gets get_flight_guide, a built-in instruction set, so the same prompt produces a working Flight whether it's the agent's first or hundredth.<br>The MCP server is also the interface for creating Dives, so a single chat can take a raw source through ingestion and into a live dashboard or data app. Secrets stay in MotherDuck and are injected into the Flight at runtime; your agent never sees them.

Using SQL table functions<br>Every Flight operation has a matching SQL table function. Create, run, schedule, list, inspect logs, version, delete: all of it is a SELECT away. Anything that speaks SQL can manage Flights: a DuckDB client, your BI tool, dbt, even another Flight.<br>The table functions make Flights accessible from wherever you, or your agents, are working. For example, create a Flight by calling MD_CREATE_FLIGHT with the Python source inline:<br>Copy code

SELECT * FROM md_create_flight(<br>name := 'daily_signups',<br>access_token_name := 'prod_token',<br>schedule_cron := '0 9 * * *',<br>source_code := $$<br>import duckdb

def main():<br>duckdb.connect("md:").execute("""<br>INSERT INTO analytics.signups<br>SELECT * FROM 'https://api.example.com/signups.json'<br>""")<br>$$<br>);

With the Flights UI<br>You can also manage Flights visually from within the MotherDuck UI. Write or paste in your Python code, set a schedule, and trigger Flight runs instantly.<br>The UI includes the same tools as the SQL table functions: logging, run history, versions, environment variables, and the requirements.txt file for your Python environment.

A real example: scheduled ingest with dlt<br>dlt is the recommended ingest library for Flights. It gives you a declarative pipeline with schema evolution, incremental loading, and a first-class MotherDuck destination. Pair it with a Flight schedule and you have a managed ingestion pipeline that runs on isolated MotherDuck compute.<br>Here is a single-file Flight that pulls public GitHub repository metadata and merges it into a MotherDuck table:<br>Copy code

import os<br>import dlt<br>import httpx

def repo_rows(repos):<br>for repo in repos:<br>response = httpx.get(f"https://api.github.com/repos/{repo}")<br>payload = response.json()<br>yield {"repo": repo, "stars": payload["stargazers_count"]}

def main():<br>os.environ.setdefault("HOME", "/tmp")<br>pipeline =...

flights agent motherduck data from flight

Related Articles