Documentation Index
Fetch the complete documentation index at: https://docs.kavachos.com/llms.txt
Use this file to discover all available pages before exploring further.
What is a delegation chain
A delegation chain lets one agent grant a subset of its permissions to another. The delegating agent keeps its own permissions unchanged. The receiving agent gains access only to what was explicitly delegated. This pattern is most useful when an orchestrator spins up sub-agents for specific tasks. Each sub-agent gets only the access it needs, for only as long as it needs it.The delegating agent must currently hold every permission it is trying to delegate. Attempting to delegate a permission not in the agent’s own set fails with
INSUFFICIENT_PERMISSIONS.Working with delegations
Creating a delegation
Agent ID granting the permissions. Must hold every permission being delegated.
Agent ID receiving the permissions.
Subset of permissions to delegate. Must not exceed the fromAgent’s own permissions.
When the delegation expires. After this point, the chain is no longer valid.
How many additional hops the chain can be re-delegated. Default is 3.
Permission subset enforcement
The permissions you delegate must be a subset of what thefromAgent holds. Narrower resources and fewer actions are allowed. Wider resources or new actions are rejected.
Given an orchestrator with:
Depth limiting
maxDepth controls how many additional re-delegation hops are allowed. With maxDepth: 2, the receiving agent can delegate to another agent, but that next agent cannot delegate further.
maxDepth when not specified is 3.
Cascading revocation
Revoking a chain removes it and all chains created downstream of it in the same tree.orchestrator → sub → subSub, revoking orchestrator → sub also revokes sub → subSub immediately. Any agent that relied on the revoked permissions will get allowed: false on its next authorization check.
Effective permissions
To see the full set of permissions an agent has at a given moment, including those received through active chains:authorize() request. You can call it directly to inspect what an agent can currently do before attempting an action.
Listing chains
DelegationChain type
Unique chain identifier, prefixed dlg_.
Agent ID that created the delegation.
Agent ID that received the delegation.
The permissions granted by this chain.
Expiry time for the chain.
Current depth of this chain in the delegation tree.
When the chain was created.
Typical pattern
An orchestrator holds broad permissions, plans a task, and issues short-lived narrow delegations to sub-agents.Next steps
Audit trail
Every delegation is logged with agent and depth info.
Agent identity
Create the agents that participate in delegation chains.
MCP OAuth 2.1
Use delegation with MCP-authenticated agents.