Computes what a sub-agent may actually do
agents.writerslogic.com/api/v1/permission-intersection
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 wit
POST
https://agents.writerslogic.com/api/v1/permission-intersectionUptime100% of 3 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://agents.writerslogic.com/api/v1/permission-intersection", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"user":["files:read","files:write","email:send"],"denied":[],"parent":["files:read","email:send"],"requested":["files:read","files:write","email:send"]}),
});
console.log(await res.json());Example input
{
"user": [
"files:read",
"files:write",
"email:send"
],
"denied": [],
"parent": [
"files:read",
"email:send"
],
"requested": [
"files:read",
"files:write",
"email:send"
]
}