Introduction
What is Kaji?
Applications already contain domain functions such as refundPayment(),cancelBooking(), and sendEmail(). When autonomous software can call those functions, every caller otherwise needs to solve caller identity, input validation, authorization, human approval, idempotency, cancellation, timeouts, ambiguous side effects, and execution evidence on its own. Kaji is meant to standardize this process.
It is a library, not a hosted control plane: identity, authorization, and storage stay with your application. Kaji is TypeScript-only in v0.
How it works
- Define a capability: its input contract, authorization, optional approval rule, and the ordinary application function it executes.
- Call
kaji.execute()with the capability, a validated input, a principal ID, and an idempotency key. - Validate input before any authorization check or side effect runs.
- Authorize and approve the request before the capability's function is called.
- Execute the capability at most once and record an explicit outcome — including
unknownwhen a side effect may have happened but completion can't be proven.
What Kaji isn't
- Not an agent framework. Kaji has no model providers and no agent loop; an agent framework, MCP server, or direct application code decides what to request.
- Not a workflow engine. Kaji does not orchestrate multi-step workflows, schedule retries, or recover distributed tasks.
- Not a tool framework or integration platform. Kaji ships no tool registry, CLI, or integration catalog. Callers adapt their framework to Kaji, not the reverse.
- Not an identity or authorization system. Your application supplies identity and the authorization decision; Kaji only enforces it before a side effect runs.
Continue with Getting Started to define and run your first capability.