---
title: What is least privilege for AI agents?
type: glossary
url: https://agentsfordevs.com/glossary/least-privilege-agents
markdown: https://agentsfordevs.com/glossary/least-privilege-agents.md
publisher: Agents for Devs
author: Agents for Devs desk
reviewed_by: Agents for Devs desk
published: 2026-12-06
updated: 2026-12-06
license: https://agentsfordevs.com/reuse
citation: Agents for Devs. "What is least privilege for AI agents?." Published Dec 6, 2026. https://agentsfordevs.com/glossary/least-privilege-agents
attribution: Credit Agents for Devs and link to https://agentsfordevs.com/glossary/least-privilege-agents
term: Least privilege for agents
aliases:
  - least-privilege agents
  - principle of least privilege
---

# What is least privilege for AI agents?

Least privilege for AI agents is the practice of giving an agent only the tools, OAuth scopes and runtime access its current task needs, and granting more only when a task requires it.

**Definition:** Least privilege for AI agents is the practice of giving an agent only the tools, OAuth scopes and runtime access its current task needs, and granting more only when a task requires it.

```http
HTTP/1.1 403 Forbidden
WWW-Authenticate: Bearer error="insufficient_scope",
                         scope="files:write",
                         resource_metadata="https://mcp.example.com/.well-known/oauth-protected-resource",
                         error_description="File write permission required for this operation"
```

That `403` is least privilege on the wire. Under MCP spec version 2026-07-28, a server can hand a client a narrow token and challenge for `files:write` only when a write is attempted. The client then re-authorizes with the union of its old and new scopes. MCP's security guidance warns against advertising every scope in `scopes_supported`, catch-all scopes such as `*` or `full-access`, and folding unrelated privileges into one grant so the user is never asked again.

The principle predates agents. NIST's glossary, citing CNSSI 4009-2022, applies it to users "or processes acting on behalf of users," which is what an agent is.

Apply it at every layer: expose fewer tools, request narrow scopes, act with the user's own permissions, and run local servers in a sandbox with restricted file system and network access. OWASP's LLM06:2025 Excessive Agency entry names three root causes: excessive functionality, permissions and autonomy. Least privilege handles the first two; human approval handles the third.

**See also:** [Tool allow-list](/glossary/tool-allow-list) · [Human-in-the-loop](/glossary/human-in-the-loop) · [Security checklist for shipping an MCP server](/guides/mcp-server-security-checklist) · [How coding agents ask permission](/guides/coding-agent-permissions)

## Sources

1. [Security Best Practices (version 2026-07-28), Model Context Protocol](https://modelcontextprotocol.io/docs/2026-07-28/tutorials/security/security_best_practices)
2. [Authorization (MCP specification version 2026-07-28), Model Context Protocol](https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization)
3. [least privilege (Glossary), NIST Computer Security Resource Center](https://csrc.nist.gov/glossary/term/least_privilege)
4. [LLM06:2025 Excessive Agency, OWASP Gen AI Security Project](https://genai.owasp.org/llmrisk/llm062025-excessive-agency/)

## Changelog

- 2026-12-06: First published.

## Cite this page

Agents for Devs. "What is least privilege for AI agents?." Published Dec 6, 2026. https://agentsfordevs.com/glossary/least-privilege-agents

- Page: https://agentsfordevs.com/glossary/least-privilege-agents
- Markdown: https://agentsfordevs.com/glossary/least-privilege-agents.md
- Reuse: quote or summarize with a link to the page. Terms: https://agentsfordevs.com/reuse
