guide
guide9 min read

How Do I Build an Inventory and Registry of the AI Agents That Can Access My Data Warehouse?

Discover every agent from warehouse metadata, record an owner for each, and keep the registry current

Build the registry from the warehouse outward, not from a survey of teams inward. Every agent that touches your warehouse authenticates as some user and role, and the warehouse already records who ran what. In Snowflake, the ACCESS_HISTORY view keeps 365 days of records of which objects each query read. That history is the discovery source. The registry is a small table that attaches an owner, a purpose, a permission scope and a review date to each identity you find.

Key Takeaways

  • •An agent registry is a table of identities, not a document: each row binds a warehouse user and role to an owner, a purpose, a data scope and a review date.
  • •Discovery should start from warehouse metadata (query history, login history, role grants), because surveys miss the agents nobody remembers creating.
  • •Classify each agent by what it can do (read, write, administer) and what data it can reach, then tier review frequency by that risk.
  • •A registry that is not reconciled against the warehouse on a schedule goes stale within weeks; automate the diff and alert on unregistered identities.
  • •The goal is that no agent identity can run queries without a named owner and a recorded purpose.

Why an inventory comes before every other agent control

Access policies, approval workflows and audit trails all assume you know which agents exist. If a coding assistant, a notebook bot and a scheduled summarizer all share one analyst's credentials, you cannot write a policy for any of them, because the warehouse sees one human. A 2026 governance guide on agent audits lists inventory and classification as a core audit domain. It says much less about how to build one.

We think the gap exists because inventory sounds like a documentation task, so teams assign it to a spreadsheet. A spreadsheet fails on the first reorg. The warehouse, by contrast, enforces identity on every query. An inventory that is derived from, and checked against, that enforcement layer stays honest in a way a manually maintained list cannot.

The questions the registry has to answer are concrete. Which agents can read the columns that hold PII? Who owns the one that ran 4,000 queries last night? Which agents have write grants they no longer need? Each question maps to a column in the registry, and each column has a warehouse-side source you can use to fill it in.

Step 1: Decide what counts as an agent

Write the definition before you query anything, or the discovery results will be arguments instead of data. Our working definition: an agent is any non-human caller that issues queries or tool calls against the warehouse on its own initiative, within a loop that chooses the next action. A scheduled dbt job is automation, not an agent. A coding assistant that reads the schema, writes SQL and runs it is an agent, even if a human started the session.

Edge cases decide whether the registry is useful. Include any MCP server that exposes warehouse tools, since the Model Context Protocol specification defines servers as the way a model client reaches tools and data. Include BI assistants that generate SQL on a user's behalf. Exclude plain dashboards that run fixed queries. When in doubt, ask whether a model chooses the query text. If it does, register it.

Also decide the unit of registration. We register one row per warehouse identity (user plus role), not per product. A single assistant product may appear three times if it connects with three roles, and that is correct, because each role has a different blast radius. Product-level grouping can be a column, not the key.

Step 2: Discover agents from warehouse metadata

Start with the identities the warehouse already knows. Pull the user list, the role grants for each user, and 90 days of query history grouped by user, role and query tag. Snowflake's QUERY_HISTORY view records the user, role and query tag for each statement and retains 365 days. Service-type users, users with no recent interactive login, and users whose query text is machine-shaped are the first candidates.

Then cross-check login records. The LOGIN_HISTORY view shows the client type and source IP for each authentication. A user that logs in only from a cloud IP range, never from an office, with a driver rather than a browser client, is likely an automated caller. This catches the agent that borrowed a human's key-pair, which a user-type filter alone would miss.

Finally, sweep the places credentials live: secret stores, MCP client configuration files, CI variables and notebook environments. Warehouse metadata tells you what connected; configuration scanning tells you what is able to connect. The difference is your dormant risk. Expect the first pass to produce a list longer than anyone on the team predicted, and expect some identities with no known owner. Those are the most important rows to resolve first.

Step 3: Define the registry record

Keep the schema small enough that people fill it in. Each row needs an agent identifier, the warehouse user and role it uses, a named human owner, a one-sentence purpose, the data domains it may read, whether it can write, the client or framework it runs in, a creation date, and a next-review date. Anything beyond that, such as model version or prompt hash, can be added once the basics are reliably populated.

  • •Identity: agent name, warehouse user, warehouse role, authentication method.
  • •Accountability: owner, backup owner, team, approval reference for the grant.
  • •Scope: schemas and tables readable, write permission yes or no, PII access yes or no.
  • •Lifecycle: created date, last query seen, next review date, status (active, paused, retired).
  • •Provenance: client or framework, MCP servers it calls, environment (dev or prod).

If your agents call tools through MCP servers, those servers deserve their own rows. The open MCP registry project on GitHub shows how the protocol community describes servers as discoverable records with metadata. You do not need to adopt its format, but its idea carries over: a registry entry describes what a thing is and how to reach it, and a separate control decides whether it is allowed to.

Store the registry where the warehouse can join against it. A table in a governance schema lets you write the reconciliation query in step 5 in plain SQL. If the registry lives only in a wiki, the check becomes a manual task, and manual tasks are the ones that stop happening.

Step 4: Classify each agent and tier the review

Classification turns the list into a decision tool. Score every agent on two axes: capability (read-only, write to a sandbox, write to production, administer grants) and data sensitivity (public, internal, regulated). A read-only agent on internal marts is low risk. A write-capable agent that can reach regulated columns is high risk, and the registry should say so in a field the review process reads.

Tie review frequency to the tier. We use quarterly review for low-risk agents, monthly for medium and per-change approval for high. The numbers are a starting point we chose, not an industry standard, so adjust them to how fast your agents change. What matters is that the tier is recorded and that someone is on the hook when a review date passes.

Be honest about capability drift. An agent registered as read-only can gain write access through a role inheritance change that nobody connected to the agent. Compute the effective privileges from the grant graph on every reconciliation and compare them with the registered scope. The registered scope is the intent; the effective privilege is the fact. A mismatch between them is a finding.

Step 5: Keep the registry current by reconciling against the warehouse

Run a scheduled job that diffs the registry against warehouse reality. Three diffs matter. First, identities seen in query history that have no registry row: these are unregistered agents or humans misusing shared keys. Second, registry rows with no query activity for 90 days: candidates for retirement and credential revocation. Third, rows whose effective privileges exceed the registered scope.

Make registration the cheapest path. If creating a warehouse user for an agent requires a registry row (enforced through your provisioning pipeline or a pull-request check), people register because it is the way to get access. If registration is a separate form afterwards, compliance depends on goodwill, and goodwill decays.

Send findings to owners, not to a central queue. A message that says an agent you own has had no activity in 90 days and still holds read access to the customer schema gets resolved. A monthly report to a security channel gets skimmed. Keep the owner field authoritative and the escalation path short, and the registry will stay accurate with very little ongoing effort.

Where Data Workers fits

Everything above can be done with SQL and a scheduler, and we recommend starting that way. Where an agent helps is the repetitive parts: the discovery sweep, the effective-privilege calculation and the owner notifications. The Data Workers Governance Agent detects PII columns, generates RBAC policy, keeps audit trails and maps controls to SOC2, GDPR and HIPAA, so the question of which agents can reach regulated columns is answerable from one place.

It runs as an MCP server inside the clients your engineers already use, such as Claude Code or Cursor, so you can ask a question like who has access to PII columns in analytics and get an answer grounded in warehouse grants. The open-source edition is read-only by default, which suits an inventory job that should observe and never change a grant.

Writes, approval workflows and audit trails sit in Pro. In that setup a registry diff can open an approval request for revoking a stale grant instead of just reporting it. Data stays in your infrastructure throughout, which matters when the thing you are inventorying is access to sensitive data.

Frequently Asked Questions

What is an AI agent registry?

An AI agent registry is a table that lists every non-human caller allowed to act on your data, with the warehouse identity it uses, a named owner, its purpose, its data scope and a review date. It differs from a catalog of datasets because the rows describe actors, not assets. The useful property is that it can be joined against warehouse query history to find agents that are running without being registered.

How do I find agents that nobody told me about?

Look in the warehouse, not in a survey. Group recent query history by user, role and query tag, then flag identities with machine-shaped traffic, cloud-only login sources and no recent interactive session. Add a configuration sweep of secret stores, MCP client configs and CI variables to find credentials that could connect even if they have not yet. Every unexplained identity gets an owner assigned or its credential revoked.

How often should the registry be reviewed?

Reconcile it against the warehouse on a schedule, daily or weekly, because that diff is automatic and cheap. Human review should follow risk tier: we suggest quarterly for read-only agents on internal data, monthly for medium risk, and approval at every change for write-capable or regulated-data agents. These intervals are our own starting point, not a published standard, so tune them to how fast your agents change.

Do I need a separate tool to build this?

No. A governance-schema table, the warehouse's account usage views and a scheduled query are enough to start. Add tooling when the sweep, the privilege calculation and the owner notifications become work you would rather delegate. The registry design matters more than the tool: stable identity keys, a required owner and a reconciliation job that fails loudly.