Agents can sign up for MotherDuck

We want to make MotherDuck the most agent-friendly data warehouse in the world, and that includes giving agents themselves the ability to sign up. Agents can now sign up for MotherDuck directly–getting a database, storage, and compute for proofs-of-concept, data sharing, and long-running analytical tasks.

With our new signup API, an agent can provision a MotherDuck account, build a data pipeline using our hosted Python runtime (Flights), run sub-second analytical queries, and visualize results (Dives). All this, of course, in addition to the flexibility and power of using local DuckDB.

Our friends at dlt have been testing the signup API, using an agent to connect dlt pipelines to a MotherDuck warehouse. Co-founder and CEO Matthaus Krzykowski says: “The part we liked most is what the API doesn't give the agent: no credentials, no shell, no network. So an agent only ever writes the dlt pipeline logic - MotherDuck's create-account API handles provisioning a real warehouse and owns everything sensitive.”

TIP: Webinar: Beyond Copilots — building a data stack live with AI agents

Join us, dlt, and Lightdash on August 18 as we build a working data stack live with AI agents – ingestion, warehouse, and BI. Save your seat →

Get started by asking your agent to: Fetch https://new.motherduck.com – batteries included.

Here’s an example of how it works!

From prompt to warehouse

Let’s start in a new agent session. We’re using Claude Code here on auto mode, but any common agent harness will work similarly – Mehdi’s companion post replays a full agent session step by step.

“Fetch new.motherduck.com and get yourself a data warehouse. Query yesterday's GitHub star events from GH Archive – which AI agent frameworks are trending?”

The agent accesses a webpage with markdown-formatted instructions to send a POST request: curl -X POST https://new.motherduck.com. The request itself is simple and empty: no headers, body, or auth. The request returns a JSON object with the following fields:

  • motherduck_token: a read/write token for the new MotherDuck organization
  • claim_org_url: a one-time-use URL for a human user to claim the organization
  • how_to_use_motherduck: a plain-text quick start guide
  • region: the cloud region of the new organization (aws-us-east-1 only for now)

With the prerequisites and some instructions, the agent can get to work: stashing the token and connecting to MotherDuck using the DuckDB CLI as a thin client. Of course, we’ll need to rotate our token before getting anywhere near real data, as the agent has accessed it directly.

Then, our agent can start fetching our data. After exploring GitHub public APIs, a CTAS query against GH Archive can create a table of GitHub star events. On a Pulse duckling (MotherDuck’s smallest compute instance), it takes about three seconds.

Copy code

CREATE OR REPLACE TABLE star_events AS SELECT id AS event_id, repo.name AS repo, actor.login AS actor, created_at::TIMESTAMP AS starred_at, date_trunc('hour', created_at::TIMESTAMP) AS hour, repo.name IN ('browser-use/browser-use', 'openai/codex', 'anthropics/claude-code' /* + 5 more */) AS is_agent_framework FROM read_json( ['https://data.gharchive.org/2026-08-04-0.json.gz', /* ...22 more hourly files... */ 'https://data.gharchive.org/2026-08-04-23.json.gz'], columns={id: 'VARCHAR', type: 'VARCHAR', repo: 'STRUCT(id BIGINT, name VARCHAR, url VARCHAR)', actor: 'STRUCT(id BIGINT, login VARCHAR)', created_at: 'VARCHAR'}, format='newline_delimited', compression='gzip', ignore_errors=true) WHERE type = 'WatchEvent';

Simple, but handy! We’re clipping a bit here for brevity, and not trying to fetch everything, but you get the idea.

The analysis was just as quick – star totals, hourly velocity, and peak hour in a quarter of a second:

Copy code

SELECT repo, count(*) AS total_stars, round(count(*) / 24.0, 3) AS stars_per_hour, arg_max(hour, cnt) AS peak_hour, max(cnt) AS peak_hour_stars FROM (SELECT repo, hour, count(*) OVER (PARTITION BY repo, hour) AS cnt, is_agent_framework FROM star_events) WHERE is_agent_framework GROUP BY repo ORDER BY total_stars DESC;

Copy code

┌─────────────────────────────────────┬─────────────┬────────────────┬─────────────────────┬─────────────────┐ │ repo │ total_stars │ stars_per_hour │ peak_hour │ peak_hour_stars │ │ varchar │ int32 │ decimal(4,3) │ timestamp │ int32 │ ├─────────────────────────────────────┼─────────────┼────────────────┼─────────────────────┼─────────────────┤ │ firecrawl/firecrawl │ 8 │ 0.333 │ 2026-08-04 06:00:00 │ 2 │ │ Panniantong/Agent-Reach │ 4 │ 0.167 │ 2026-08-04 08:00:00 │ 2 │ │ TencentCloud/TencentDB-Agent-Memory │ 4 │ 0.167 │ 2026-08-04 17:00:00 │ 1 │ │ obra/superpowers │ 4 │ 0.167 │ 2026-08-04 07:00:00 │ 1 │ │ farion1231/cc-switch │ 3 │ 0.125 │ 2026-08-04 00:00:00 │ 1 │ │ browser-use/browser-use │ 2 │ 0.083 │ 2026-08-04 03:00:00 │ 1 │ │ openai/codex │ 1 │ 0.042 │ 2026-08-04 10:00:00 │ 1 │ │ anthropics/claude-code │ 1 │ 0.042 │ 2026-08-04 14:00:00 │ 1 │ └─────────────────────────────────────┴─────────────┴────────────────┴─────────────────────┴─────────────────┘

Building agent-driven data pipelines

The one-time CTAS is great, but what if we wanted to append fresh data each day to inform our analysis? With the MotherDuck token in hand, we can direct the agent:

“Package that query as a Flight so we can re-run it on MotherDuck.”

Flights are Python programs that run on MotherDuck's hosted runtime, on demand or on a cron schedule. You can run virtually any pip-installable Python code. Here, the agent wrote a few lines of Python around the same SQL – tweaked to append only the hours it hasn't seen yet – and registered it with the token it already had. The agent is using the DuckDB Python client here, but could just as easily refactor to use dlt or another Pythonic framework.

MotherDuck injects credentials into the Flight at runtime, so the agent writes the logic and never touches a secret:

Copy code

# main.py – runs on MotherDuck's hosted Python runtime from datetime import datetime, timedelta, timezone import duckdb def main(): con = duckdb.connect("md:") # token injected at runtime last = con.sql("SELECT max(hour) FROM my_db.star_events").fetchone()[0] urls = gharchive_urls(since=last) # every complete hour we haven't ingested yet con.execute(f""" INSERT INTO my_db.star_events SELECT id, repo.name, actor.login, created_at::TIMESTAMP, date_trunc('hour', created_at::TIMESTAMP), repo.name IN (...) FROM read_json({urls}, ...) WHERE type = 'WatchEvent' AND id NOT IN (SELECT event_id FROM my_db.star_events) """) if __name__ == "__main__": main()

One run later: exit code 0, ten seconds, 797 new star events appended. And if we want it running every day instead of on demand, scheduled Flights are available on the Business plan.

Once we’re ready to persist our work, or share data with a colleague, we can access the claim_org_url to take ownership of the agent’s MotherDuck organization. Total human effort: three short prompts and one email address.

Happy (agent) querying!

Subscribe to motherduck blog

PREVIOUS POSTS

OpenAI Just Made Analytics 10x Cheaper

2026/08/01 - Jacob Matson, Alex Monahan

OpenAI Just Made Analytics 10x Cheaper

Since OpenAI slashed the price of GPT 5.6 Luna by 80% this week, low latency AI-powered answers are finally feasible for less than half a penny per answer, AI and DB costs included. For data questions, GPT 5.6 Luna is intelligence too cheap to meter. Well documented context, rigorous evals, and a fast analytical engine are now the determining factors.