Working with AI Agents¶
Coding agents are great at writing analysis scripts, but they struggle in real data projects: they guess file paths, lose track of which CSV is current, or rebuild tables that another team member already cleaned.
ChartBook turns your team’s pipelines into a living skills and data catalog for your agents—while snapshots give you the audit trail to verify everything they build.
1. Teach your agent ChartBook (one command)¶
Run this once inside any pipeline folder:
chartbook install agents
This does two things automatically:
Claude Code: Installs a ChartBook skill so Claude knows when and how to search your catalog, read dataset schemas, pin dependencies, and verify lineage.
Cursor, Codex, and other agents: Writes a concise ChartBook section into your project’s
AGENTS.md(wrapped in marker comments so future upgrades update cleanly without touching your own notes). CommitAGENTS.mdso the whole team gets it.
Note
Want only the Claude Code skill? Run chartbook install claude-skill. Every catalog site also publishes an llms.txt at its root for web-based or RAG agents.
2. How an agent uses your catalog¶
An agent works through your catalog progressively, keeping its context window lean—one short listing first, documentation only for the assets that matter, and data last:
Step |
What the agent runs |
What it gets |
|---|---|---|
Discover |
|
Compact list of every pipeline, dataset, chart, and model with descriptions |
Inspect |
|
Full documentation, data sources, date ranges, row counts, and column schema |
Load & Pin |
|
Clean data pinned to an exact snapshot in |
Verify |
|
Full upstream chain, checked by commit and content hash |
Discover what exists¶
$ chartbook ls --json
[
{"kind": "pipeline", "id": "tutorial/treasury_curve", "name": "Treasury Curve",
"description": "The Federal Reserve Board's zero-coupon Treasury yield curve, daily since 1961."},
{"kind": "chart", "id": "tutorial/treasury_curve:chart/yields", "name": "Treasury Yields Since 1961",
"description": "The 2-, 10- and 30-year zero-coupon yields", "pipeline": "tutorial/treasury_curve"},
{"kind": "dataframe", "id": "tutorial/treasury_curve:zero_coupon_yields", ...}
]
Filter to a single kind anytime with chartbook ls dataframes --json (or charts, pipelines), or filter the kind field of chartbook ls --json for model, notebook, and files assets.
Read schemas and docs without loading gigabytes¶
$ chartbook get-docs treasury_curve:zero_coupon_yields
chartbook get-docs prints the exact same facts a human sees on the catalog website—sources, license, row count, date coverage, write-up, and column names/types—without touching the underlying parquet file.
Pass a pipeline name (
treasury_curve) to read its README.Pass
pipeline:dataframe(treasury_curve:zero_coupon_yields) to read a dataframe’s full spec.Pass
pipeline:kind/name(rate_outlook:model/spread_ar1) for charts, models, notes, or files.
Load clean, pinned data¶
Once the agent finds the dataset it needs, it adds the dependency and loads it by name:
chartbook add tutorial/treasury_curve
from chartbook import data
yields = data.load("treasury_curve:zero_coupon_yields", format="pandas")
Working in R, Stata, or a shell script? chartbook path treasury_curve:zero_coupon_yields prints the exact path to the pinned file.
3. How you verify what your agents built¶
Letting agents build larger, multi-pipeline projects only works if you can trust the numbers at the end. ChartBook gives you three built-in guardrails:
Agents build; humans approve snapshots.
chartbook runbuilds and checks outputs locally, but never publishes to a shared store. The installed agent instructions explicitly tell agents not to runchartbook snapshotwithout your go-ahead.Every dependency change is a clean
git diff. Becausechartbook.lockpins exact snapshots and content hashes, reviewing an agent’s pull request shows immediately which datasets it pulled in and whether any upstream numbers moved.One-command audit trail. Run
chartbook lineageto trace every upstream snapshot back to its source and verify every hash:
$ chartbook lineage
tutorial/rate_outlook (this folder)
├── tutorial/macro_basics: tutorial/macro_basics 59a435b, made 2026-11-02 22:14:54 UTC, pins checked
└── tutorial/treasury_curve: tutorial/treasury_curve 59a435b, made 2026-11-02 22:14:45 UTC, pins checked
2 snapshot(s) upstream; no gaps.
Run chartbook lineage --check in CI to fail automatically if any upstream link is broken or unverified.
Next steps¶
Explore a Catalog — try these commands live on a three-pipeline catalog
Linking Pipelines Together — how snapshots, pins, and
chartbook.lockconnect larger projectsCLI Reference — full CLI reference for
ls,get-docs,lineage, andinstall agents