The problem
A one person company running a data heavy product has nobody to check each morning that last night's imports landed, to pull a retention cohort when an investor asks, or to read the audit logs after a security probe. Those jobs wait until something breaks, or never happen.
Architecture
- Channel
- Morning schedule
- Your questions on request
- Agent
- Agent in your MCP client
- Dedicated database role
- Tools
- MCP Toolbox for Databases
- AlloyDB or PostgreSQL
- Human
- You run every destructive change
Where the data stays: Data stays in your database; the agent reads it through its own role, with no database passwords in app settings.
Design flow
- Morning: check every import source
- Latest timestamp and row count per source
- Stale or odd source flagged in a table
- A fix needs a write: SQL proposedOnly sometimes
- You read it and run any change yourselfHuman checkpoint
Setup
Total time: 2 h 45 min our estimate
- 30 min
Done when: The role has SELECT on the schema you choose, no DROP, DELETE or TRUNCATE, and a test DELETE with it fails.
- 30 min
Done when: Customer and supplier personal columns are outside the role or behind a view, and a test query cannot read them.
Starter prompt
Written from how the use case works and its sources. Replace the parts in square brackets.
The starter prompt opens with the members steps above.
Risks and data
Data
The agent can read whatever its role can read. Keep customer and supplier personal columns out of the role or behind a view, since the freshness check needs only timestamps and counts, use a service account instead of a stored password, and keep the log of every query it ran.
How it goes wrong
A wrong reading of the data, a heavy query at a busy hour, or a role with more rights than planned. Destructive commands are not granted, so the worst case is a bad report or a slow query: test the role with a DELETE that must fail, and widen rights only when a job needs it.
How the agent works
It starts
Lucius AI, a tender intelligence platform that ingests public procurement notices nightly from 13 sources into AlloyDB for PostgreSQL, set up the open source MCP Toolbox for Databases with its prebuilt alloydb-postgres server so an AI agent can talk to the database.
The agent works
The agent connects with a dedicated PostgreSQL role granted SELECT across the schema and UPDATE on a single operational table; DROP, DELETE and TRUNCATE are not granted. Every morning it evaluates ingestion watermarks and freshness across all 13 sources. 14 seconds to 24 milliseconds), and after an external security probe it parsed the audit logs to reconstruct the request timeline in minutes and confirm tenant isolation held. The founder reads the results and makes every destructive change himself; the article's advice is to start read only, expand permissions as needs dictate and keep destructive operations with human administrators.
The result
Services authenticate with Google Cloud service accounts mapped to database roles, with no database passwords in application environments.
Worked example
Davor Jerković runs Lucius AI alone, without data engineering or DBA staff, with more than 210,000 tenders in the catalogue, nightly ingestion from 13 procurement sources and two production regions. In his Google Cloud blog post of 17 September 2026 he reports that the agent's audit found the ScaNN indexing strategy that took a representative semantic search from 1.14 seconds to 24 milliseconds, a 47x improvement, that rebuilding 115,820 embeddings took 10.6 minutes for about USD 3 of API spend, and that after an external security probe the agent reconstructed the request timeline from the audit logs in minutes. The post has no direct quotes.
The article does not name the agent client; the MCP Toolbox for Databases serves any MCP client, so Claude Code, Gemini CLI or Cursor can be the agent, and the Toolbox also has servers for ordinary PostgreSQL, MySQL and others. The part to keep whatever you use is the dedicated database role: read everywhere, write on one table, no destructive commands.
Join the Agent OS Club
Get hours back with a team of AI agents for every department, set up step by step for the tools you use, with a person answering your questions. Founding member price: USD 14.95 a month or USD 150 a year, locked for as long as you stay. Cancel any time.
Founding offer, ends 31 December 2026 or at member 100
Join the Agent OS ClubBuilding this for an organization? Learn more at theagentiv.com
Sources
Published: 2026-11-02