Try naming every AI agent in production at a mid-size company and watch the list stop short. Approval records cover the ones security signed off on. The agent the platform team stood up six weeks ago for an internal automation is fuzzier. The one a contractor left running on a shared compute box may not be known at all. No inventory was ever built.
That is the ground state of agent security. Before asking whether the agents are configured well, you have to know which agents exist. So the graph comes first: a model of which agents call which MCP servers, and which systems sit behind those servers. Everything else depends on it.
The Shape of the Graph
Nodes are agents, MCP servers and downstream systems. Edges are calls. On an agent node sit its identifier, the credential or service account it runs as, and where it is deployed. On a server node sit the tool manifest, the transport (stdio or HTTP) and the credential used to reach whatever lies behind it. A system node stands for a database, API, file store or anything else a tool can touch.
Read the edges and concrete paths appear. Agent A calls server B, and B can read and write database C. Agent D calls servers B and E, and E reaches external API F. None of this describes ordinary traffic. It describes what the current configuration and credentials make possible.
Latent reachability is the point. A path that no normal workload ever takes is still a risk, because a compromised agent, or one fed the wrong instruction, can take it.
Where the Data Comes From
No single source holds the graph. Building it means combining several, none of which was designed for the purpose.
Agent runtime manifests, when they exist, list what each agent is configured to call. In LangChain, CrewAI, AutoGen and similar frameworks, the agent definition lives in code or config, and its declared tools can be read there. For agents connected to MCP, the tool set follows from the servers the host launches or dials.
Registration data shows which servers exist in an environment. Sometimes there is a central registry. Often a server is declared inside an agent's config file and never listed anywhere else, so both places have to be searched.
Credential stores and service account systems carry the actual assignments: a stored OAuth token, a service account key, a secret manager reference. Turning any of those into a permission scope means resolving it against the identity system that issued it.
Container and process registries reveal what is running now rather than what was configured. An agent removed from the deployment manifest but still alive as an old container shows up in the process view and nowhere in the manifest scan.
Where Intent and Reality Diverge
The first pass rarely turns up one spectacularly broken agent. It turns up the gap between the graph teams believe they run and the one actually running.
The causes are ordinary. Temporary agents never get torn down. Test permissions stay on service accounts. A server config changes without anyone telling the agent team. Someone spins up a local development MCP server and its settings leak into staging.
Each of those gaps is a place where the security team's picture of the AI estate has separated from the estate itself. Policies, alerts and incident scoping built on that picture are built on the wrong information.
Keeping It Current
A graph captured once and left alone goes stale within weeks. Production AI changes with every release: new agents arrive, existing ones gain MCP connections, credentials rotate (often with new scopes), servers publish new tool declarations.
Updates are easier than the initial build because they arrive as events: a deployment, a config change, a credential rotation. Watching those sources and adjusting the graph as they fire is the model that works. Manual re-enumeration on a schedule misses everything between cycles, and that interval is precisely where risk collects.
What the Graph Makes Possible
Once it is maintained, several jobs that were guesswork become mechanical. Take blast radius. If agent A's token leaks, what can an attacker reach through A's server connections? Follow the edges instead of tracing config files during an incident.
Scope review works the same way. Which agents can reach production write paths through their servers? Which of those have gone 90 days without a scope review? Add a review timestamp and the answers sort themselves.
Anomaly detection needs a baseline. An agent that usually touches server B and database C, then suddenly connects to server F, has deviated from something the graph defines. Without it, there is nothing to compare against.
A complete graph does not solve AI security by itself. It makes scope review, incident response and anomaly detection possible at all, and their absence without it is why those activities feel like guesswork.