---
title: How to find every AI agent in your enterprise (including shadow agents)
url: https://opencontroller.lyzr.com/blog/how-to-find-shadow-ai-agents
published: 2026-11-11
updated: 2026-11-11
author: Lyzr
---

# How to find every AI agent in your enterprise

**To find every AI agent you run, scan four surfaces: your cloud accounts, your SaaS agent platforms, your model API keys and your developer devices. Then reconcile what you find against a single registry and give every agent an owner.** Treat everything you discover as "shadow" until someone registers and owns it. Repeat continuously, because new agents appear weekly.

## What counts as an AI agent for inventory purposes?

Use a broad definition. If it calls a model *and* can call a tool, API or another agent, inventory it. That includes:

- agents built on Amazon Bedrock AgentCore, Google Vertex AI Agent Builder or Microsoft Foundry,
- copilots and agents built in Microsoft Copilot Studio, Salesforce, SAP, ServiceNow, Databricks or HubSpot,
- custom agents in LangGraph, CrewAI, AutoGen or plain code, running on Kubernetes or serverless,
- assistants and skills in Claude Enterprise and ChatGPT Enterprise workspaces,
- coding agents such as Claude Code, Cursor and Copilot on developer machines,
- scheduled scripts that call an LLM and then write somewhere.

Prototypes count. Most incidents involve something that was "just a test".

## Step 1: Scan your cloud accounts

Each hyperscaler exposes agents, models and endpoints through its management APIs. Use read-only credentials scoped to inventory.

| Cloud | Where agents and model usage show up | What to record |
| --- | --- | --- |
| AWS | Bedrock agents and AgentCore runtimes, Bedrock model invocation, Lambda and ECS/EKS workloads calling model endpoints | Agent ID, account, region, model, IAM role, tags |
| Azure | Microsoft Foundry projects and agents, Azure OpenAI deployments, Container Apps and AKS workloads | Resource ID, subscription, deployment, managed identity |
| Google Cloud | Vertex AI agents and endpoints, Cloud Run and GKE workloads | Project, endpoint, service account, labels |

Don't stop at the agent services. Many agents are ordinary containers calling a model API, so look for workloads with model credentials attached.

## Step 2: Scan SaaS agent platforms

Business teams build agents inside the tools they already use. Connect to each platform's admin API to list agents, their creators, connected data and enabled actions. Pay special attention to agents with **write** actions (update a record, send an email, create a ticket).

## Step 3: Follow the API keys

Model API keys are often the first visible trace of an agent nobody registered. Inventory keys for OpenAI, Anthropic, Google, Azure OpenAI and others across your secret managers, CI variables and code repositories. Each key should map to a known agent and owner. A key with no owner is a lead, not a finding.

## Step 4: Cover developer devices and coding agents

Coding agents run on laptops, often with broad repository and shell access, plus MCP servers that connect them to internal systems. This surface is invisible to cloud scans. It needs an endpoint agent installed by IT through MDM, which reports which coding agents, skills and MCP servers are in use.

## Step 5: Reconcile against one registry

Discovery produces candidates. Governance starts when each candidate becomes a registry record with:

- **Owner**: a named business owner with authority to approve changes and stop the agent,
- **Purpose**: what it is for, in one sentence,
- **Risk tier**: based on data sensitivity, autonomy and reversibility of its actions,
- **Dependencies**: models, tools, MCP servers, APIs, credentials,
- **Status**: shadow, registered, approved, retired.

Everything starts as shadow. Early scans will look shadow-heavy, and that is expected, not a failure.

## Step 6: Keep discovery running

Schedule discovery to run continuously. Alert on three events: a new agent appears, an agent's permissions expand, and a registered agent loses its owner (for example, the owner leaves the company).

## What to do with the shadow agents you find

| Situation | Action |
| --- | --- |
| Useful and low risk | Register it, assign an owner, keep it running |
| Useful but risky (writes, sensitive data) | Register, move behind a gateway with scoped identity, require approval for consequential actions |
| Unknown owner, active traffic | Contact the creator; if no owner within a set window, restrict it |
| Abandoned | Retire it and revoke its credentials |

## Metrics that show progress

1. Share of discovered agents with a named owner.
2. Share of model spend attributed to a registered agent.
3. Median time from an agent appearing to it being registered.
4. Number of active credentials with no owning agent.

## How Opencontroller does this

[Opencontroller](/blog/what-is-opencontroller) auto-discovers agents, models and API keys across AWS, Azure and Google Cloud, connects to platforms such as Salesforce, SAP, Databricks and HubSpot, and discovers skills in Claude Enterprise workspaces. Opencontroller Edge covers developer devices. Every find lands in one registry with an owner field, and Posture flags risky permissions.

## Frequently asked questions

**Is discovery safe to run in production?**
It should use read-only, inventory-scoped credentials. Discovery reads metadata; it does not change agents.

**Can we govern an agent we can't connect to?**
You can register it. A registry entry is a metadata record, not a live connection. Observation and enforcement need telemetry or traffic routing.

**How many agents should we expect?**
More than the official list. Measuring that gap is the point of the first scan.

## Related

- [What is an AI agent control plane?](https://opencontroller.lyzr.com/blog/what-is-an-ai-agent-control-plane.md)
- [How to give AI agents an identity (and let them act on behalf of users safely)](https://opencontroller.lyzr.com/blog/ai-agent-identity-on-behalf-of-delegation.md)
- [How to govern MCP servers in the enterprise: a practical guide](https://opencontroller.lyzr.com/blog/how-to-govern-mcp-servers.md)
- [More on Discovery and shadow agents](https://opencontroller.lyzr.com/blog/cluster/discovery-and-shadow-agents)
