The first version of the idea was embarrassingly simple. Give the agent a database URL, let it write SQL, run the query, and send the rows back to the model. It would have made a nice demo.
Source: [Dev.to](https://dev.to/ivenin/i-didnt-want-my-ai-agent-to-have-a-database-password-so-i-built-a-gateway-3770)