Your AI Agent Has Access to Everything. Who Is Controlling It? A developer argues that AI agents must be treated as their own security principals, with distinct identities, authorization layers, and audit trails, rather than inheriting human credentials or relying on prompt-based guardrails. The post cites NIST NCCoE's February 2026 concept paper on agent identity, its two-part blog series proposing ten design tenets, and a January 2026 Gartner report recommending unique identities with accountable human owners for every agent. It outlines a component model separating the model, agent runtime, tool layer, identity provider, authorization layer, resource service, and audit system. You build an agent that helps your team with software projects. At first it reads GitHub issues and summarizes pull requests. Then it gets a cloud integration to inspect failed deployments. A month later, someone adds "restart service" because it saves a trip to the console. Each step was reasonable. The product got better every time. But look at what you now run: a system that interprets instructions, chooses tools at runtime, and calls real infrastructure using credentials your application hands it. Gartner has predicted that 40% of enterprise apps will embed task-specific agents by 2026 https://nhimg.org/articles/agentic-identities-are-moving-into-the-enterprise-security-control-plane/ , up from under 5% the year before. Most of those agents will be wired up the way yours was: fast, incrementally, and with whatever credential was nearby. So ask yourself: None of these are prompt engineering questions. They are identity, authorization, and architecture questions. This post is a practical walkthrough of how to answer them, with the standards that already exist and code you can adapt. An agent should not hold authority just because it is capable of using it. Software has always needed identities. A backend authenticates to a database, a CI job pulls from object storage. What changes with agents is that the execution path is partly decided at runtime . You authorize an agent to "investigate a failed deployment." It reads logs, queries metrics, reads config, and proposes a fix. The task was narrow. The permissions behind it probably were not: This is not a brand-new problem. IAM, OAuth, workload identity, and secrets management already exist. The hard part is applying them to a caller whose next step you cannot predict. The standards bodies agree. In February 2026, NIST's National Cybersecurity Center of Excellence NCCoE published a concept paper https://www.nist.gov/news-events/news/2026/02/new-concept-paper-identity-and-authority-software-agents proposing a project on applying existing identity standards to software and AI agents. It is a proposal, not a standard. NIST then followed with a two-part blog series: Why Agentic AI Needs a Strong Identity Foundation https://www.nist.gov/blogs/cybersecurity-insights/back-future-why-agentic-ai-needs-strong-identity-foundation August 27, 2026 and Design Tenets for Agent Identity Management Systems https://www.nist.gov/blogs/cybersecurity-insights/design-tenets-agent-identity-management-systems October 27, 2026 , which lists ten proposed tenets. Gartner's guidance points the same way. As summarized by Descope https://www.descope.com/blog/post/gartner-report-iam-ai-agents , its January 2026 report recommends prohibiting the sharing of human credentials with agents and requiring a unique identity with an accountable human owner for every agent. Three independent sources, one message: treat the agent as its own principal. Before designing permissions, separate the parts that people usually blur into "the agent": | Component | Job | |---|---| | Model | Interprets context, suggests the next action | | Agent runtime | Runs the loop, holds state, issues tool calls | | Tool layer | Exposes a fixed set of approved operations | | Identity provider | Establishes which workload is calling | | Authorization layer | Decides whether that identity may do this, here, now | | Resource service | Enforces access on the real data or operation | | Audit system | Records what happened and under whose authority | Take a tool called deleteRepository . The model may conclude that deleting a repo helps its goal. That conclusion is not a permission. NIST's seventh tenet says it directly: the logic that decides what an agent attempts must be architecturally separate from the systems that decide what it is allowed to do. The post also states that guardrails alone are insufficient. So a system prompt line like "never delete important data" is a hint, not a control. Enforcement belongs where access is actually granted. The component that decides what to attempt must not be the only component deciding what is allowed. The default pattern looks like this: js const client = new SomeServiceClient { apiKey: process.env.SERVICE API KEY } ; Nothing is wrong with API keys where a provider is built around them. The trouble starts when that key becomes the agent's general-purpose authority. NIST's first blog is blunt about why: static API keys and bearer tokens don't prove who is calling, they only prove the caller has the string . Anyone holding it can present it, and the post notes such credentials routinely end up in config files, markdown files, and logs. Concretely, the key answers one question "does the caller possess an accepted secret?" and leaves the rest open: The fix is not "swap the API key for a token." A broadly scoped token is still broad. The shift that matters is from "the agent has a credential" to "the agent has a verifiable identity and a narrow, expiring grant of authority." Picture three actors in a team: a developer, a PR-review agent, and a release pipeline. If the review agent uses the developer's personal token, audit logs say the developer did things the developer never did. If it uses the shared deploy credential, it blends into other automation. Give it a dedicated identity instead: | Identity | Intended authority | |---|---| | Developer | Whatever their role grants | | PR-review agent | Read approved repos, post review comments | | Release agent | Publish a pre-approved release via a controlled workflow | | Monitoring agent | Read selected metrics and logs | These are examples, not templates. The properties that matter: a distinct identity , a named human or team owner , constrained permissions , and an independent lifecycle . You should be able to disable the agent without disabling its owner, and when an owner leaves, you need a deliberate policy for the agents that depended on them. For implementation, SPIFFE https://spiffe.io/docs/latest/spiffe-about/overview/ gives software workloads cryptographic identities SPIFFE IDs via SVIDs. Cloud-managed identities and workload identity federation serve the same purpose in single-cloud setups. A small app may need nothing heavier than a managed service identity. A real example of the payoff: OpenAI supports exchanging a SPIFFE JWT-SVID for a short-lived access token https://developers.openai.com/api/docs/guides/workload-identity-federation/spiffe , so the workload holds no long-lived API key at all. Two gotchas from their docs are worth knowing before you try it: the JWT-SVID must include iss , iat , and a kid header, and X.509-SVIDs are not supported as subject tokens. Setup details are provider-specific, but the pattern generalizes: prove identity through an identity system, receive a credential scoped and timed for the job. Least privilege is old advice. What's new is applying it when the caller picks tools on the fly. A PR-review agent needs to read the PR, read relevant files, maybe run approved tests, and post comments. It does not need to delete repositories, change org security settings, mint admin accounts, publish releases, or touch production. Express the grant as data, scoped to one task, with an expiry, using an allowlist only . A deny-list next to an allowlist adds confusion without adding safety. type Grant = { agentId: string; taskId: string; initiatedBy: string; // human or scheduler that started the task resources: string ; // exact IDs, e.g. "github:acme/payments-api" actions: Set