KYA: Know Your Agent Protocol
The delegated authority and trust layer for autonomous AI workflows. Programmatically bind AI agents to verified individuals and enterprise accounts with enforceable spending boundaries, deterministic policy scopes, and auditable non-repudiation.
Enterprise platforms and financial institutions must distinguish between malicious automated scrapers and legitimate delegated AI agents. Anonymous bots are routinely blocked because they lack verifiable legal standing, authorized representation, and financial recourse.
UseOneID issues a verifiable Agent Delegation Passport. Autonomous agents carry tamper-evident proof of authorized sponsorship, allowing platforms to validate spending caps, permitted operational scopes, and principal accountability in milliseconds without exposing underlying credentials.
Live KYA Verification Simulator
Test how a relying platform validates an AI agent before executing a command
Developer SDK Integration
Bind agents in Python frameworks, verify delegations in Node.js, and connect IDEs via MCP
# Python: LangChain / AutoGen / CrewAI Integration with UseOneID KYA
from useoneid import KyaAgentClient
# 1. Initialize client using verified enterprise credentials
kya = KyaAgentClient(
client_id="cid_live_your_partner_client_id",
api_key="sk_live_your_partner_secret_key"
)
# 2. Programmatically issue an Agent Delegation Passport
# Binds agent operational scopes to verified principal identity
agent_passport = kya.bind_agent(
human_sub="usr_oneid_987654",
agent_id="bot_commerce_agent_v2",
agent_name="Automated Commerce & Escrow Agent",
spending_limit="1500_USD",
allowed_actions=["properties:list", "escrow:transact", "sign_lease"],
duration_days=30
)
print(f"Issued Agent Passport Token: {agent_passport.token}")
# -> "kya_pass_live_89f02c4b81e27a9d01..."
# 3. Attach token in standard authorization headers for outbound calls
headers = {
"Authorization": f"Bearer+KYA {agent_passport.token}",
"X-Agent-ID": "bot_commerce_agent_v2"
}// Node.js / Express: Real-Time Non-Repudiation Clearance via KYA Gateway
app.post("/api/v1/escrow/transact", async (req, res) => {
const kyaToken = req.headers.authorization?.replace("Bearer+KYA ", "");
const { amount } = req.body;
// Real-time policy, non-repudiation, and velocity evaluation
const verifyRes = await fetch("https://auth.useoneid.com/api/v1/kya/verify", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.USEONEID_API_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
kyaToken,
requiredAction: "escrow:transact",
transactionAmount: amount
})
});
const verification = await verifyRes.json();
if (!verification.valid) {
return res.status(403).json({
error: "KYA_UNAUTHORIZED",
reason: verification.warning || "Agent exceeds delegated financial bounds or scope"
});
}
// Transaction carries tamper-evident audit record backed by accountable principal
const { accountable_human } = verification.non_repudiation;
console.log(`Approved for ${accountable_human.name} (ID: ${accountable_human.nin_hash})`);
// Proceed with escrow transaction safely...
res.json({ success: true, txId: "tx_escrow_99214" });
});// Model Context Protocol (MCP) Setup — Cursor & Claude Desktop
// Location: ~/.cursor/mcp.json OR Claude Desktop: claude_desktop_config.json
{
"mcpServers": {
"useoneid-kya": {
"command": "npx",
"args": ["-y", "@useoneid/mcp-server@latest"],
"env": {
"USEONEID_PARTNER_API_KEY": "sk_live_your_partner_secret_key",
"USEONEID_AGENT_ID": "agent_cursor_copilot_01",
"USEONEID_GATEWAY_URL": "https://auth.useoneid.com/api/v1/kya/mcp"
}
}
}
}// OAuth 2.0 Token Exchange: Sub-Agent Delegation
// Transitive authority: sub-agents inherit downscoped limits with cascading revocation
const res = await fetch("https://auth.useoneid.com/api/v1/kya/bind", {
method: "POST",
headers: {
"Authorization": "Bearer sk_live_your_partner_secret_key",
"Content-Type": "application/json"
},
body: JSON.stringify({
grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
subject_token: parentAgentToken,
agent_id: "sub_flight_booker_01",
agent_name: "Flight Booking Specialist Sub-Agent",
spending_limit: "$250.00/month",
allowed_actions: ["flight:search", "flight:book"]
})
});
const subAgentPassport = await res.json();
// Returns downscoped token linked to parent hierarchy (delegation_depth: 1)// Zero-Knowledge Proofs & Selective Disclosure (IETF SD-JWT + W3C VC 2.0)
// Sensitive PII is salted and hashed into _sd digests.
// Relying parties verify credentials without exposing customer personal data:
{
"iss": "https://auth.useoneid.com",
"sub": "agent_commerce_agent_v2",
"spending_limit": "$1,500.00/month",
"allowed_actions": ["escrow:transact", "properties:list"],
// High-value zero-knowledge boolean assertions
"is_identity_verified": true,
"is_over_18": true,
"kyc_tier": "Tier 3",
// Salted cryptographic digests (PII remains in zero-knowledge vault)
"_sd": [
"2x_wM4J3O90d_N_eS5L...",
"9f_0aQ11bT_2mZ98pX_..."
],
"_sd_alg": "sha-256"
}