An AI agent receives a goal, decides which tools to call and in what order, and acts on systems with credentials it has been given. That makes it a non-human identity with unusually dynamic behavior: its next action depends on model output, which depends on everything in its context, including content an attacker may control. AI agent security borrows from identity security, application security and LLM safety, and focuses on a few questions. Which agents exist and who owns them? Which credentials and tools does each hold? Which actions should be allowed, which need a person, and which should never happen? And what record exists of what each agent did?
How it is used in practice
Teams register their agents with owners and purposes, give each its own identity and credentials rather than a shared human token, and entitle it to specific tools, for example through MCP servers. At runtime, an authorization check outside the model decides each consequential action: read-only calls may proceed, mutating calls on sensitive resources need a human approval, and anything from a suspended agent is refused. Every decision is logged. Incident response adds a way to stop one agent or all of them immediately.
Common pitfalls
- Guardrails inside the prompt. Instructions telling the model not to do something are not a control; prompt injection can override them.
- Inherited human credentials. An agent acting with its creator's token has all of that person's access.
- Unbounded autonomy. An agent allowed to take mutating actions without review turns one bad decision into many.
- No inventory. Agents built by teams on their own often appear nowhere in security tooling.
- Logging only successes. Refused and challenged actions are often the most informative records.
How TrustIvan relates to it
TrustIvan NHI Security authorizes an AI agent's actions at runtime. An agent runtime authenticates with a short-lived credential (1 to 90 days, shown once) and asks the runtime gate before acting; fourteen rules each allow, challenge, deny or abstain, the strictest answer wins, and a request nothing speaks for is denied. Five rules cannot be switched off, including quarantine and an organization-wide agent suspension. Challenged actions need an access grant approved by a different person. Decisions go to an append-only log. Its limits are stated in the docs: the gate decides only for a runtime that asks it, and NHI Security does not find agents for you; an agent must be registered in its inventory first. See Runtime gate.
Related terms
- MCP (Model Context Protocol) The Model Context Protocol (MCP) is an open protocol through which AI applications connect to servers that expose tools, resources and prompts, so a model can discover and invoke them in a standard way.
- Non-human identity (NHI) A non-human identity (NHI) is any identity that authenticates and acts without a person at the keyboard: a service account, IAM role, API key, OAuth application, CI/CD robot, workload identity or AI agent.
- Least privilege The principle of least privilege says that every user, process and machine identity should hold only the permissions it needs to do its job, and only for as long as it needs them.
- Policy as code Policy as code is the practice of expressing security, compliance and operational rules as machine-readable definitions that are versioned, reviewed and evaluated automatically, rather than as prose in a document.
- Credential rotation Credential rotation is the practice of replacing a secret, such as an API key, access key, token, password or certificate, with a new one and retiring the old, either on a schedule or in response to exposure.
On the platform: Agent authorization. All glossary terms