AgenticLong read

Shared Data Layer Pattern for Human and Agent Workflows

One governed data layer keeps agents and humans on the same numbers.

· 10 min read
Cover illustration for “Shared Data Layer Pattern for Human and Agent Workflows”
Agentic · October 14, 2026 · 10 min read · 2,342 words

AI agents are supposed to let a business move at machine speed: query data, draft the report, take the action, all without a human in the middle. In practice, most enterprise agent deployments stall before they ever reach production, but the obstacle is rarely how the model reasons. The obstacle is the data infrastructure underneath it. Traditional systems were built for two kinds of consumers: pipelines, which are versioned, reviewed, and logged, and people, who operate inside defined roles with an audit trail and institutional memory to catch mistakes. Agents satisfy neither assumption. They behave non-deterministically, they traverse and modify data faster than any human can watch, and when something breaks, nothing in their design guarantees they'll flag it before acting on it.

A human analyst uncertain which "revenue" column to trust asks a colleague or notes the uncertainty in the report. An autonomous agent facing the same ambiguity picks a table and proceeds, often delivering a wrong number with the same confidence it would have carried for a right one. Platforms built specifically for this problem, such as Dreambase, address it by serving as a governed shared data layer that pre-structures that business context as part of every query, so an agent retrieves complete, safe semantics from the start instead of assembling guesses from whatever it can reach.

Divergent access patterns, not bad models, cause metric drift and production risk

The failure pattern that keeps agentic projects stuck in pilot is structural: humans and agents reaching the same underlying business through different paths, producing two different versions of the truth. Neither path is wrong in isolation. Run them side by side and they drift apart, and the business ends up making decisions on numbers that don't agree with each other.

When agents hold broad credentials to a production database, the risk gets much bigger. This isn't hypothetical caution. The Five Eyes intelligence alliance, comprising CISA, the NSA, Australia's ASD ACSC, the UK's NCSC, the Canadian Centre for Cyber Security, and New Zealand's NCSC, published joint guidance in May 2026 warning that agentic AI is already running inside enterprise environments without adequate safeguards. Their framing is blunt: an over-eager intern with administrator credentials, operating at machine speed, with unrestricted database access.

You can see in the Confused Deputy pattern how that access gap becomes an attack surface. The fix is removing the condition that makes the exploit possible in the first place: broad, standing database access that lets an agent's queries bypass any single point of governance.

What the shared data layer pattern is

The shared data layer pattern resolves the divergence by giving humans and agents one set of pre-modeled, governed datasets, consumed through the same interface, so there is exactly one definition of every metric, one set of access rules, and one audit trail. Three structural properties define it. Third, a single interface serves every consumer: the same endpoint feeding a human dashboard also feeds an agent's context window, and neither one reaches behind it to the raw source.

This pattern is not simply a data warehouse by another name. The shared layer governs access to data where it already lives, so you don't need a migration. It's also not the same as giving an agent direct database access with extra logging. Under this pattern, an agent never queries the source. It consumes a governed, pre-shaped representation of that data, so no dynamic, runtime-constructed SQL from an autonomous system ever reaches the production database. A metric, in this framing, is no longer just a query somebody wrote to produce a number. It becomes a modeled, named, versioned definition that a human stakeholder and an agent can both reference without ambiguity, one definition, shared across every consumer that touches it.

MCP as a practical shared interface for humans and agents

MCP is the standard that lets you build a single governed layer for humans and agents at once, so you need no separate integration work for each. MCP's role is to pull apart three concerns that used to be tangled together: the client, the AI agent or assistant making the request; the server, which handles authentication, data retrieval, and formatting; and the resource, the actual database, API, or internal tool being accessed. If you separate those three, you get the structural definition of a headless analytics layer, so the same backend can serve a chat interface, a dashboard, and an autonomous agent without three separate codebases.

MCP and standards like it are becoming the common connective layer between AI agents and enterprise data platforms, but the governance a given deployment provides depends on how that implementation enforces access, not on what the standard guarantees by default. That distinction matters because MCP's adoption has moved faster than its security practices have. The NSA's May 2026 report flagged confused deputy risks specifically inside MCP proxy servers, along with the MCP specification's prohibition on token passthrough, and both point to the same warning: standing up an MCP server with no governance controls rebuilds the original access problem with a new protocol on top. MCP is the delivery mechanism, not the governance itself. The governed, pre-modeled datasets behind it are what make exposing an MCP server safe, and raw database access offered up through MCP is the failure mode this pattern exists to avoid, not a variation of it.

Postgres as the right foundation for this pattern on Supabase teams

Teams running Supabase and Postgres don't need a separate warehouse or a new data platform to build this. Postgres already carries the access control primitives the pattern depends on; for most teams, the open question is whether those primitives are configured correctly for agentic workloads as well as human ones. Row Level Security enforces data access inside the database itself, limiting each user to their own data, and that enforcement applies identically whether a human or an agent is issuing the query on a user's behalf. RLS is the right place to put least-privilege enforcement, not the application layer sitting above it, because application-layer rules only hold as long as every request happens to pass through that application.

The canonical best-practices guidance for running AI agent workloads on Postgres, current as of early 2026, puts query performance, connection management, and security/RLS at the top of the priority list. Supabase became an official Claude connector in February 2026 and published Postgres best practices aimed specifically at AI agents, so you already have the integration surface you need to connect agents to Supabase. What most teams still need to build is the governance layer on top of it. There's an operational payoff to getting this right at the table level too: a logs table growing by millions of rows a month benefits from monthly partitioning precisely because unpartitioned analytical queries from agents at production scale create the query-performance and locking problems that RLS and read-replica routing exist to prevent.

What the shared layer must enforce: identity, read boundaries, and pre-modeled datasets

Three properties separate a real shared data layer from an agent that just happens to have a connection string. Agents need their own scoped identity, separate from inherited user credentials. They need to read from governed datasets, not production tables directly. And those datasets need to encode metric definitions, so an agent never has to interpret raw schema on its own.

On identity: every agent should carry a verifiable identity with permissions that specify exactly which data and tools it can reach, scoped to the task at hand rather than inherited wholesale from a user's full privilege set. The Five Eyes guidance names the engineering response directly: extend Zero Trust architecture, least-privilege access, and defense-in-depth to cover agentic workloads the same way they already cover human ones.

On read boundaries: security has to apply wherever the data actually lives, not only inside the AI application calling it. Enforcing permissions, masking rules, and regulatory requirements at the data layer keeps controls uniform no matter which consumer, human or agent, is making the request. Fine-grained row, column, and cell-level security is what makes least-privilege access real in practice, because the database enforces it where an agent cannot route around it.

On pre-modeled datasets: exposing a governed dataset, for example one stored in Parquet and queryable via DuckDB, rather than a live table, gives agents fast, cheap-to-query context without the production database ever entering the request path. The dataset itself encodes the filter, the grain, and the time window that make up the metric's definition, so an agent cannot quietly construct an alternative definition by reaching for a different column. The ambiguity is resolved before the agent starts reasoning, not after.

A single metric definition serving both the human dashboard and the agent's context window

The real payoff of this pattern is that humans and agents are now guaranteed to be reasoning about the same number, because there's exactly one place that number can come from, and the safety it adds comes as part of that. Take a metric like monthly recurring revenue: it exists once, with one filter, one grain, one definition of what counts toward it, and both the dashboard a founder checks each morning and the agent drafting a board summary pull from that same pre-calculated dataset. Nobody has to ask which version is current, because there is no other version.

That single definition replaces a familiar and costly alternative: finance teams reconciling different revenue figures across systems each week because every system calculated the number its own way. A shared layer doesn't make that reconciliation faster. It makes it structurally unnecessary, because the second definition that needed reconciling never gets created. For agents specifically, this closes off a particular interpretive risk in automated reporting. When an LLM is grounded with explicit, pre-defined data points, it can report what changed accurately. What it should not be trusted to do on its own is explain why revenue grew, since that's a causal claim, not a descriptive one, and the pattern handles this by keeping the agent's output descriptive and leaving causal judgment to the humans reading it. Starting with the systems that define customer acquisition, product usage, and revenue is enough to get the pattern working.

What agents can do with governed data versus raw database access

Diagram: Four Agent Access Models: From Read-Only to Cross-System. Visualizes: Visualize a vertical progression of four agent capability tiers, each building on the governance layer beneath it.

An agent working against pre-modeled, governed datasets can do more than one with raw database access, because it has the business context it needs to reason correctly instead of guessing at definitions under time pressure. You can see that capability across four access models, each building on the governance layer beneath it.

Read-only agents sit at the bottom of the risk scale and are the most widely deployed today. Because metric definitions are already resolved inside the governed dataset, these agents can search, retrieve, and summarize accurately, and they never have to figure out which table means what first. Task-based agents go a step further, taking specified actions based on what they retrieve, and this is where fine-grained access control stops being optional: pre-modeled datasets make it possible to grant access to one specific dataset without exposing the tables sitting next to it. Workflow-oriented agents carry out multi-step business procedures, pulling in new context as they go, and they plan and coordinate tasks toward a goal while staying inside governance rules the whole time, but that works only if you enforce governance at the data layer rather than configure it separately for each agent. Cross-system agents sit at the top of the sequence, reasoning across databases, SaaS tools, APIs, and document repositories simultaneously; research on enterprise agents identifies heterogeneous system integration alongside controlled data access as the two requirements that make this level work.

Automated reporting shows what the top of that ladder looks like in practice. If a reporting agent reads pre-defined KPIs from a governed layer, runs its queries against materialized datasets, and generates narrative grounded in cited values, it can produce accurate, board-ready summaries with no dedicated data team involved. The BI function doesn't disappear in that scenario. It shifts from producing reports by hand to governing the metrics those reports draw from. Enforcing governance at the data layer closes that gap by construction, because an agent that can only reach governed datasets has no path to the action that would need stopping.

Implementing the shared layer on Supabase without a data warehouse or a data team

A Supabase team can put this pattern in place today just by extending the Postgres project already running in production, with no new infrastructure to stand up. The sequence is straightforward. Start narrow: identify the handful of metrics that actually define customer acquisition, product usage, and revenue, and model those first rather than trying to cover every table in the schema. You pre-calculate and materialize the core metrics as governed datasets, with Parquet queryable via DuckDB as one lightweight, warehouse-free option, so agents are never in a position to construct a metric definition themselves at query time. You expose those governed datasets through a single MCP server, so human dashboards and agent context windows draw from the same interface, and that makes metric drift structurally impossible, not merely unlikely.

None of this requires ETL pipelines, schema migrations, or new infrastructure sitting alongside Supabase. The safety guarantee that falls out of this setup is direct. When agents query only the governed datasets exposed through the MCP server, they never touch the production database, and the blast radius of any agent mistake, hallucination, or compromise is bounded by whatever the governed layer was built to expose, nothing more.

This is the specific gap Dreambase was built to close for Supabase and Postgres teams. It pre-models data into governed datasets and exposes all of it through a single MCP server, so it works as the shared data layer for human teammates and AI agents alike, and you need no dedicated data team or separate data warehouse to stand up first. For a team that already trusts Postgres with its production data, the work left is drawing one governed layer between that database and everyone, human or agent, who needs to read from it.

Sources

  1. The 2026-07-28 MCP Specification Release Candidate
  2. Verifiable Agentic Infrastructure: Proof-Derived Authorization for Sovereign AI Systems
Filed underAgentic

More in Agentic