Carry X-Agent-Capability
A signed kya.v1 header tells the Edge Sensor which routes an agent may call—skipping human 800ms UI dwell checks and decoy locks without weakening enforcement.
Your own FX routers, support bots, and partner SDKs shouldn’t share god-mode API keys—or trip perimeter bot traps. Hangoo gives authorized agents cryptographic capability passports (kya.v1) with hard spending ceilings and a clean HTTP 428 human approval loop.
X-Agent-Capability
A signed kya.v1 header tells the Edge Sensor which routes an agent may call—skipping human 800ms UI dwell checks and decoy locks without weakening enforcement.
Support bots run as propose_only, analytics tools run as read_only, and settlement bots stay locked under an integer max_amount_minor ceiling outside any LLM.
When a request exceeds an agent’s cap, Hangoo returns 428 STEP_UP_REQUIRED with a proposal_id so the agent pauses cleanly until an owner signs off.
Configure an agent’s scope, transfer amount, and account recovery state. Your browser generates a real Ed25519 keypair, signs a canonical kya.v1 token, and evaluates the exact Policy PDP ruleset.
Valid KYA signature verified. Human 800ms dwell check bypassed safely.
Support agent capped at propose_only; staged proposal awaits human passkey.
kya.v1 token & PDP response JSON428 step-up loop in 25 lines.
Wrap outbound tool calls with hangooAgentFetch(). Low-tier autonomous calls clear in a single hop, while higher-risk proposals pause cleanly on 428 until an approver signs off—and misconfigured staging bots halt immediately if they ever see a canary_trace_id.
export async function hangooAgentFetch(
url: string,
body: Record<string, unknown>,
opts: { kyaHeader: string; pdpUrl: string; awaitHumanStepUp: (proposalId: string) => Promise<string> },
): Promise<unknown> {
// 1. Request single-use MandateV1 from Policy PDP (ticket text is stripped server-side)
const evalRes = await fetch(`${opts.pdpUrl}/v1/evaluate`, {
method: "POST",
headers: { "content-type": "application/json", "x-agent-capability": opts.kyaHeader },
body: JSON.stringify(body),
});
const evalJson = (await evalRes.json()) as {
mandate_header?: string;
proposal_id?: string;
canary_trace_id?: string;
};
if (evalJson.canary_trace_id) {
throw new Error(`Halted: hit decoy route (${evalJson.canary_trace_id})`);
}
// 2. If action exceeds autonomous KYA cap, pause cleanly for human passkey approval
const mandateHeader =
evalRes.status === 428 && evalJson.proposal_id
? await opts.awaitHumanStepUp(evalJson.proposal_id)
: evalJson.mandate_header;
if (!mandateHeader) throw new Error(`PDP denied agent action (${evalRes.status})`);
// 3. Execute protected mutation with single-use X-Action-Mandate
const commitRes = await fetch(url, {
method: "POST",
headers: {
"content-type": "application/json",
"x-agent-capability": opts.kyaHeader,
"x-action-mandate": mandateHeader,
},
body: JSON.stringify((body.intent as { params: unknown }).params),
});
return commitRes.json();
}