Query data files. Don't read them.
Agents query CSV, Parquet, and JSON through curated DuckDB primitives and get back only the answer — shaped, capped, and token-costed. No file dumping.
Agents query CSV, Parquet, and JSON through curated DuckDB primitives and get back only the answer — shaped, capped, and token-costed. No file dumping.
Built for AI agents that need to understand data without spending tokens reading raw files.
describe / sample / profile / aggregate / filter — operations an agent can't get syntactically wrong. Raw SQL stays an escape hatch.
Every result includes its estimated token cost. Agents know what they spend before deciding what to ask next.
query --show-sql previews resolved SQL before execution. Curated primitives need no confirmation — their SQL is fully determined by parameters.
Nine curated operations cover what agents ask about data. Each maps to a deterministic SQL pattern — no prompt injection surface.
| Command | Use when the agent asks… |
|---|---|
describe |
"what's in this file?", "what columns?", "how many rows?" |
sample |
"show me some rows", "what does the data look like?" |
count |
"how many rows where X?" |
profile |
"tell me about column X", "any nulls?", "what values?" |
distinct |
"what are the unique values of X?" |
aggregate |
"total/avg X by Y", "group by Z" |
filter |
"show rows where X", projected columns |
find-duplicates |
"are there duplicates?" |
query |
anything the primitives above can't express (HITL required) |
# install
pip install lacon
pip install lacon[tokens] # adds ~tokens to every response
# Claude Code skill
claude skill install https://github.com/andrii-su/lacon/releases/latest/download/lacon.skill
# quick start
lacon describe sales.csv --pretty
lacon aggregate sales.csv --group-by country --metrics revenue:sum --pretty
lacon query sales.csv "SELECT year, SUM(revenue) FROM {file} GROUP BY year" --show-sql --pretty