# AskDB Architecture
This document is the canonical architecture guide for AskDB packages, package boundaries, install profiles, and extension seams. It complements the package READMEs, [Platform](platform.md), [Schema v2](contracts/schema-v2.md), and [Connector authoring](integration/connectors.md) docs.
## System overview
AskDB turns natural-language questions into schema-grounded SQL. The central runtime boundary is deliberate: AskDB returns SQL for review; the host application owns approval, execution, database roles, tenant policy, network controls, and audit logging.
```mermaid
flowchart LR
asker["User or agent question"]
host["Host app, CLI, HTTP API, or Studio"]
schema["AskDB Schema v2
directory, schema.json, or bundle"]
core["@askdb/core
load schema, assemble prompt, call model"]
dialect["Dialect rules
built-in DialectSpec or custom AskDialect"]
model["BYO LanguageModel"]
sql["Checked SQL artifact"]
execution["Host-owned execution boundary"]
asker --> host
host --> schema
host --> core
schema --> core
core --> dialect
core --> model
model --> core
dialect --> core
core --> sql
sql --> execution
```
`@askdb/core` owns the SQL rules of the built-in engine families: the six built-in `DialectSpec`s with their prompt briefs, forbidden keywords and functions, list binding, escaping and quoting, namespace rules and reserved-word lists. It resolves a dialect id such as `"postgres"` itself, so SQL generation needs no engine package. It does not import database drivers, does not own live database connections, and does not execute generated SQL. Engine packages such as `@askdb/postgres` own what talks to a database: the driver, the introspection connector and the catalog SQL. They re-export core's specs. See [ADR 0029](adrs/0029-core-owns-built-in-dialect-specs.md).
## Package map
AskDB is a pnpm monorepo with reusable packages under `packages/*` and first-party product surfaces under `apps/*`. Some packages publish binaries, but their package boundary still follows the same rule: reusable contracts live in libraries and integrations; product workflows compose those contracts.
```mermaid
flowchart TB
subgraph Contracts["Reusable contracts and libraries"]
core["@askdb/core
Schema v2, ask(), built-in dialect specs,
modes, logging, retrieval input"]
introspect["@askdb/introspect
Connector contract, connector registry,
engine kit, Schema v2 renderer"]
enrich["@askdb/enrich
Headless enrichment workspace helpers"]
rag["@askdb/rag
Chunking, indexing, retriever wiring"]
end
subgraph Integrations["Integration packages"]
postgres["@askdb/postgres
Postgres connector, templates, runner"]
prisma["@askdb/prisma
Prisma schema-file connector"]
mysql["@askdb/mysql
MySQL / MariaDB connector, runner"]
sqlite["@askdb/sqlite
SQLite connector, runner"]
sqlserver["@askdb/sqlserver
SQL Server connector, runner"]
end
subgraph AI["AI providers"]
aiPkg["@askdb/ai
registry, env contract, built-in providers
(@ai-sdk/* as optional peers)"]
end
subgraph Surfaces["First-party surfaces"]
cli["askdb
askdb binary"]
http["@askdb/http-api
POST /ask wrapper"]
studio["@askdb/studio
local browser authoring UI"]
docsSite["@askdb/docs-site
static documentation site"]
end
introspect --> core
postgres --> core
postgres --> introspect
prisma --> introspect
mysql --> core
mysql --> introspect
sqlite --> core
sqlite --> introspect
sqlserver --> core
sqlserver --> introspect
enrich --> core
rag --> core
cli --> core
cli --> introspect
cli --> postgres
cli -. "optional peer" .-> prisma
cli --> mysql
cli --> sqlite
cli --> sqlserver
cli --> enrich
cli --> studio
cli --> aiPkg
http --> core
http --> aiPkg
studio --> core
studio --> introspect
studio --> enrich
studio --> postgres
studio --> mysql
studio --> sqlite
studio --> sqlserver
studio -. "optional peer" .-> prisma
studio --> rag
studio --> aiPkg
```
| Package | Purpose and scope | Boundary |
| --- | --- | --- |
| `@askdb/ai` | AI provider registry: universal env-resolution contract (`resolveBaseConfig`, `ProviderEnvSpec`), the `createAiRegistry` factory, the `AiProviderAdapter` extension point, and built-in providers (OpenAI, Azure OpenAI / Foundry, Google Gemini, Anthropic, Vercel AI Gateway) described by one `BUILTIN_AI_PROVIDERS` table. | Provider SDKs (`@ai-sdk/openai`, `@ai-sdk/azure`, `@ai-sdk/google`, `@ai-sdk/anthropic`) are optional peers, imported lazily when a provider first builds a model; no NL-to-SQL logic. |
| `@askdb/mysql` | MySQL / MariaDB engine package: live connector, `createMysqlCatalogQueryRunner`, and the `mysqlConnectorProvider` registry adapter; re-exports `MYSQL_DIALECT` / `MARIADB_DIALECT` from core. | Wraps `mysql2` (optional peer). |
| `@askdb/sqlite` | SQLite engine package: live connector, `createSqliteCatalogQueryRunner`, and the `sqliteConnectorProvider` registry adapter; re-exports `SQLITE_DIALECT` from core. | Wraps `better-sqlite3` (optional peer). |
| `@askdb/sqlserver` | SQL Server engine package: live connector, `createSqlServerCatalogQueryRunner`, and the `sqlServerConnectorProvider` registry adapter; re-exports `SQLSERVER_DIALECT` from core. | Wraps `mssql` (optional peer). |
| `@askdb/client` | Config-aware facade over `@askdb/core`: `createAskDb()` resolves schema, model, and dialect from config + a provider registry so callers pass only a question. The experimental `@askdb/client/charts` entry point plans a chart for a host's query result without sending rows to the model ([ADR 0044](adrs/0044-chart-planning-sends-no-rows.md)). | No provider SDKs bundled: the registry defaults to `@askdb/ai`'s built-ins, and the host installs the `@ai-sdk/*` package it configures. `@askdb/core` never depends on it. |
| `@askdb/core` | NL-to-SQL pipeline, the built-in dialect specs and their rules (ADR 0029), Schema v2 loading/parsing, modes, logging, enrichment suggestions, and retriever input. | No database drivers, no generated-SQL execution, no engine-specific connector; never imports an engine package. |
| `@askdb/introspect` | Engine-agnostic `Connector` contract, introspection orchestrator, Schema v2 renderer, the connector registry (`createConnectorRegistry`, `ConnectorProviderAdapter`, open provider ids), and the `@askdb/introspect/kit` helpers every engine package is built on (driver loading, filters, ids, row folding, connection labels; ADR 0008). | No default connector, no engine-specific input union (the registry's connection is one of three source kinds, `url`, `fromExport` or `schemaPath`; each engine builds its own connector input), no driver dependency, no standalone binary. |
| `@askdb/postgres` | Postgres engine package: live/from-export connector, catalog templates, optional `pg` catalog runner, and the `postgresConnectorProvider` registry adapter; re-exports `POSTGRES_DIALECT` (as `postgresDialect`) from core. | `pg` is optional and only needed for live catalog reads; generated SQL still executes outside AskDB. |
| `@askdb/prisma` | Offline Prisma schema-file connector that renders Schema v2 physical metadata. | No live database connection and no SQL dialect. Pair output with a built-in dialect id such as `"postgres"` when generating SQL. |
| `@askdb/enrich` | Headless Schema v2 authoring helpers: load/save workspace, table drafts, concepts, markdown preservation, suggestions, and bundling. | No terminal or browser UI. |
| `@askdb/studio` | Maintained local browser UI for enrichment, sample NL-to-SQL checks, and local RAG exploration. | Authoring surface over Schema v2, not a connector package. |
| `@askdb/rag` | Deterministic Schema v2 chunking, BYO embedder/store interfaces, in-memory/file/pgvector adapters, and retriever wiring. | Optional layer; prompt generation still flows through `@askdb/core` and a dialect. |
| `askdb` | Batteries-included `askdb` workflow for ask, introspect, enrich, studio, and bundle commands. | Product surface that composes packages; not the reusable contract layer. |
| `@askdb/http-api` | Minimal HTTP wrapper around `@askdb/core` that returns SQL from `POST /ask`. | No duplicate NL-to-SQL implementation and no SQL execution. |
| `@askdb/docs-site` | Static documentation site. | Mirrors selected docs content; Markdown files remain canonical for architecture and contracts. |
## Dependency boundaries
The package graph is intentionally layered by responsibility.
```mermaid
flowchart BT
core["@askdb/core"]
introspect["@askdb/introspect"]
enrich["@askdb/enrich"]
rag["@askdb/rag"]
postgres["@askdb/postgres"]
prisma["@askdb/prisma"]
mysql["@askdb/mysql"]
sqlite["@askdb/sqlite"]
sqlserver["@askdb/sqlserver"]
ai["@askdb/ai"]
studio["@askdb/studio"]
cli["askdb"]
http["@askdb/http-api"]
introspect --> core
enrich --> core
rag --> core
postgres --> core
postgres --> introspect
prisma --> introspect
mysql --> core
mysql --> introspect
sqlite --> core
sqlite --> introspect
sqlserver --> core
sqlserver --> introspect
studio --> enrich
studio --> core
studio --> introspect
studio --> postgres
studio --> mysql
studio --> sqlite
studio --> sqlserver
studio -. "optional peer" .-> prisma
studio --> rag
studio --> ai
cli --> core
cli --> introspect
cli --> postgres
cli -. "optional peer" .-> prisma
cli --> mysql
cli --> sqlite
cli --> sqlserver
cli --> enrich
cli --> studio
cli --> ai
http --> core
http --> ai
```
Boundary rules:
- `@askdb/core` remains the schema and NL-to-SQL contract package. It receives a dialect (a built-in id, a `DialectSpec` under a built-in id, or a custom `AskDialect`), a model, an optional retriever, and a schema; it returns SQL.
- `@askdb/core` owns the SQL rules of the built-in engine families and resolves their ids itself. It never imports an engine package: every engine package depends on core, so that import would be a cycle ([ADR 0029](adrs/0029-core-owns-built-in-dialect-specs.md)).
- Engine packages own what talks to a database: the driver, the introspection connector, the catalog SQL and connection resolution. They re-export core's specs. `@askdb/postgres` owns Postgres catalog introspection; `@askdb/prisma` owns Prisma schema-file introspection.
- `@askdb/introspect` does not know whether an engine reads a live database, an export bundle, a file, or a future API. The connector input shape belongs to the engine package; the registry's connection only names the three source kinds a host can supply (`url`, `fromExport`, `schemaPath`), and each engine decides what they mean (ADR 0008).
- Engine packages own connection resolution. Each exports a `ConnectorProviderAdapter` whose `resolveConnection` hook merges explicit values (CLI flags) with AskDB runtime config and whose `connectionLabelParts` hook parses the connection into display-safe parts; the registry builds every label from those parts ([ADR 0011](adrs/0011-connection-labels-from-parsed-parts.md)). First-party surfaces dispatch through `createConnectorRegistry(...)` and do not switch on engine names ([ADR 0008](adrs/0008-engine-packages-and-connector-registry.md)).
- `@askdb/enrich` owns reusable authoring behavior. `@askdb/studio` (and any custom authoring surface) depends on it rather than duplicating workspace logic. Writing a file into a schema directory is `@askdb/core`'s `saveSchemaFile()` ([ADR 0028](adrs/0028-core-writes-schema-directory-files.md)), which enrich, Studio and `@askdb/introspect` all call.
- `@askdb/rag` is optional. It can narrow schema context before `ask()`, but it does not replace dialect validation.
- First-party apps can be batteries-included. Reusable packages should stay small and should not pull optional drivers into unrelated workflows.
- `@askdb/ai` owns provider dispatch, the universal env precedence, and the built-in providers (one file each under `packages/ai/src/providers/`, one row each in `BUILTIN_AI_PROVIDERS`). Each built-in owns its native env vars, defaults, and reasoning mapping, and imports its `@ai-sdk/*` SDK (an optional peer) lazily. Custom providers plug in through `AiProviderAdapter` objects. Core stays BYO-model: `ask()` takes any AI SDK `LanguageModel` and never depends on `@askdb/ai`. The registry returns that same plain `LanguageModel`, so a host may use it for its own AI calls too. See the ADR 0006 amendment (Option E).
- `@askdb/config` does not depend on `@askdb/core`; it keeps `ASKDB_DIALECTS`, a copy of core's built-in dialect ids that types `askdb.config`'s `dialect`, and no test checks that copy yet (#661).
- `@askdb/config` does not depend on `@askdb/ai`; it keeps its own provider list (`ASKDB_AI_PROVIDERS`) and default models, and a test in `@askdb/client` (which depends on both) fails if they or the env var names drift from `BUILTIN_AI_PROVIDERS`.
- `@askdb/client` is a convenience layer **above** `@askdb/core`: it depends on `@askdb/core`, `@askdb/ai`, and `@askdb/config` to resolve a schema/model/dialect, then calls `ask()`. The dependency arrow points one way — `@askdb/core` does not know `@askdb/client` exists, preserving the BYO-model boundary.
- First-party surfaces (`askdb`, `@askdb/http-api`, `@askdb/studio`) are deliberately batteries-included: they call `createAiRegistry()` and hard-depend on `@askdb/ai` plus all four `@ai-sdk/*` provider SDKs so env config alone selects a provider. Library packages must not.
## Schema-to-SQL flow
```mermaid
sequenceDiagram
autonumber
participant Host as Host surface
participant Core as @askdb/core
participant Rag as Optional @askdb/rag retriever
participant Model as BYO LanguageModel
Host->>Core: ask({ question, schema, model, dialect, retriever? })
Core->>Core: resolve the dialect id to its DialectSpec
Core->>Core: normalize Schema v2 context
opt Retriever supplied
Core->>Rag: retrieve focused schema chunks
Rag-->>Core: relevant chunks and scores
Core->>Core: synthesize focused DDL
end
Core->>Model: prompt with the spec's brief and quoted identifiers
Model-->>Core: model text
Core->>Core: check the SQL with the spec's rules
Core-->>Host: { sql, explain? }
```
A custom `AskDialect` replaces the prompt, model and read-only check steps with its own `generate()`; `ask()` still runs the tenant and sensitive checks on the SQL it returns. The generated SQL is an output artifact. Running it is outside the AskDB package API by design.
## Introspection connector architecture
`@askdb/introspect` defines the connector contract and rendering flow. Connector packages supply the engine-specific source reader and input type.
Hosts that pick the engine from config (the CLI, Studio, or your own bootstrap) go through the connector registry in `@askdb/introspect`:
```ts
const registry = createConnectorRegistry([
postgresConnectorProvider,
mysqlConnectorProvider,
// A lazy entry: imported only when selected, for an engine package the host may not have installed.
{ provider: "prisma", load: async () => (await import("@askdb/prisma")).prismaConnectorProvider },
]);
await registry.load(engine); // imports a lazy entry's package; a no-op for an adapter
const resolved = registry.resolveConnection(engine, { explicit: { url }, runtime: getAskDbRuntimeConfig(), surface: "cli" });
if (!resolved.ok) throw new Error(resolved.error);
const { connector, input } = registry.createConnector({ provider: engine, ...resolved.connection, filters, schemaId });
await introspect(input, { outDir, schemaId }, { connector });
```
```mermaid
flowchart TB
caller["CLI or library caller"]
orchestrator["@askdb/introspect
introspect()"]
contract["Connector of TInput
describe(input), templates?()"]
renderer["Schema v2 renderer"]
out["schema-id.schema/
schema.json"]
pgLive["Postgres live input
{ mode: live, runner, filters? }"]
pgExport["Postgres export input
{ mode: from-export, bundlePath, filters? }"]
prismaFile["Prisma input
{ schemaPath, schemaId?, filters? }"]
pgConnector["@askdb/postgres
createPostgresConnector()"]
prismaConnector["@askdb/prisma
createPrismaConnector()"]
caller --> orchestrator
pgLive --> pgConnector
pgExport --> pgConnector
prismaFile --> prismaConnector
pgConnector --> contract
prismaConnector --> contract
orchestrator --> contract
contract --> renderer
renderer --> out
```
Connector capability matrix:
| Connector package | Input source | Live database | Export or offline mode | Dialect spec re-export | Optional peers |
| --- | --- | --- | --- | --- | --- |
| `@askdb/postgres` | PostgreSQL catalog metadata. | Yes, through a caller-supplied `CatalogQueryRunner` or `createPostgresCatalogQueryRunner()`. | Yes, through from-export bundles produced from the catalog templates. | Yes, `postgresDialect` (core's `POSTGRES_DIALECT`). | `pg` for live introspection. |
| `@askdb/prisma` | One `schema.prisma` file or a directory of `.prisma` files. | No. | Yes, file-only introspection. | No. | None declared. |
## Enrichment flow
Introspection produces the physical layer. Enrichment authoring adds the describable layer that humans and RAG use for better grounding.
```mermaid
flowchart LR
physical["schema.json
physical layer"]
workspace["@askdb/enrich
loadWorkspace()"]
authoring["Authoring surface
Studio or custom UI"]
tables["tables/*.md
descriptions, aliases, examples"]
concepts["concepts.md
domain vocabulary"]
bundle["schema bundle JSON
optional distribution artifact"]
core["@askdb/core
loadSchema()"]
physical --> workspace
workspace --> authoring
authoring --> tables
authoring --> concepts
physical --> bundle
tables --> bundle
concepts --> bundle
physical --> core
tables --> core
concepts --> core
bundle --> core
```
`@askdb/studio` is the maintained enrichment surface. It does not own the shared workspace logic and it does not need a live database connection to edit enrichment.
## RAG flow
RAG is an optional layer for large enriched schemas. It indexes Schema v2 chunks with consumer-selected embeddings and storage, then returns a retriever for `ask()`.
```mermaid
flowchart TB
schema["Schema v2 directory or bundle"]
chunker["@askdb/rag
chunkSchema*()"]
embedder["BYO Embedder
AI SDK, OpenAI helper, or custom"]
store["BYO VectorStore
memory, file, pgvector, or custom"]
lock["schema.lock.json
content hashes"]
retriever["Retriever"]
core["@askdb/core ask()"]
dialect["Dialect rules
checks in core"]
sql["Checked SQL"]
schema --> chunker
chunker --> embedder
embedder --> store
chunker --> lock
store --> retriever
retriever --> core
schema --> core
core --> dialect
dialect --> sql
```
Sensitive describable-layer content is excluded from RAG chunks by default. Identifier grounding and dialect guardrails remain part of the core SQL generation path.
## Install profiles
In the table below, "selected packages" are packages the consumer chooses for a workflow. "Automatically installed" means normal package dependencies pulled in by those selected packages. "Optional peers" are peer packages the consumer installs only when using a feature that needs them.
| Workflow | Selected packages | Automatically installed by those packages | Optional peers or provider packages | Notes |
| --- | --- | --- | --- | --- |
| Minimal Postgres SQL generation | `@askdb/core`, `ai` | Nothing else: `ai` is a required peer of `@askdb/core` (AI SDK 6 or 7) that the host installs and pins. | Add a model provider such as `@ai-sdk/openai` when your runtime creates the model directly. Add `@askdb/ai` (plus the same `@ai-sdk/*` package, an optional peer) only if you want AskDB config/env model factories. Neither `@askdb/postgres` nor `pg` is needed. | Uses `ask({ dialect: "postgres" })`; the spec is core's (ADR 0029). SQL execution remains host-owned. |
| Live Postgres introspection | `@askdb/introspect`, `@askdb/postgres`, `ai` | `@askdb/postgres` pulls `@askdb/core` and `@askdb/introspect`. `ai` is a required peer of `@askdb/core`, which loads it at import time even when no SQL is generated (ADR 0006, 2026-09 amendment). | `pg` for `createPostgresCatalogQueryRunner()`. | Callers can also supply their own `CatalogQueryRunner`. |
| Air-gapped Postgres introspection | `@askdb/introspect`, `@askdb/postgres`, `ai` | Same as live Postgres introspection. | No `pg` required if using from-export bundles only. | Templates come from `POSTGRES_TEMPLATE_BUNDLE`. |
| Prisma schema-file introspection | `@askdb/introspect`, `@askdb/prisma`, `ai` | `@askdb/prisma` pulls `@askdb/introspect` (and through it `@askdb/core`) and `@prisma/internals`. `ai` is the required peer of `@askdb/core`. | No database driver peer declared. | Produces Schema v2 physical metadata from Prisma files; no dialect included. |
| CLI workflow | `askdb` | Pulls first-party integrations and surfaces used by the `askdb` binary, including core, ai, the four `@ai-sdk/*` provider SDKs, introspect, the four live engine packages, enrich, and studio. | `@askdb/prisma` for Prisma schema-file introspection (it brings in Prisma, whose `@prisma/engines` build pnpm 11 must approve); the database driver for live introspection. Environment variables choose which runtime paths are active. | Batteries-included product surface, not the smallest library install. |
| Local browser Studio | `@askdb/studio` | Pulls core, ai, the four `@ai-sdk/*` provider SDKs, enrich, the four live engine packages, rag, and React UI dependencies. | `@askdb/prisma` to resync from a Prisma schema; the database driver for live introspection or execute. `OPENAI_API_KEY` enables suggestions/sample generation; RAG provider choices are runtime config. | Local authoring UI, sample SQL checks, and local RAG exploration. |
| RAG with memory or file store | `@askdb/rag`, `@askdb/core`, `ai` | `@askdb/rag` pulls `@askdb/core`; `ai` is the required peer of `@askdb/core`. | Embedder packages only if using a helper such as OpenAI. | In-memory and file stores do not need `pg`. |
| RAG with pgvector | `@askdb/rag`, `@askdb/core`, `ai` | `@askdb/rag` pulls `@askdb/core`; `ai` is the required peer of `@askdb/core`. | `pg` when using the pgvector adapter with a Postgres connection; embedding provider package as needed. | Vector storage is optional and selected by the host. |
## Connectors vs peer packages
Connectors and peer packages solve different problems:
- A connector is an AskDB integration package that knows how to describe a schema source. Examples: `@askdb/postgres` and `@askdb/prisma`.
- A peer package is a runtime dependency the consumer installs only when the chosen feature needs it. Examples: `pg` for live Postgres catalog reads, `pg` for pgvector, and AI SDK provider packages for model or embedding helpers.
- Installing `@askdb/core` does not select a database. The caller chooses a dialect id (or a `DialectSpec`) for SQL generation and an engine or connector package for schema introspection.
- Installing an authoring surface such as `@askdb/studio` does not make it a connector. Authoring surfaces edit Schema v2 artifacts.
## Extension points
| Extension point | Package | Shape | When to implement |
| --- | --- | --- | --- |
| SQL dialect | `@askdb/core`: the six built-in `DialectSpec`s, or one the host passes to `ask()` | `DialectSpec` (spread a built-in) or a custom `AskDialect` | Adjust a built-in engine's rules, or bring your own generator. A rebind (`bindPreparedQuery()`) runs under the spec the host passes as `dialect`, and refuses a template made under a spread spec without it ([ADR 0032](adrs/0032-rebind-checks-under-the-hosts-dialect-spec.md)). A new built-in engine is a change to core ([ADR 0029](adrs/0029-core-owns-built-in-dialect-specs.md)). |
| Introspection connector | `@askdb/introspect` contract, implemented by integrations | `Connector` | Add a new schema metadata source such as another database engine, export format, or schema file type. |
| Connector provider adapter | `@askdb/introspect` registry, implemented by engine packages | `ConnectorProviderAdapter` (`createConnector`, optional `resolveConnection`, `connectionLabelParts`, `getTemplates`); any string provider id; registered as the adapter or as a lazy entry (`{ provider, load }`) that `registry.load()` imports on first use | Make an engine selectable by id from a config-driven host you write (`createConnectorRegistry`). The shipped `askdb` CLI and Studio register only the built-in engines, `@askdb/prisma` as a lazy entry (it is their optional peer). |
| Engine kit | `@askdb/introspect/kit` | `createOptionalDriverLoader`, `compileTableFilters`, `makeTableId`, `rowsToRecords`, `defineLiveConnectorProvider`, `formatConnectionLabel`, `parseConnectionUrl` | Build a new engine package without re-implementing driver loading, filters, ids, row folding, or the live-catalog adapter. |
| Catalog runner | Integration-owned helper, currently `@askdb/postgres` | `CatalogQueryRunner` | Use a different live database client while keeping the connector unchanged. |
| Enrichment authoring | `@askdb/enrich` | `Workspace`, draft builders, save helpers, bundle helpers | Build a custom UI over Schema v2 without depending on Studio. |
| Retrieval | `@askdb/rag` and `@askdb/core` | `Embedder`, `VectorStore`, `Retriever` | Use a different embedding provider, vector database, or retrieval policy. |
| AI provider adapter | `@askdb/ai` contract; built-ins live in `packages/ai/src/providers/`, custom adapters are passed to `createAiRegistry()` | `AiProviderAdapter` | Add a model provider that resolves from AskDB env/config; BYO-model via `ask()` needs no adapter. |
| Product surface | App packages or consumer app | CLI, HTTP, browser UI, MCP, future SDK | Compose the reusable packages into a workflow with host-owned auth, policy, and execution. |
## Related docs
- [Installable package guide](integration/installable-package.md)
- [Connector authoring](integration/connectors.md)
- [Schema v2 contract](contracts/schema-v2.md)
- [Modes and sensitive fields](contracts/sensitive-fields-and-modes.md)
- [ADR 0002: Integration-package layout](adrs/0002-integration-package-layout.md)
- [ADR 0004: Enrichment-package boundary](adrs/0004-enrichment-package-boundary.md)
- [ADR 0008: Engine packages, engine kit, and the connector registry](adrs/0008-engine-packages-and-connector-registry.md)
- [ADR 0029: `@askdb/core` owns the built-in dialect specs](adrs/0029-core-owns-built-in-dialect-specs.md)