Enterprises keep data in two places. The production database, such as Postgres or MySQL, is where applications write it. The data warehouse, such as Snowflake or Databricks, holds a copy for analysis. In Data Governance vs. Database Governance, I explained that different teams govern the two with different tools.
Today AI agents are allowed into the warehouse but not into production. That is a problem, because an agent's task often needs both. The agent notices a discrepancy in the warehouse. To resolve it, the agent needs the current value from production, which the warehouse does not have yet. Then it needs to fix the row, which the warehouse cannot do.
Agents went where the governance was
Ask an enterprise where its AI agents read data, and the answer is Snowflake or Databricks, not Postgres. Organizations are too chicken to open the production database to an agent. Instead, they block people's tools and agents from connecting to production. Fivetran and Kafka copy the data to the warehouse, and analysts, developers, and agents query the copy there.
This setup is popular for three reasons. The data in the warehouse is already modeled and joined. An agent that runs heavy queries cannot slow down production. And the warehouse already has access controls. The third reason is the one that gets the setup through a security review.
The warehouse vendors had already built those controls for analysts: masking, row filters, lineage, and access history. Snowflake and Databricks each ship a managed MCP server, so an agent connects the same way an analyst does. It signs in through the vendor's authentication and gets the permissions of the person using it. Nobody had to build new controls for agents.
Postgres, MySQL, SQL Server, and Oracle do not come with that layer. They have controls of their own: GRANT and row-level security apply to any login. But the database only sees the login. It cannot tell which person the agent is working for. And most teams have never set up consistent controls across all their production databases, because the team that would do it is also responsible for uptime. So today, giving an agent access to production means giving it a login and a connection string. That does not pass a security review. The warehouse does.
What the copy cannot do
This setup works for analytical questions, which is what the warehouse was built for. Operational work is different. Most of it goes through the application, but the application does not cover everything. Investigating an incident, repairing data, running a backfill, and changing a schema all have to be done directly on the production database. The warehouse cannot help with that work, for four reasons.
- The agent cannot change production through the warehouse. It can read the copy and then use another tool to write to production, but the warehouse's controls do not apply to that write. The write needs its own permission check and audit log on the production side. Today the only way to make that write is with a database credential, which is what the block was supposed to remove.
- The warehouse is not the system of record. However fast the pipeline is, the copy is behind production. Even a read that was fresh can be out of date by the time the agent writes. A change has to be checked against the real data at the moment it runs.
- Engineers still have direct access. They keep an emergency login to production for incidents. That standing credential is the problem our inbound leads complain about most, and the warehouse does nothing about it.
- The copy is incomplete. Not every table, column, or database is replicated. Sensitive columns are either left out, so the agent cannot answer the question, or copied, so the same PII now exists in two places.
As soon as an agent needs the current row, or needs to change it, the work has to happen on production, and the warehouse's controls do not apply there. Production then needs the same things the warehouse already has: an identity for the agent, limited permissions, data masking, an audit log, and a person who approves each change. The next post covers how to set that up on the production database.