Daita agents / guide
Attach a regular SQLite database file and query its cataloged tables through a read-only connection.
The path must be absolute and point to an existing regular file:
source = await agent.attach_sqlite(
"/absolute/path/warehouse.sqlite",
name="Warehouse",
)Equivalent source-record form:
from pathlib import Path
from daita import SQLiteSource
source = await agent.attach(
SQLiteSource(Path("/absolute/path/warehouse.sqlite"), name="Warehouse")
)Relative paths, path aliases, symlinks, and non-regular files are rejected. Daita opens the database read-only.
SQLite discovery catalogs:
Discovery does not sample arbitrary business values or mutate the database.
result = await agent.run(
"Count completed orders and total their amount",
source_id=source.id,
)
print(result.final_text)The model can use catalog tools followed by data_query_sqlite. Queries must reference current catalog resources and pass deterministic validation before the connector executes them.
await agent.refresh_source(source.id)SQLite query execution checks the current live schema revision against the committed catalog. If structure has changed, refresh the source before retrying.
See Read-only Querying for the shared SQL contract.