keepcalculator

06 Numbers and Powers

AI Agent Identity: Why Authorization Must Choose the Acting Subject

Card No. 06·80743 · Updated · Standard formula, shown below

When an AI agent performs an action, the authorization must be tied to the specific subject that is acting—the agent itself—not just the human who initiated it or the system that hosts it. This is because an agent can act autonomously, sometimes in ways the user never anticipated, and without a clear acting subject, you cannot enforce least privilege, audit decisions, or hold anyone accountable. This article explains the core problem, how identity works for agents, and the practical steps to authorize them safely.

Why the Acting Subject Matters

In traditional systems, a user logs in, and the system knows exactly who is making each request. With AI agents, the chain of actions is no longer linear: a user might give a high-level goal, and the agent decides the specific steps, calls external APIs, and modifies data. If you authorize the agent using the user’s identity, you give the agent all the user’s permissions—including ones the user never intended to delegate. The agent becomes an over-privileged actor, and any mistake or malicious exploit can cause damage far beyond the original task.

Moreover, when something goes wrong, you need to know which specific agent instance performed the action, not just which user was logged in. An audit log that says “User Alice modified the database” is misleading if Alice never directly executed that command—her agent did. The acting subject is the agent, and that is what must be recorded for accountability.

How Agent Identity Works

An agent identity is a set of credentials and attributes that uniquely identify a specific software agent. Unlike a user account, an agent identity typically has:

  • A unique ID – such as a UUID or a service account name.
  • Scoped permissions – limited to the resources and actions the agent needs.
  • Metadata – including its purpose, owner, and creation date.
  • Credentials – such as API keys, OAuth tokens, or short-lived certificates.

When an agent makes an API call, it presents its own credentials, not the user’s. The authorization server then checks whether that agent identity has permission to perform the requested action on the target resource. This is the same model used for service accounts in cloud computing, but with a critical twist: agents can make decisions, so their permissions must be dynamically constrained based on the task and context.

How to Choose the Right Acting Subject

Choosing the acting subject is not a one-size-fits-all decision. You must consider the agent’s autonomy level, the sensitivity of the data, and the potential impact of actions. Here are practical steps:

  1. Identify the agent’s purpose – what is it supposed to do? List the exact resources it needs (files, databases, APIs) and the actions (read, write, delete).
  2. Assign a dedicated identity – create a service account or agent identity with the minimal permissions required. Do not reuse a human user’s credentials.
  3. Define the delegation scope – specify what the agent is allowed to do on behalf of the user. Use OAuth scopes or role-based access control (RBAC) to limit actions.
  4. Implement dynamic constraints – for high-risk actions, require human approval or set time limits. For example, an agent might be allowed to read data anytime, but must ask before deleting anything.
  5. Log the agent’s identity – include the agent ID in every audit trail, along with the user who initiated the session, so you can trace the full chain of responsibility.

Common Problems and Misconceptions

A common misconception is that an agent is just a tool, so the user’s identity should be used for everything. This leads to the problem of over-privilege, as described above. Another misconception is that agent identity is the same as the underlying service account. In practice, you might have multiple agents sharing one service account, which makes it impossible to attribute actions to a specific agent. Each agent should have its own identity.

Another frequent issue is that agents are given long-lived credentials, which increase the risk of theft. Best practice is to use short-lived tokens that are automatically rotated. Also, many teams forget to revoke an agent’s access when it is decommissioned, leaving orphaned credentials that can be exploited. Always have a lifecycle management process for agent identities.

Comparison: User Identity vs. Agent Identity

To clarify the distinction, consider the following comparison:

  • User Identity – represents a human being. It is used for authentication, personal preferences, and accountability. A user typically has broad permissions based on their role.
  • Agent Identity – represents a software program. It is used to authenticate the agent to services. Its permissions are narrow and specific to the task. It may also carry metadata about the agent’s purpose and owner.

Using the user’s identity for the agent is like giving your car keys to a valet, but also giving them your credit card and house keys. The valet only needs to drive the car, not access your bank account. Similarly, an agent that sends emails does not need permission to delete your entire inbox.

Costs and Safety Considerations

Implementing proper agent identity has a cost: you must design, deploy, and maintain additional infrastructure. This includes identity providers, token management, and audit systems. However, the cost of a security breach or a costly mistake due to over-privileged agents is usually far higher. Safety is paramount, especially for agents that can affect physical systems or financial transactions. Always follow the principle of least privilege: give the agent only the permissions it absolutely needs, and no more.

For high-risk actions, consider a human-in-the-loop approval mechanism. The agent can request permission, and a human must approve it before the action is executed. This adds a safety net that prevents catastrophic errors, even if the agent’s logic is flawed.

Alternatives and Future Directions

Some emerging approaches include using decentralized identifiers (DIDs) for agents, which allow agents to have self-sovereign identities that are not tied to a single provider. Another alternative is to use policy-based authorization, where the agent’s access is determined by a set of rules that evaluate the context (e.g., time of day, data sensitivity, user intent). These approaches are still evolving, but they all share the same core principle: the acting subject must be explicitly identified and authorized.

In the future, we may see agents that can negotiate their own permissions with other agents, but even then, the identity of the acting subject will be key to trust and accountability.

Frequently Asked Questions

What is the difference between an agent identity and a service account?

A service account is a type of identity used by applications or services to access resources. An agent identity is a specific type of service account that is assigned to an AI agent. The key difference is that an agent may make autonomous decisions, so its identity must include metadata about its purpose and constraints, and its permissions may be dynamically adjusted based on the task.

Can an agent use the user’s OAuth token?

Technically it can, but it is not recommended. If the agent uses the user’s token, it inherits all the user’s permissions, which violates the principle of least privilege. Instead, the agent should have its own token with scoped permissions, and the user’s token should only be used to initiate the agent and delegate a limited set of rights.

How do I audit actions performed by an AI agent?

You need to ensure that every action taken by the agent is logged with the agent’s identity, the user who initiated the session, the timestamp, the action, and the target resource. This allows you to reconstruct the full chain of events. Use centralized logging and monitoring tools to collect and analyze these logs.

What happens if an agent’s identity is compromised?

If an attacker gains control of an agent’s credentials, they can perform any action the agent is authorized to do. To mitigate this, use short-lived credentials, rotate them frequently, and monitor for unusual behavior. If a compromise is detected, revoke the agent’s credentials immediately and investigate the audit logs to determine the extent of the damage.

Is it necessary to have a separate identity for every agent instance?

Yes, ideally. If you have multiple instances of the same agent running, each should have its own identity so you can attribute actions to a specific instance. This is especially important in distributed systems where multiple agents might be running concurrently.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →