Install the SDK. Pass your agent secret. Call spend(). Kora handles Ed25519 signing, budget checks, and cryptographic seals.
$ npm install @kora-protocol/sdk import { Kora } from '@kora-protocol/sdk'; const kora = new Kora({ secret: 'kora_agent_sk_...', mandate: 'mandate_abc123', }); const result = await kora.spend( 'aws', 5000, 'EUR', 'GPU provisioning' ); // result.approved → true | false // result.seal → Ed25519 cryptographic proof // result.suggestion → fix hint on denial
pip install kora-sdknpm i @kora-protocol/sdkpip install kora-mcp-servern8n-nodes-koraAdd Kora as an MCP server. Governed spending in seconds.
{
"mcpServers": {
"kora": {
"command": "kora-mcp",
"env": {
"KORA_AGENT_SECRET": "kora_agent_sk_...",
"KORA_MANDATE_ID": "mandate_abc123"
}
}
}
}
Full SDK with Ed25519 signing. TypeScript and Python.
from kora import Kora kora = Kora("kora_agent_sk_...", mandate="mandate_abc123") result = kora.spend( vendor="aws", amount_cents=5000, currency="EUR" )
Community node with two-output branching. Approved → left, Denied → right.
// Install from Community Nodes: n8n-nodes-kora // Operations: // → Health Check // → Check Budget // → Authorize Spend // // Approved ← [Kora] → Denied
Every spend request runs the full pipeline inside a PostgreSQL SERIALIZABLE transaction. Two agents racing for the last €10 — exactly one wins.
The SDK gives agents everything they need to self-correct — check budget, reduce amount, retry. Not just fail.
budget = kora.check_budget() print(f"Daily remaining: {budget.daily.remaining_cents}") print(f"Monthly remaining: {budget.monthly.remaining_cents}") print(f"Can spend: {budget.spend_allowed}") # Vendors, categories, time windows # all visible before you spend
result = kora.spend(vendor="aws", amount_cents=50000, currency="EUR") if not result.approved: budget = kora.check_budget() available = budget.daily.remaining_cents if available > 0: result = kora.spend( vendor="aws", amount_cents=available, currency="EUR", reason="Auto-reduced after budget check" )
tests passing
pipeline checks per request
p99 authorization latency
ML in the auth path