Your agent declares the data model, access rules, and modules in a few JSON files. Kirak serves the whole backend live (REST & GraphQL API, auth, row-level security, payments, and storage) with no CRUD or auth code in your repo. Anything unique to your app is real Python you own.
The Kirak runtime is open source under Apache 2.0. Studio is the managed way to run it.
Built for coding agents. Every project ships with AGENTS.md, JSON Schemas, kirak validate, and a dev MCP server, so your agent knows the rules and checks its work before it runs.
{ "schema": { "customer_id": { "type": "uuid", "required": true }, "total_cents": { "type": "integer", "required": true }, "deposit_cents": { "type": "integer" }, "status": { "type": "string", "enum": ["pending", "paid", "shipped"] } }, "access": { "fetch": [{ "role": "user", "condition": "customer_id = {user_id}" }], "create": [{ "role": "user", "condition": "customer_id = {user_id}" }], "update": [{ "role": "user", "condition": "customer_id = {user_id}" }] } }
One file per model: schema and access, deny by default, with a row-level condition auto-injected on create.
{ "modules": ["payments", "storage", "ai", "mcp"], "database": { "type": "postgres", "name": "shop" }, "payments": { "default_provider": "stripe", "providers": { "stripe": { "type": "stripe" } } }, "storage": { "default_provider": "files", "providers": { "files": { "type": "aws", "aws_bucket": "my-bucket" } } } }
Turn modules on and name your providers. Lazy-loaded, so nothing ships unless you enable it. Only secrets go in .env; every other setting lives here.
# src/hooks.py, inside register(kirak) @kirak.on("orders").hook("before_create") def apply_deposit(payload): payload["data"]["deposit_cents"] = payload["data"]["total_cents"] * 20 // 100 return payload
The one layer that's real, owned code. Scaffolded for you.
{ "name": "support", "model": "anthropic:claude-haiku-4-5", "access": "User", "max_budget_usd": 0.10, "instructions_file": "support_instructions.md", "tools": { "orders_fetch": { "operation": "orders.fetch" }, "orders_cancel": { "operation": "orders.update", "requires_confirmation": true } } }
An AI agent for your users, not your coding agent. It uses your API as tools and runs as the caller, under the same access rules.
# deposit_cents set by apply_deposit() { "total_cents": 4000, "deposit_cents": 800 }
GET /docs for agents0 lines of CRUD codeThe problem isn't your agent or your prompts. It's volume: every backend needs the same auth, access checks, and CRUD plumbing, and an agent that has to write all of it spends its context on table stakes. The failures hide in that plumbing (a missing access check, a dropped constraint, a webhook with no trace) and surface in production.
In one scan of 1,072 vibe-coded apps, 98% had security issues, and 16% were critical. Source
The more plumbing in the repo, the less of your system fits in the agent's context. Prompt loops revert yesterday's fix, agents add over old code instead of editing it, and they invent dependencies to get unblocked fast.
AI writes the happy path. Security lives in the edge cases it skips. An endpoint like /api/orders/123 never checks who is asking. Secrets sit on default permissions, and unparameterized queries allow injection. CVE-2025-48757: an insufficient row-level security policy let unauthenticated attackers read and write the databases of AI-generated sites.
AI adds. It rarely removes, and almost never refactors. A migration drops a constraint instead of altering it, the codebase ends up with five versions of fetchUser(), and frontend, API, and database quietly drift apart.
Nobody wrote it line by line, so nobody can debug it line by line. It stays invisible until real load hits. A webhook drops with no trace, and engineers rewrite the app instead of patching it.
This isn't a prompting problem. It's a volume problem. Kirak's answer: that layer isn't generated, it's the runtime, tested and versioned once for every project. The model files in models/ hold the schema and access rules, and the agent adds to a declaration instead of rewriting code. What's left is a few hundred lines of hooks, small enough to read.
Your agent writes a few JSON files and, when something is genuinely custom, a hook. Kirak, the runtime, does everything from there: serves it, secures it, deploys it, and shows you how it's running in production.
Fields, relationships, authentication, and row-level access go in one JSON file per model under models/. Modules (payments, storage, notifications, AI, vector, MCP) turn on in kirak.json.
{ "schema": { "vehicle_id": { "type": "uuid", "required": true }, "renter_id": { "type": "uuid", "required": true }, "starts_at": { "type": "datetime", "required": true }, "ends_at": { "type": "datetime", "required": true }, "total_cents": { "type": "integer", "required": true }, "deposit_cents": { "type": "integer" } }, "access": { "fetch": [{ "role": "admin" }, { "role": "user", "condition": "renter_id = {user_id}" }], "create": [{ "role": "user", "condition": "renter_id = {user_id}" }], "update": [{ "role": "user", "condition": "renter_id = {user_id}" }], "destroy": [{ "role": "admin" }] } }
Kirak reads the declaration and serves CRUD, auth, and RLS live, the same tested implementation across every project. No CRUD or auth code is written to your repo.
$ curl -X POST localhost:8000/booking/create \ -H "Authorization: Bearer $TOKEN" \ -d '{ "vehicle_id": "v_41", "renter_id": "u_9", "starts_at": "2026-12-01T10:00", "ends_at": "2026-12-03T10:00", "total_cents": 18000 }' 201 Created · 27ms { "id": "b_7f3a", "vehicle_id": "v_41", "total_cents": 18000, "deposit_cents": 3600 }
@kirak.on("booking").hook("before_create") def check_and_price(payload): data = payload["data"] if data["ends_at"] <= data["starts_at"]: raise ValidationError("ends_at must be after starts_at") data["deposit_cents"] = data["total_cents"] * 20 // 100 return payload @kirak.on("booking").hook("after_create") # async: runs after the response async def notify_owner(result): await kirak.notifications.send_email({ "to": "bookings@yourapp.com", "template_name": "new_booking"}) return result
Run kirak deploy in the project folder. It runs kirak validate first, then puts your API live on an HTTPS kirak.dev address: no account, no email, no card. Claim it within the hour to keep it on the free tier; after that, the same command updates the same instance. Prefer your own servers? It's a Python app, so it runs anywhere Python does. How deploy works →
$ kirak deploy Deployed: https://amber-falcon.kirak.dev Claim URL: https://… Run 'kirak deploy claim-code' to retrieve your claim code. Expires: in 1 hour, unless you claim it
The runtime instruments itself: requests, errors, and a trace waterfall across your hooks, the data layer, and outbound calls, including every AI agent run (model, tokens, cost) and MCP tool call. You debug by reading the timeline, not by adding print statements. It's served from the runtime's own endpoints, in the open-source release, with no third-party APM.
POST /booking/create 31ms · 200 auth.verify ▓▓ 8ms hook: check_and_price ░░▓ 4ms db.insert (booking) ░░░▓▓▓▓▓ 19ms async: notify_owner after the response · 61ms
Estimate for a mid-size SaaS backend: ~22 models, RBAC on every endpoint, Stripe subscriptions, file uploads, scheduled jobs. Counts vary by app and stack; the ratio is the point.
Kirak is a runtime you install, not a code generator. Declare your data model, auth, and permissions in JSON model files, and Kirak serves the full REST API, including CRUD, auth, and RLS. No generated CRUD or auth code, nothing to keep in sync, no drift. Just one tested, versioned, open-source runtime, with real code only for logic unique to your app.
At ~545 lines, your agent can hold the whole backend in context on every prompt, the opposite of the context rot above.
That's not just less code — it's safer code. A smaller surface means less for a person or an agent to get wrong, and what's left runs through Kirak's data layer, so it's held to the same access rules as everything else.
Supabase is built for JavaScript and database-level logic: SQL policies, Edge Functions on Deno. Kirak brings that same declare-and-go speed natively to Python: your JSON model files directly serve the API with full row- and column-level security, your custom logic is FastAPI you own, and there's no second runtime for your custom code and no generated clutter to maintain.
| Supabase | Kirak | |
|---|---|---|
| API layer | PostgREST auto-generates a REST/GraphQL API from your schema; you still design and maintain the schema and migrations | The runtime serves a full REST and GraphQL API straight from your JSON model files, with no CRUD code generated into your repo |
| Access control | Row-Level Security policies, written in SQL, enforced by Postgres on every query | Access rules, written once as JSON in each model file instead of SQL, enforced by the runtime on every query |
| Authentication | Supabase Auth: email, magic links, phone, 19 social providers plus custom OAuth/OIDC, and MFA | 200+ social providers through Social Core, TOTP MFA, SMS one-time codes, API keys, and native mobile sign-in |
| Custom server logic | Edge Functions: TypeScript, running on Deno, a separate runtime from your database | Hooks and custom endpoints: real Python/FastAPI, running inside the same runtime as the rest of your backend |
| Database | Postgres only | Postgres, MySQL, or SQLite, chosen with one config line |
| Storage | Its own S3-compatible storage, with image transformations on paid plans | Local disk or 9 object stores (S3, R2, GCS, Azure, and more), with compression, thumbnails, private files, and signed URLs |
| Background jobs | Supabase Cron and Queues, running inside Postgres | Jobs, retries, and crons on your database, Redis, or RabbitMQ, plus a serverless tick mode |
| Payments | Not built in: wire your own Stripe integration via Edge Functions | Native: 12 gateways (Stripe, PayPal, Paddle, Razorpay, Square, Paystack, Flutterwave, Mercado Pago, and more), with subscriptions, refunds, saved cards, and disputes |
| Notifications | Auth-only email templates; SMS tied to phone login via a configured provider, with no push and no in-app inbox | Native, multi-channel: email, SMS, push, Slack / Discord / Telegram, outgoing webhooks, and an in-app notification inbox, out of the box |
| Integrations | No managed per-user connections; Wrappers can query some external APIs from SQL | Your users connect their own third-party accounts (OAuth2 or API keys), with encrypted tokens and automatic refresh: 112 ready-made profiles, plus your own |
| AI agents | No agent runtime: call an LLM yourself from an Edge Function | Declarative agents in JSON, using your API's operations as tools under the caller's access rules, with human approval, cost caps, and run history |
| Vector & RAG | pgvector in Postgres; you write the embedding and retrieval code | Vector module: Pinecone or Amazon S3 Vectors, with OpenAI, Gemini, or Ollama embeddings; agents retrieve through it as a tool |
| MCP | An MCP server for managing your Supabase project from AI dev tools | MCP servers for your own API: one JSON file each, choosing the tools, who may connect, and a rate limit; every call runs under your access rules |
| Caching | CDN caching for Storage assets only | Native Redis caching for application data and queries |
| Rate limiting | Configurable limits on Supabase's Auth endpoints; limits for your own API are yours to build | Global limits and per-model overrides, built in, with Redis or database-backed counters, standard headers |
| Monitoring | Logs on every plan, kept 1 day on Free and 7 days on Pro | API Analytics, logs, and traces, plus every AI agent run (model, tokens, cost, tools used) and every MCP tool call, built into the open-source runtime itself |
Describe what you're building and Studio's AI agent writes your models, kirak.json, hooks, and endpoints. Or build locally with your own coding agent and run kirak deploy: the project lands in Studio, ready to run and manage. It's a two-way door. Studio commits every change to your GitHub, so you can pull it and keep working locally, and local projects deploy into Studio in one command.
↩ Changes made locally go back to Studio with kirak deploy.
customer_id = {user_id}before_createapply_depositsyncafter_createnotify_ownerasyncEndpointsGET /reports/monthlymonthly_report@kirak.on("orders").hook("before_create") def apply_deposit(payload): data = payload["data"] data["deposit_cents"] = data["total_cents"] * 20 // 100 return payload
@kirak.on("orders").hook("after_create") async def notify_owner(result): await kirak.notifications.send_email({ "to": "ops@acme.dev", "template_name": "new_order"}) return result
@app.get("/reports/monthly") async def monthly_report(caller: Caller): with user_context(caller): return await kirak.graphql(MONTHLY_TOTALS)
{ "statusCode": 200, "status": "success", "data": [ { "id": 81, "total_cents": 4000, "status": "paid" }, { "id": 92, "total_cents": 1250, "status": "shipped" } ] }
curl -H "Authorization: Bearer $TOKEN" https://amber-falcon.kirak.dev/orders/fetche72b18d9c1e4f05a0d3c2a41c9e20 2 * * * · next in 6 hsync_inventoryevery 15 mincleanup_sessionspausedKirak isn't a starter kit you fill in. It reads your model files and kirak.json and serves the whole backend: the same implementation behind every project.
agents/*.json that use your API's operations, MCP servers, and your own Python functions as tools, running as the caller under your access rules. Human approval before sensitive tools, cost caps, conversations, streaming, structured output, and full run history. Bring your own key; built on pydantic-ai, so any model it supports works.mcp/*.json, one per audience, each with its own toolkit of operations and Python tools, who may connect, and a rate limit. Any MCP client can connect, and every tool call runs as the caller, under your access rules. Nothing is exposed until you declare it.kirak new writes an AGENTS.md and JSON Schemas for every file; kirak validate checks each edit before the app starts; kirak catalog --json answers facts instead of guessing; kirak dev mcp is a dev MCP server for your coding agent; and GET /docs describes the running API in Markdown.PostgreSQL, MySQL, or SQLite, chosen with one config line, not tied to a single vendor.
Security controls built to help the APIs you serve pass a SOC 2 review.
Fork it, self-host it, or take your Studio project's GitHub repo with you. Nothing here requires staying.
Kirak Studio has a free plan for prototypes. Move up when your traffic does: paid plans add projects, capacity, and dedicated instances.
Prefer your own servers? The Kirak runtime is open source under Apache 2.0, so you can self-host it wherever you like. Learn more →
Yes, to start. Studio's free plan covers prototypes; paid plans from $25 a month add capacity, and you can move up to dedicated instances. You can also skip Studio entirely and self-host Kirak for free.
Yes. Every Studio project commits to your own GitHub repo, and the runtime underneath is open source. Pull the repo and keep working locally, deploy it with kirak deploy, or self-host it anywhere.
Yes. The Kirak runtime is genuine open source, with no restrictions on how you use it, including self-hosting and commercial use. Kirak Studio is the paid managed service built on top.
Any agent that can read files and run commands. Every project ships with an AGENTS.md, JSON Schemas and kirak validate, and kirak dev mcp gives agents a dev MCP server. Claude Code, Cursor and Codex work out of the box.
No. The CRUD, auth, RLS, payments, and storage aren't code in your project: the runtime serves them from your JSON model files. The only code you write is your hooks and custom endpoints in src/: real Python you own, typically a few hundred lines.
Your hooks and endpoints read and write through Kirak's data layer, so the authentication and row-level access rules in your model files apply to that data automatically. Access control is the runtime's job; your code is business logic.
Kirak itself is not SOC 2 compliant today. The runtime is built to help the APIs it serves pass a SOC 2 review (a design goal for what you build, not a certification Kirak currently holds).
Yes. Kirak is database-agnostic. Choose PostgreSQL, MySQL, or SQLite with a single config change.
Yes, today, via manual MCP configuration: declare an MCP server in mcp/ with the tools the builder may use, then point the tool at /mcp/<name>/ the way you would any other MCP server. It isn't yet a built-in default option inside those tools.