cd /news/ai-agents/introducing-polars-cli · home › topics › ai-agents › article
[ARTICLE · art-179515] src=pola.rs ↗ pub= topic=ai-agents verified=true sentiment=↑ positive

Introducing Polars CLI

Polars released the `polars` command-line tool, a compiled Rust binary that runs SQL directly on local and remote files through the Polars query engine with no Python interpreter required. The CLI is designed for agentic workloads, returning exit code 0 on successful queries and Rust-style errors with hints, such as suggesting LENGTH when a query uses the unsupported function 'len'. The initial release supports the same native local and remote files as Python Polars, with Delta Lake, Iceberg, Excel and database scanning planned for later releases; it installs via `uv tool install polars-cli` or GitHub releases.

key takeaway

Agents can query files with the `polars` CLI's SQL engine without Python, relying on exit code 0 for success and hint-bearing errors like 'use LENGTH instead' to self-correct without reading docs.

read2 min views4 publishedDec 1, 2026
Introducing Polars CLI
Image: Pola (auto-discovered)

Last months we have made a large leaps in SQL support in Polars. As we recognize that agentic workloads are becoming more dominant, we want to expose our engine to those workloads. LLM’s are great at SQL and we have a great engine that agents should benefit from. As SQL doesn’t require a host language (as opposed to DataFrames), it is perfectly suited for a CLI. So today we are releasing the polars command-line tool that runs SQL on files with the Polars query engine. No Python required, no server, just fast answers.

Polars CLI and design for agentic workloads #

Besides humans, CLI’s have become the defacto interface for agents. The polars CLI is designed with this purpose in mind. We want to reduce iterations, startup time and tokens. For this a few things are important:

  • Model iterations/ turns; Every iteration costs model time and execution time of Polars often dwarfs that, especially for local files.
  • Informative error messages (inspired by Rust); Errors point at the mistake and add a hint, such that the next iteration will lead to a correct query without needing to defer to documentation. And exa
  • Documentation is available in the CLI itself, under --help you can find working examples and function lists.
  • Successful queries are indicated immediately with an exit code 0. This means the agent doesn’t have to verify success.
  • No Python required on boot. The polars CLI is a compiled rust binary that has super fast boot times. Most queries we can execute without any Python callbacks and thus no Python interpreter penalty.

Examples #

Let’s go through a few examples. For query exploration we have discovery operations lile `“DESCRIBE”.

$ polars --format csv -c "DESCRIBE 'foods.csv'"
column_name,column_type
category,VARCHAR
calories,BIGINT
fats_g,DOUBLE PRECISION
sugars_g,BIGINT

After the schema of a file is known, we can immediately compute the summaries we are interested in.

$ polars --format csv -c "SELECT category, count(*) AS n, avg(calories) AS avg_calories FROM 'foods.csv' GROUP BY category ORDER BY n DESC, category"
category,n,avg_calories
seafood,8,156.25
fruit,7,58.57142857142857
vegetables,7,27.428571428571427
meat,5,108.0

And if a query fails due to a syntax error, we give informative errors, so the agent can correct without deferring to documentation.

$ polars --format csv -c "SELECT LEN(category) FROM 'foods.csv'"
SQLInterfaceError: unsupported function 'len'
 --> <command>:1:8
  |
1 | SELECT LEN(category) FROM 'foods.csv'
  |        ^^^^^^^^^^^^^
  = hint: use LENGTH instead
$ echo $?
1

Installation #

To get started, you can download the polars-cli from pypi with uv tool install polars-cli or use one of our github releases

Last words #

The initial release supports the native local and remote files that are supported by Python Polars. Next releases will include Delta Lake and Iceberg support as well as excel and scanning from databases. If you find any issue or want a feature, please contact us on github: https://github.com/pola-rs/polars/.

── more in #ai-agents 4 stories · sorted by recency
── more on @polars 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/introducing-polars-c…] indexed:0 read:2min 2026-12-01 · —