For data and platform engineers preparing a warehouse for an AI agent.
Updated
To document a database schema for AI agents, record the meaning that column names cannot carry: a business name and description for each table, what each column means and its units, synonyms, primary keys, join keys with cardinality, and the rules that apply. Connect the schema, then sync a data dictionary of markdown files, and the Brain holds it in one place agents can query.
Run one command per source. The CLI reads schema metadata: tables, columns, types, keys and relationships. Use --tables to limit which tables are ingested and --review to stop before publishing so you can check what ingestion proposed.
npx -y @brainbox-labs/cli@latest ingest postgres://user:pass@host/db
npx -y @brainbox-labs/cli@latest ingest trino://user@host:8080/catalog/schema
npx -y @brainbox-labs/cli@latest ingest athena://us-east-1/mydb --reviewOne markdown file per table or domain. Say what the schema cannot: the business meaning, units, allowed values, synonyms, how it joins, and rules that apply. Use plain prose and short lists; the ingest step proposes entities and fields from it.
# orders
One row per customer order. Business name: Order.
- total_cents: order total in cents (divide by 100 for dollars).
- status: placed | shipped | refunded. Refunded orders are excluded from revenue.
- customer_id: joins to customers.id (many orders per customer).
- Also called: purchase, booking.Point sync at the folder. Run --dry-run first to see the diff. Re-run it when the dictionary changes: new and edited files are ingested and unchanged ones are skipped.
npx -y @brainbox-labs/cli@latest sync ./data-dictionary --namespace data-dictionary --dry-run
npx -y @brainbox-labs/cli@latest sync ./data-dictionary --namespace data-dictionaryBy default only schema metadata is read, never rows. Opt-in column profiling (--profile-data) samples rows to compute statistics, and full mode also sends enum values and JSON key shapes. Skip specific columns with --skip-profile-columns.
| Document this | Why an agent needs it | Stored as |
|---|---|---|
| A business name and description per table | Picks the right table by meaning | Entity name and description, with runtimeBinding |
| What each column means, with units and encodings | Reads values correctly | Field description and annotations |
| Synonyms and known typos | Matches your words to columns | Aliases on entities and fields |
| Primary keys and natural keys | Identifies a row | Entity keys |
| How tables join, and one-to-many or many-to-many | Joins safely | Relationship with cardinality and join keys |
| Business rules and their conditions | Applies your policies | Rules |
| Sensitive columns | Handles them with care | Field isSensitive flag |