Shield Agent AI

← Docs hub

Developer

Policy evaluate API

POST /api/v1/kya/policy/evaluate returns a recommended verdict (local PolicyEngine + optional OPA pack allowlist + session risk + session clearance).

A tool above the session's Read / Build / Deploy box is DENY with SESSION_CLEARED.

Callers must still enforce gates; this endpoint does not perform side effects. Dashboard playground: /app/kya/policy.

Kill switch. Send "requireRegisteredAgent": true with agentId or env.agentId and the agent is loaded from your workspace. A killed, revoked, suspended or expired agent is DENY with AGENT_NOT_ACTIVE. A missing id, or one that is not in your workspace, is DENY with AGENT_UNKNOWN. The default mode (request) is opt-in: without the flag, evaluate does not check the agent, so a killed agent that omits it is not stopped here. Operators can turn the check on for every evaluate (shieldagent.kya.evaluate.agent-lookup=strict), which is a breaking mode: any call with no agent id or an unregistered one is denied AGENT_UNKNOWN. off disables the check.

Rate limit. Evaluate has its own bucket: 600 calls per minute per API key by default (kya.evaluate.rate-limit-per-minute), and 3000 per minute for the whole workspace across all of its keys (kya.evaluate.workspace-rate-limit-per-minute), so extra keys do not raise it. Hosted MCP calls count against the same workspace budget. Session ingest and OTLP intake share a separate 30 per minute bucket, so one never starves the other. Over a limit: 429 with Retry-After. A workspace can hold up to 25 active API keys (shieldagent.api-keys.max-active-per-workspace); revoke one to create another.

Docs hub · Install · How KYA works · Source