#[0.19.0] - 2026-05-15
This release overhauls Agent.from_db() into a more autonomous database-agent runtime with query planning, SQL preflight validation, schema navigation, compact runtime context, durable DB semantics, local monitors, and stronger guardrails. It also adds the Exa AI-powered web search plugin.
#Added
-
Database Agent Query Planning
from_db()agents now get a stable query facade for planning, validating, and executing database work. New tools include:db_plan_querydb_validate_sqldb_querydb_countdb_sample
SQL agents can plan analytic questions before execution, preserve required answer fields, and get structured repair guidance when generated SQL references unknown tables or columns.
-
Schema Navigation for Large Databases
Large or ambiguous schemas now stay usable without stuffing every table into the prompt.
from_db()can expose metadata-only schema tools for:- listing tables with pagination
- searching table and column metadata
- inspecting a table's columns and relationships
- describing foreign-key relationships
- finding SQL-ready join paths between tables
These tools operate on discovered schema metadata only; they do not execute SQL or return row data.
-
from_db()Modes and Budget ControlsAdded mode presets for
simple,analyst,governed, anddata_team, plus prompt-budget policies forauto,full,compact, andretrieval. Developers can tune schema prompt size, relationship detail, inline table and column limits, and DB tool result compaction. -
Runtime DB Context
Every DB-agent run now receives a compact runtime context describing database type, query policy, available capabilities, data health signals, candidate metrics, schema hints, drift, and relevant DB memory. Tool selection is also scoped per prompt so agents can work with a smaller active tool surface.
-
DB Memory Semantics
from_db(memory=True)now supports structured DB memory for durable business context, including:- unit conventions
- metric definitions
- business rules
- data contract notes
- schema interpretations
New
db_rememberbehavior stores DB semantics while rejecting row values and obvious PII patterns. -
DB Monitors and Findings
Agents created by
from_db()now exposeagent.db, including schema, plugin, mode, drift, audit entries, findings, monitor events, and helper APIs for registering local structured monitors. Monitor events can create or resolve portable DB findings for freshness and row-count checks. -
LLM Pricing Catalog
Added
daita.llm.pricingwith a data-driven model pricing catalog and registry helpers for OpenAI, Anthropic, Gemini, and Grok model families. Usage accounting can now resolve known per-token pricing while explicitly falling back for unknown models. -
Exa Search Plugin
Added
ExaSearchPluginand theexa_search()factory underdaita.plugins. Agents can use Exa for AI-powered web search and similarity search with:- neural, fast, auto, and keyword search modes
- optional full text, highlights, and summaries
- include/exclude domain filters
- publish-date filters
- category filters for news, research papers, companies, people, and more
search_webandfind_similaragent tools
Install with
pip install 'daita-agents[exa]'and configureEXA_API_KEY.
#Changed
-
from_db()ArchitectureDatabase-agent internals were reorganized into focused packages for config, runtime, query planning, schema discovery, schema navigation, tools, memory, monitors, and findings. The public builder now composes these pieces instead of keeping DB-agent behavior in one large module.
-
Database Plugin Guardrails
Shared database plugin behavior now includes SQL normalization, single-statement enforcement, read-only protections, table allowlists, table blocklists, column blocklists, default
LIMITinjection, query timeouts, row limits, and serialized result-size limits. -
DB Tool Result Compaction
DB tool outputs are compacted before they are appended to model context. Large rows, nested JSON, long cell values, and noisy payload columns are summarized or omitted according to configurable
ToolResultPolicysettings. -
Tracing Runtime
Tracing now has more robust async context handling, bounded payload previews, safer input/output serialization, and improved error handling around span export.
-
PostgreSQL Catalog Discovery
PostgreSQL catalog discovery now carries richer metadata for DB-agent schema summaries, relationship-aware navigation, and downstream query planning.
#Fixed
-
SQL Repair Loops
Failed SQL preflight results now include fingerprints, candidate tables and columns, next-tool suggestions, and
do_not_retry_same_sqlguidance to reduce repeated invalid tool calls. -
Lineage Integration
The DB-agent lineage path now handles missing or optional lineage dependencies more gracefully and avoids import errors in environments without the lineage extra installed.
-
Focus SQL Pushdown
Focus queries now fall back to Python-side evaluation when safe SQL pushdown fails, preventing DB-agent runs from crashing on dialect or aggregation edge cases.
-
Test Coverage
Added broad unit and live integration coverage for DB-agent construction, query IR planning, SQL validation, DB guardrails, tracing, LLM pricing, Exa search, plugin behavior, and live
from_db()scenarios.