Map the Agents
Before you can constrain an agent or watch it, you have to know it is there. Most were never written down, because no one set them up as a security object. The honest answer to how many you have is usually the finding.
Field guide: Securing the Agents Already in Production. Part 1 of 5. Last reviewed: September 2026.
Before you can constrain an agent, watch it, or write a single detection for it, you have to know it is there. That sounds too obvious to write down. The honest test is whether you can produce that list for your own environment today.
The argument for why this matters is in a separate note, The Detection Stack Assumes a Human at the Keyboard. The short version is that the harm now arrives from a real identity doing authorized work, and the record of that work usually sits in a system the security team does not own. This guide is the operational answer to that note, and it has to start here. You cannot govern a population you have not counted.
This is the least interesting part of the work. It is the part the rest depends on.
An agent is anything that acts under a credential
For this guide the population is agents: workflows that take actions through tools, under a real identity, with enough autonomy or delegated authority that no person reliably approves each consequential step. A copilot wired into your ticketing system. A scheduled job that reads a warehouse and emails a summary. A model with function calling and a set of API keys. The AI ones are why this is urgent and why the count keeps climbing, but draw the line too narrowly and you will miss the older automation sitting right next to them with the same kind of access.
The test is not whether there is a model in the loop. It is whether something that is not a person is taking authorized actions in your systems on its own. The point is not that every service account is an agent. It is that every agent is, in the end, an identity, a credential, a set of tool paths, and a log trail. That is what the register records.
Most of them are not written down anywhere
This is the real work, because agents were rarely set up as a security object. They were set up by whoever needed the workflow. So you have to go and find them.
Start in the identity provider. In Okta or Microsoft Entra ID, look for the service accounts, the app registrations, and the OAuth grants that are not attached to a human. Move to cloud IAM: the AWS roles and access keys, the GCP service accounts, the Azure managed identities, and what each one is allowed to assume. Go to where the keys live, Vault, AWS Secrets Manager, the CI secrets and the .env files, because an Anthropic or OpenAI key sitting in a pipeline is an agent the moment something calls it. Open the orchestration. LangChain, LangGraph, MCP server configs where they exist, and whatever internal framework declares which tools an agent can actually reach. Check the SaaS tools for the AI feature somebody switched on inside a product that already holds broad access to your data.
Then have the conversation the note pointed at. Ask platform and data engineering what they are running, because that is where the agents live and where their logs already sit.
Expect to find agents nobody owns. Expect to find agents that three people each assumed someone else was watching. Write all of them down.
There are tools that automate part of this. The non-human identity and workload identity platforms, Oasis Security, Astrix, Entro, GitGuardian, and others, discover service accounts, API keys, and OAuth grants across cloud, SaaS, and CI/CD and pull them into one inventory, and several now advertise coverage of AI agents and MCP servers too. Naming them is not an endorsement. Be clear on what they do and do not do for you. They collect and they correlate. They do not decide who owns an agent, and they do not tell you whether a given scope is the right one, which is the part that actually matters. Their agent coverage is also newer and thinner than their coverage of secrets and service accounts, so treat any inventory they hand you as a strong start, not a finished one.
Update, 18 September 2026. The non-human identity market has consolidated quickly since this was written. Cisco has acquired Astrix Security, SailPoint has acquired Entro Security, and Cyera has acquired Oasis Security. The underlying capability has not gone away. If anything, these acquisitions show how quickly agent and non-human identity discovery is being pulled into larger identity and security platforms.
Write down the action surface, not just the access
The register is the artifact. One row per agent, and these fields at a minimum:
- What it does, in one plain sentence.
- The identity it runs as. The specific credential or service account, not “a service account.”
- The owner. A named person. Not a team, not a distribution list.
- What it can read. Which data, at what scope.
- What it can write, send, change, or delete. This is the action surface, and it is the line that decides blast radius.
- What triggers it. A schedule, a webhook, a person, another agent.
- Where its activity is logged today. You will need this in Part 3, and the honest answer is often a developer observability tool the security team cannot search.
The field that gets overlooked is the write surface, because read access feels harmless. It is not. The example in the anchor note was an agent with read access to a customer table and write access to email. Each grant was reasonable on its own. The combination shipped customer records to the wrong people faster than anyone could step in. Your register has to put read and write on the same line, for the same agent, so that combination is visible before it runs and not after.
An agent does not have to be compromised to cause the incident. It only needs permissions that were each reasonable one at a time.
The agent running as a person is the hard case
Some of what you find will be running under a human’s credential. A real person’s account, borrowed by an automation. Flag every one of these, because they are the worst case for everything that follows. In the logs, that agent is the person. Every action it takes is indistinguishable from the human it borrowed. You cannot scope it separately, you cannot watch it separately, and you cannot tell the two apart after the fact.
This is the non-human side of a question I have asked here before. If that account were compromised tonight, how far could it move before it hit a real boundary. An agent sitting on a person’s credential answers that badly, and it answers it for an actor that never sleeps and never slows down.
The register is stale the day you finish it
So treat it as a standing practice, not a project. New agents keep arriving. Put the register somewhere it gets updated as a matter of course, tie it to whatever provisioning path hands out the credentials, and review it on a cadence you will actually keep. The rule that makes it hold is simple. Nothing ships to production as an agent without a named owner and a recorded scope, written down before it runs.
The metric to start with is a count. How many agents are running under real identities, how many have a named owner, how many have their write surface written down. If you cannot produce that count this week, that is not a failure of the exercise. That is the finding.
None of this requires new tooling, even if some of it can be automated. It needs you to admit how many of these are already running before one of them does something it was allowed to do and you have to explain it to someone.
Once you can see them, you can start taking away what they do not need. That is Part 2.
// keep reading