Connectors · SQL files

Teach AI agents from your SQL: ingest query files alongside your schema

For engineers whose real join logic and business filters live in saved SQL.

Updated

Your saved SQL shows how tables are really joined and filtered. Pass SQL files or a folder next to a database source, and the CLI analyses the queries for referenced tables, columns, join patterns and named parameters, so agents learn from how your team already queries.

  • Pass .sql files, directories or globs alongside a database URL.
  • Queries are analysed for tables, columns, join patterns and named parameters.
  • Step-by-step flags: --sql <dir> and --sql-file <file> on meta ingest db.

Run it

Name the database first, then the SQL folder or files.

npx -y @brainbox-labs/cli@latest ingest postgres://user:pass@host/mydb ./sql/

Why it helps

A schema says which columns exist; saved queries say how your team joins and filters them. Together they make join keys and common filters visible to the agent.

Ways to add SQL files
CommandUse
ingest postgres://… ./sql/One step: database and a folder of queries
meta ingest db <url> --sql ./sql/Stage a folder of query files
meta ingest db <url> --sql-file q.sqlStage one query file

FAQ

Can I ingest SQL without a database connection?
The SQL options are used together with a database source (Postgres, Trino or Athena).
What is learned from the queries?
Referenced tables and columns, join patterns and named parameters.
Do the queries run?
No. They are parsed and analysed, not executed.

Give your agents a brain.

Sign in and ask your first question.

Book a Demo