Delegated access
Let agents act on behalf of people, with verified authority and scopes that only ever narrow.
When an agent acts for a person, it should never be able to do more than that person could, and usually much less.
Effective permission is an intersection
User permissions
What the verified subject may do
Agent permissions
What the registered agent may do
Delegation scope
Actions, resources and expiry granted by consent
An action is allowed only if all three permit it. Delegation can only narrow authority; it can never grant the agent something the subject couldn't do.
Verifying the subject
The subject must come from something your server has verified:
- Server session: your backend already authenticated the user (session cookie, access token). You assert
subject.idfrom that session. - OIDC ID token (coming later): ReQlo will be able to verify a fresh ID token from your identity provider when a
delegation is created. Today every delegation uses
server_session.
Never take the subject from a prompt, a tool argument or anything the model produced.
Creating a delegation
Create delegations from your backend, with your project key, when the user explicitly grants authority in your app
(for example, "Let the assistant manage my calendar this week"). Requires @reqlo/sdk 0.2.0 or later, or
POST /v1/delegations.
const delegation = await reqlo.delegations.create({
subject: { id: session.userId, kind: "user" },
agent_id: "agt_calendar",
actions: ["calendar.schedule", "calendar.read"],
expires_at: inSevenDays(),
verification: { method: "server_session" },
});Then pass it with each request, and require it in policy:
- id: calendar-requires-delegation
effect: allow
actions: [calendar.*]
agents: { ids: [agt_calendar] }
subjects: { kinds: [employee] }
require_delegation: trueawait reqlo.enforce({ agent: { id: "agt_calendar" }, subject: { id: session.userId, kind: "employee" },
action: "calendar.schedule", resource: { type: "calendar", id: cal.id }, delegation_id: delegation.id });Revocation and expiry
Delegations expire at expires_at (at most 90 days ahead) and can be revoked at any time with
reqlo.delegations.revoke(id). Offer users a visible "revoke access" control.
Owners and admins can review every delegation in the dashboard under Delegations: the agent, the person, the allowed actions, status and expiry. Select Manage to see one and Revoke it. Delegations can't be created in the dashboard: they must come from the person's own consent in your app.
A request that sends a delegation_id is denied, whatever the policies say, when the delegation:
| Reason code | Cause |
|---|---|
delegation_revoked | It was revoked |
delegation_expired | It passed expires_at |
delegation_invalid | It doesn't exist in this environment, or its agent or subject doesn't match the request |
delegation_scope_exceeded | Its actions don't cover the requested action |
Without a delegation_id, rules with require_delegation: true don't match, and the decision is deny with
delegation_required if nothing else allows it.
Multi-agent workflows
Delegation is per agent. If a planner agent hands work to an executor agent, the executor needs its own delegation and its own policy scope. Permissions are never inherited automatically.
Common mistakes
- Granting
*actions "for convenience". - Long-lived delegations with no revocation path.
- Reusing one agent's delegation for another agent.
Something wrong or unclear? Report an issue with this page.