KeylessAI Documentation
The AI Action Governance Kernel. Every AI action — ad spend, payments, deployments — must pass through intent-based governance before execution.
Quickstart
Go from zero to governed AI actions in 5 minutes. Install the SDK, configure, execute.
SDK Reference
Full TypeScript SDK docs: execute, simulate, ledger, approval workflows.
API Reference
5 REST endpoints. Intent → Policy → Approval → Execute → Ledger.
How it works
KeylessAI enforces a strict 10-step pipeline for every AI action:
- Intent Declaration — The AI agent declares what it wants to do (e.g., increase ad budget by $5,000)
- Policy Evaluation — 7 policy rules are checked: permissions, budget limits, rate limits, risk thresholds
- Approval Gate — High-value or high-risk actions are routed to human reviewers
- Atomic Execution — The action is executed exactly once via idempotency locks
- Audit Ledger — Every step is recorded with full traceability
Core concepts
Intent
Every action starts as an intent — a declaration of what the AI wants to do, with structured metadata like action type, amount, and target. Intents are risk-scored and policy-evaluated before any execution happens.
Policy
Policies are evaluated automatically against every intent. Rules include permission checks, budget limits, rate limits, risk thresholds, and time-of-day restrictions. The auto-policy feature requires human approval for any action over $1,000.
Approval
When policy requires approval, the intent is paused and a human reviewer is notified. Approvals have configurable expiry windows. The SDK provides waitForApproval() for async approval flows.
Execution
Execution is atomic and idempotent. The Kernel acquires a PostgreSQL advisory lock, re-checks policy, verifies budget, executes via the connector layer, and writes the result — all in a single pipeline with no partial states.
Ledger
Every intent, execution, approval, and policy decision is recorded in the audit ledger. Query by agent, date range, status, or individual intent for full traceability.
Quick install
# Install the SDK npm install @keylessai/sdk # Initialize import { KeylessAI } from '@keylessai/sdk'; const keyless = new KeylessAI({ apiKey: 'ka_live_xxx', orgId: 'your-org-id', agentId: 'your-agent-id', }); // Execute a governed action const result = await keyless.execute({ action: 'ads.budget_increase', amount: 5000, target: { campaign: 'camp_abc' }, });