Effective permissions of a delegated agent: requested ∩ user ∩ parent, minus explicit denials
Computes what a sub-agent may actually do: the permissions it requested, intersected with what the end user holds and what its parent agent holds, minus any explicit deny list, and says for each denied permission which party lacks it. Permission names are compared exactly (no wildcards); caller-declared implications (for example 'admin' grants 'read') can be given and are expanded transitively with cycles tolerated. fail when any requested permission is not granted (privilege escalation attempt: requested beyond the parent is marked); pass when all are. Does not authenticate anyone or know any permission model.
What you get
Stops a delegate from exercising a permission neither the user nor the parent agent had.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/permission-intersection. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/permission-intersection \
-H 'content-type: application/json' \
-d '{"requested":["files:read","files:write","email:send"],"user":["files:read","files:write","email:send"],"parent":["files:read","email:send"],"denied":[]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
requested | array<string; length 1..200>; max 300 items | yes | Permissions the delegate asks for. |
user | array<string; length 1..200>; max 300 items | yes | Permissions held by the end user. |
parent | array<string; length 1..200>; max 300 items | yes | Permissions held by the delegating agent. |
denied | array<string; length 1..200>; max 300 items | no | Explicit denials; they win over any grant. |
implies | array<object>; max 100 items | no |
Example request body
{
"requested": [
"files:read",
"files:write",
"email:send"
],
"user": [
"files:read",
"files:write",
"email:send"
],
"parent": [
"files:read",
"email:send"
],
"denied": []
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
granted | array<string> | no | |
denied | array<object> | no | |
effective | array<string> | no | Everything the delegate could exercise including implied permissions, minus denials. |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the execution-safety-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent