query_database for reads and update_database for writes.
Prerequisites
Example
Provider Params
Tools Exposed
Privilege Separation
The read and write sub-agents use separate database connections:schema parameter helps the agent discover tables and columns but does not block cross-schema SQL.
Multiple Databases
Use differentid values to expose multiple databases:
Read-only Tool Surface
write=False removes update_database from the agent’s tools. It does not change the permissions of readonly_engine, so keep that engine restricted at the database level.
Cookbook
Database Context Provider
Read/write with separate engines