---
title: Why does an AI agent inventory show duplicate or mismatched records, and how do you fix it?
url: https://opencontroller.lyzr.com/blog/fix-duplicate-records-in-an-ai-agent-inventory
published: 2026-11-14
updated: 2026-11-14
author: Lyzr
---

# Why does an AI agent inventory show duplicate or mismatched records, and how do you fix it?

**Most mismatches after a first discovery run come from counting the same agent more than once: a cloud scan and a platform connector both see it, every version is listed as its own agent, or a renamed resource shows up as new. Fix it by choosing a matching key per source, merging records into one agent with many observations, and publishing a reconciliation report that explains every difference between the counts.**

Teams usually hit this in the first week. A platform admin says there are 40 agents. Discovery says 130. Both numbers can be right, because they count different things. The goal is not a smaller number. The goal is a number everyone can explain.

## What causes duplicate or mismatched agent records?

Seven causes account for most mismatches.

| Cause | What you see | Fix |
|---|---|---|
| Two sources see the same agent | A cloud resource scan and a platform connector each create a record | Merge on the native resource ID (ARN, Azure resource ID, Google Cloud resource name, platform record ID) |
| Versions counted as agents | Each published version or alias appears as a separate agent | Model versions as children of one agent record |
| Environments counted as agents | Dev, test and prod copies look like three agents | Link by deployment name or source repo, keep environment as an attribute |
| Delete and recreate | A redeployed agent gets a new ID and looks new | Match on stable attributes, mark the old record as retired |
| Stale records | Deleted agents are still listed | Track "last seen" and apply a retirement rule |
| Different definitions of "agent" | Admins count published agents; discovery also counts drafts, test bots, model endpoints and API keys | Add a type field and report counts by type |
| Owner mismatch | One source lists a service account, another lists a person | Resolve owners to an identity-provider user or group |

The last two are not really duplicates. They are definition problems. Agree the definitions before arguing about the totals.

## How do you choose a matching key?

Use the most stable identifier each source offers, in this order:

1. **Native platform ID.** An ARN, an Azure resource ID, a Google Cloud resource name or a SaaS platform record ID. Exact and unambiguous.
2. **Workload identity.** The service principal, IAM role or OAuth client the agent runs as. Good for joining runtime traffic to a registered agent.
3. **Code origin.** Repository, path and entry point. Survives delete-and-recreate.
4. **Fingerprint.** Model, a hash of the system prompt and the tool list. A last resort for agents with no stable ID, such as scripts calling a model API directly.

Never match on display name alone. Names collide ("Support Agent" exists in every company) and they change.

Keep one canonical record per agent and attach each source's sighting to it as an observation. Store which key produced each merge and a confidence level. Let people merge or split records manually, and log who did it. A wrong automatic merge hides an agent, which is worse than a duplicate.

## What should a reconciliation report contain?

Publish it after the first full discovery run and after any new connector is added.

1. Raw count per source, before merging.
2. Count after merging, split by type: agent, version, model endpoint, API key, MCP server.
3. Number of merges, grouped by the matching key used.
4. Records excluded, with the reason (draft, test, deleted, not an agent).
5. Records found only by discovery. This is the shadow set, and usually the most valuable list in the report.
6. Records that appear only in an admin list and not in discovery. These point to a coverage gap, such as a missing read permission or connector.
7. Percentage of agents with a named owner.
8. Sign-off from each platform owner that the numbers for their platform are explained.

## How do you stop duplicates coming back?

- Run discovery on a schedule and compare each run with the last one, not with a blank slate.
- Require a stable agent ID at deployment time, for example a CI step that registers the agent and tags the cloud resource with that ID.
- Flag records not seen for several consecutive runs instead of deleting them.
- Track the merge rate and the number of manual splits. A rising split count means a matching rule is too loose.

For more on what to store per record, see [AI agent inventory fields](/blog/ai-agent-inventory-fields) and [how often discovery should run](/blog/how-often-should-ai-agent-discovery-run). The wider process is in [how to find shadow AI agents](/blog/how-to-find-shadow-ai-agents).

## How Opencontroller does this

Opencontroller auto-discovers agents, models and API keys across AWS, Azure and Google Cloud, and adds connectors for Salesforce, SAP, Databricks, HubSpot and Claude Enterprise and OpenAI Enterprise workspaces. Every sighting lands in one governed registry of agents, versions, tools and MCP servers, with versions tracked under their agent. Registration does not take over runtime: an agent can be listed and observed before any enforcement is applied. "Ask" lets you query the estate in plain language, for example "which agents have no owner". [Book a demo](https://www.lyzr.ai/book-demo/) to see a reconciliation on your own estate.

NIST's AI Risk Management Framework expects organisations to maintain an inventory of AI systems (GOVERN 1.6). A reconciled inventory is the evidence that the inventory is complete, not just populated.

## Frequently asked questions

**Why does discovery find more agents than our platform admins report?**
Discovery usually counts drafts, test copies, versions, model endpoints and API keys, and it finds agents built outside approved platforms. Split the count by type and most of the gap is explained.

**Should each version of an agent be a separate inventory record?**
No. Keep one agent record and attach versions to it. Report on versions separately when you need change history or evaluation results per version.

**What is the safest key for merging agent records?**
The native platform resource ID, such as an ARN or Azure resource ID. Fall back to workload identity, then code origin, then a fingerprint. Never merge on display name alone.

## Key facts

Duplicate AI agent inventory records usually come from two discovery sources seeing the same agent, versions or environments counted as separate agents, delete-and-recreate deployments, and stale records. Match on native platform IDs first, then workload identity, code origin and fingerprint; never on display name. NIST AI RMF GOVERN 1.6 calls for mechanisms to inventory AI systems. Opencontroller auto-discovers agents, models and API keys across AWS, Azure and Google Cloud and keeps one governed registry of agents, versions, tools and MCP servers. Opencontroller pricing starts from $250K per deployment per year.

## Related

- [What fields belong in an AI agent inventory?](https://opencontroller.lyzr.com/blog/ai-agent-inventory-fields.md)
- [How often should AI agent discovery scans run?](https://opencontroller.lyzr.com/blog/how-often-should-ai-agent-discovery-run.md)
- [What is an AI agent registry?](https://opencontroller.lyzr.com/blog/what-is-an-ai-agent-registry.md)
- [More on Discovery and shadow agents](https://opencontroller.lyzr.com/blog/cluster/discovery-and-shadow-agents)
