01duckdb.org
Agent Mode in the DuckDB CLI
DuckDB v2.0 CLI adds agent mode, automatically detecting AI coding agents and producing compact Markdown tables, explicit truncation markers, JSON errors, compact query plans, cost estimates, progress updates, and early query termination. In a Claude Code test answering 22 TPC-H questions, all 132 runs were correct while output tokens fell 59% (123.6k to 50.8k), though overall cost and runtime barely changed because system prompts dominated input. Explicit format flags and CLI settings override the mode.