arXiv(opens in a new tab)cs.MASep 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2609.06500

CAPMAS: Capability-Based Delegation of Privileges in Multi-Agent Systems

Rasmus Moorits Veski, Rachid Guerraoui, David Froelicher

Abstract

Agentic systems require secure and efficient delegation of privileges across multiple collaborating agents. Existing approaches fall into two categories. Some propagate user identities directly to agents, obscuring accountability and creating persistent over-privilege risks that are amplified by the non-deterministic behaviour of AI agents. Others rely on continuous synchronization with a central Identity and Access Management (IAM) provider, introducing additional latency and communication overhead.

We present CAPMAS, a novel architecture for secure end-to-end query execution in multi-agent systems. CAPMAS newly combines a contrastive learning-based semantic scoping pipeline that maps natural-language queries to bounded privilege sets before execution with expressive Macaroon-based tokens that enable offline, tamper-evident delegation with monotonic privilege reduction across agents. By decoupling authentication and delegation enforcement from agent reasoning, CAPMAS enables practical agentic execution while enforcing strict least-privilege guarantees.

By eliminating synchronous delegation exchanges with the IAM, CAPMAS yields 30 times faster delegation operations, 2 times less delegation-oriented latency and up to 3 times lower bandwidth usage than the OAuth 2.0 Token Exchange (RFC 8693). Its semantic scoping pipeline achieves over 90% perfect privilege-bundle retrieval within 17 milliseconds on enterprise-scale API schemas containing over 3,100 endpoints, while reducing unnecessary privileges by 99.5% when compared to systems that propagate all the user's privileges to agents.

1 Introduction

AI agents built on large language models (LLMs) are increasingly deployed to act on behalf of users across personal and enterprise services [39]. Because these agents must authenticate to external services, they are often granted user

credentials or access tokens. However, providing agents with full user authorization violates the principle of least privilege, exposing the system to unintended actions caused by LLM hallucinations or flawed agent design. This challenge is amplified in multi-agent systems, which have become the standard architecture for complex AI applications. In these environments, agents autonomously query each other just as a human user would, decomposing larger goals into logical, digestible subtasks that improve instruction following, reduce context complexity, and increase scalability [22]. Fig.1 depicts an example of such a scheme. While this distributed approach is highly effective, it expands the delegation surface. If a system defaults to propagating a user's global privilege set to every narrow-purpose agent, a localized hallucination in any agent can expose the entire service ecosystem. This risk becomes even more critical in future enterprise environments and open agentic web ecosystems, where hundreds of independently developed agents are expected to collaborate, and users must be able to safely delegate tasks to peer-hosted agents without risking their global privileges.

To prevent privilege escalation, every agent must have a fixed identity determining its privileges and upon delegation only the privileges which are possessed by all participants in the delegation chain should be used in the following actions. However, most existing systems based on identity-based authentication are incompatible with a multi-agent approach. The most widely deployed standard, JSON Web Token (JWT) [15], is inherently tied to a single request initiator. Since these legacy services expect a single-identity token, a multi-hop request involving several agents must either illegitimately assume a single identity (shown as "Standard JWT" in Fig.1) or fail entirely. Building on JWT, OAuth 2.0 Token Exchange (RFC 8693) [16] was introduced to support delegated authorization. However, obtaining a newly attenuated token still requires a network request to the central Identity and Access Management (IAM) provider at every delegation step, introducing additional communication overhead (illustrated by the red dashed arrows in "RFC 8693" in Fig.1). In a multi-agent ecosystem where tasks are rapidly subdivided and

*Correspondence to: rasmus.veski@epfl.ch

Figure

Figure 1: A user query in a five-agent system comparing three variants: Standard JWT, RFC 8693, and our Macaroon-based architecture CAPMAS. JWTs are never re-scoped, passing the original user access token U to all agents, leaving them over-privileged. RFC 8693 downscopes tokens (e.g., U→U′U \to U') but requires extra IAM communication (red dashed lines). Unlike existing methods, CAPMAS semantically pre-scopes the Macaroon and handles all down-scoping (e.g., M→M′M \to M') locally.

routed across numerous nodes, this constant token minting turns the IAM into an operational bottleneck.

More fundamentally, neither framework accommodates how agentic workflows operate in practice. Traditional protocols assume deterministic software components requesting structured API scopes. In contrast, agentic workflows are initiated through unstructured, unpredictable natural language (NL) queries executed by non-deterministic LLMs that require strict boundaries to contain hallucinations. Building a practical multi-agent system therefore demands addressing two challenges: translating NL intent into a strictly bounded privilege set and enabling offline token attenuation for access control [32, 34]. To the best of our knowledge, no practical architecture combining offline delegation with semantic request bounding for agentic systems has been proposed.

We present CAPMAS (CApability-based delegation of Privileges in Multi-Agent Systems), an architecture for agentic systems that newly unifies semantic privilege scoping from unstructured user intent with capability-based token delegation to enforce strict least-privilege guarantees across potentially large numbers of collaborating agents.

To eliminate centralized communication bottlenecks during delegation, CAPMAS instantiated the capability-based token framework of Macaroons [2]. Macaroons are attenuable authorization credentials that support offline delegation by allowing contextual restrictions, or caveats, to be appended through chained HMAC-based signatures [19]. Unlike identity-centric bearer tokens, Macaroons encode fine-grained privileges that can be progressively restricted at each delegation step without contacting the original issuer. In CAPMAS, Macaroons encode the operations an agent is permitted to perform, enabling authorization context propagation and monotonic privilege reduction across delegation paths.

While Macaroons' construction prevents privilege escalation by ensuring that privileges can only be attenuated during delegation, they do not inherently enforce least privilege, as they cannot infer which privileges a NL query actually warrants. Because agentic workflows typically initiate through high-level requests such as "Salary of Project

Phoenix lead?" [38], the system must translate unstructured intent into fine-grained constraints prior to delegation. In the flow depicted in Fig.1, if the Macaroon M′′M'' delegated to the Databases Agent only encodes coarse privileges (e.g., a generic "allow Projects" claim), the agent could still interact arbitrarily with the Projects Service when resolving the project lead. While an LLM could conceptually inspect available API specifications to infer the correct privileges, this approach incurs significant inference latency, remains susceptible to hallucinations, and fails entirely when enterprise API schemas exceed the model's effective context window [22].

Instead, CAPMAS treats privilege derivation as a semantic retrieval problem executed by the IAM prior to agentic execution. Using a contrastively trained encoder, all available system privileges are embedded offline into a shared semantic vector space. At runtime, the user query (e.g., "Salary of Project Phoenix lead?") is embedded into the same space, and a maximum of kk most semantically relevant privileges (e.g., permit:read_projects, read_HR) are retrieved via similarity search to define the maximum authorization boundary. These retrieved privileges are encoded directly into the root Macaroon as caveats. During execution, intermediate agents may locally further attenuate privileges, but can never exceed the initial boundary set by the IAM, therefore strictly bounding delegated authority to the top-kk or less retrieved scopes.

To empirically validate CAPMAS's practical viability, we implement its core components across a functional multi-agent demonstration, a cryptographic token-attenuation micro-benchmark, and a semantic retrieval evaluation. When compared to the alternative RFC 8693, CAPMAS achieves roughly 2 times fewer network calls, 3 times less bandwidth usage, and 30 times faster token attenuation operations. Our evaluation demonstrates an approximate 90% perfect privilege capture rate across the ASTRA [12] and XLAM [23] datasets in less than 20 milliseconds, successfully scaling to enterprise environments (3,100+ endpoints) where generative LLMs fail entirely due to context limits.

In summary, here we present CAPMAS, an end-to-end capability-based authorization architecture for multi-agent systems that enables the offline propagation of the intersection of privileges while maintaining a tamper-evident delegation chain. CAPMAS prevents privilege escalation without introducing centralized bottlenecks, scales to large numbers of agents, and enforces a strict upper bound on delegated privileges by mapping NL queries to a strictly bounded set of semantically relevant privileges before execution, enforcing least privilege while providing strict security guarantees.

References (36)

  • Macaroons: Cookies with contextual caveats for decentralized authorization in the cloud
  • A Simple Framework for Contrastive Learning of Visual Representations
  • Biscuit: A Bearer Token with Offline Attenuation and Decentralized Verification
  • Chain-of-verification reduces hallucination in large language models, 2023
  • Improving factuality and reasoning in language models through multiagent debate, 2023
  • Ai agents with decentralized identifiers and verifiable credentials
  • Ed25519 and Ed448 Public Key Algorithms for the Secure Shell (SSH) Protocol
  • Delegated authorization for agents constrained to semantic task-to-scope matching, 2025
  • The curious case of neural text degeneration, 2020
  • A novel zero-trust identity framework for agentic ai: Decentralized authentication and fine-grained access control, 2025
  • JSON Web Token (JWT)
  • OAuth 2.0 Token Exchange
  • Dense passage retrieval for open-domain question answering, 2020
  • Supervised contrastive learning, 2021
  • HMAC: Keyed-Hashing for Message Authentication
  • Langgraph: Low-level orchestration framework for building stateful agents., 2024
  • Rethinking negative pairs in code search, 2023
  • Lost in the middle: How language models use long contexts
  • Automated pipeline for generating verifiable and diverse function-calling datasets (opens arXiv in a new tab)
  • Pytorch: An imperative style, high-performance deep learning library, 2019
  • Nemo guardrails: A toolkit for controllable and safe llm applications with programmable rails, 2023
  • Sentence-bert: Sentence embeddings using siamese bert-networks, 2019
  • Position: Collaborative agentic ai needs interoperability across ecosystems, 2026
  • Lumimas: A comprehensive framework for real-time monitoring and enhanced observability in multi-agent systems, 2026
  • Authenticated delegation and authorized ai agents, 2025
  • Identity management for agentic ai: The new frontier of authorization, authentication, and security for an ai agent world, 2025
  • Announcing the agent2agent protocol (A2A): A new era of agent interoperability
  • Intelligent ai delegation, 2026
  • Representation Learning with Contrastive Predictive Coding
  • Attention is all you need, 2023
  • Transformers: State-of-the-art natural language processing
  • Auto-gen: Enabling next-gen llm applications via multi-agent conversation, 2023
  • The rise and potential of large language model based agents: A survey, 2023
  • C-pack: Packed resources for general chinese embeddings, 2023
  • Toucan: Synthesizing 1.5m tool-agentic data from real-world mcp environments, 2025
  • React: Synergizing reasoning and acting in language models, 2023