Kastra

Kastra

Kastra · Coding

Kastra is a runtime authorization layer for AI systems. It sits in the execution path of every prompt, tool call, shell command, database query, and API request an AI agent makes, then returns an allow or deny decision in under a millisecond before any real-world action runs. Instead of watching an agent after it acts, Kastra decides what it's allowed to do first, and records each decision in a tamper-evident audit trail. For teams that need AI execution control, it's the check that happens before the damage. Not ideal, right? Anyone who's let a coding agent run loose knows the feeling. It targets developers and teams running coding agents like Claude Code, Codex CLI, and Cursor, plus enterprises that need governance over autonomous workflows.

Interface preview of Kastra

About Kastra

What Is Kastra

Kastra is authorization infrastructure, not a monitoring add-on. Most AI safety tools log what an agent did and flag problems afterward. Kastra moves that check in front of the action. The moment an agent picks its next step, Kastra evaluates it against your policy and returns ALLOW, DENY, REDACT, or HOLD. Only approved actions reach the database, the API, or the shell.

The product splits into four layers that share one policy language: an ingress that captures requests through a proxy, sidecar, SDK, or native gateway; a deterministic policy engine; an encrypted evidence vault; and a deployment layer that runs as managed cloud, single-tenant VPC, or fully air-gapped self-hosted. You can start small. Kastra Edge governs a single laptop, checking every shell command, file edit, and API call from a local coding agent. The same engine scales to fleet-wide enforcement across an engineering org. That's the whole pitch.

The main limitation is scope. Kastra governs AI actions, so it doesn't replace your model provider, your agent framework, or a full SIEM. It feeds those tools. It also doesn't handle LLM governance across model selection or training. Native TypeScript, Python, and Go SDKs are listed as coming soon, which means early integrations lean on the proxy path or the CLI and MCP today.

Getting Started

  1. Sign up at app.kastra.ai with the free 15-day trial (no credit card) or install Kastra Edge first on macOS or Windows.
  2. Install the desktop app from the download page, or run brew install kastra-labs/tap/kastra-edge for the CLI and hooks.
  3. Sign in with kastra-edge login, then connect your agent using a command like kastra-edge install-cursor.
  4. Write policies in plain English or YAML, and let Kastra Recon scan your agent's history to draft rules from risky actions it already took.
  5. Verify enforcement with kastra-edge status and watch decisions stream to Slack, a webhook, or your audit export.

Product Information

A quick look at Kastra's pricing, supported platforms, and performance.

Free PlanYes
Paid Plans$0 - $49.99/dev/mo
PlatformmacOS, Windows, CLI, cloud, VPC, air-gapped self-hosted
DeveloperKastra
CategoryCoding
Release DateMay 2025
Latest UpdatedSep 2025
Website Visits20.6K
Website Global Rank1.4M
API AvailabilityYes

Best for

The users, tasks, and scenarios where this tool fits best.

Users

  • Developers running coding agents
  • Engineering teams deploying AI at scale
  • Regulated enterprises

Tasks

  • Blocking destructive shell commands
  • Gating database and API calls
  • Generating policy from real history
  • Auditing AI decisions

Scenarios

  • Letting a coding agent work overnight
  • Rolling AI out across a team
  • Passing an AI governance review

Key features

Sub-Millisecond Policy Decisions

Kastra checks each action before it executes and returns a verdict in under a millisecond, with a published p99 below 1 ms and a p50 near 0.4 ms. Speed matters here. A slow gate in the execution path would stall every agent step. The engine reasons over identity, scope, intent, content, and destination rather than matching simple patterns.

Four Composable Layers

The platform stacks ingress, an AI policy engine, an evidence vault, and deployment into one control plane, and each layer is inspectable on its own. They all share a single policy language, so a rule you write for a laptop also works in a VPC. You can adopt one layer at a time instead of ripping out your existing stack.

Plain-English Policy Authoring

You don't have to write YAML to get started. Kastra turns plain-English rules into enforceable policies, and supports YAML plus UI-based management for teams that prefer version control. Policies hot-reload, so changes take effect without restarting the engine. No redeploy needed.

Kastra Recon

Recon scans your AI coding agent's local history and surfaces every risky action it already took, then drafts a policy for each one. It's the fastest way to see what an agent has been doing on a machine and turn that into real guardrails. Each drafted policy is self-verified. You enable the ones you want.

Kastra Edge

Edge puts enforcement on the laptop itself, catching shell commands, file edits, and API calls from Claude Code, Codex CLI, and Cursor locally before they run. The macOS and Windows desktop apps bundle the CLI and MCP and add a menu-bar UI with an approval popover. This is the layer most individual developers will touch first.

Tamper-Evident Audit Trail

Every decision is signed and written into a hash-chained, append-only log with per-tenant encryption. Sealed prompts stay encrypted and open only through audited access. Nothing gets edited after the fact. Streams export to SIEM tools like Datadog, Splunk, and S3, and the Team plan keeps over a year of retention.

Broad Stack Integrations

Kastra connects to the model providers, agent frameworks, and observability tools teams already run, including OpenAI, Anthropic, Google Gemini, AWS Bedrock, LangChain, LlamaIndex, Vercel AI SDK, Mastra, CrewAI, Kubernetes, Istio, and Envoy. That reach means you're not rebuilding your pipeline to add governance.

Flexible Deployment

The engine runs as managed multi-region cloud with SOC 2 Type II and active-active failover, a single-tenant VPC on AWS, Azure, GCP, or Oracle, or a fully air-gapped self-hosted install. Regulated and offline environments get the same policy engine as everyone else. Your keys stay yours.

Pros and cons

Pros

  • Decisions arrive in under a millisecond, so enforcement doesn't slow agents down.
  • Enforcement happens before the action, which catches destructive commands that after-the-fact logging misses.
  • Recon turns an agent's real history into ready-to-enable policies, cutting setup time.
  • The audit trail is cryptographically chained and exportable to SIEM tools.
  • Deployment options cover laptops through air-gapped data centers.

Cons

  • Native TypeScript, Python, and Go SDKs are still listed as coming soon, so SDK-first integrations must wait.
  • The Team plan has a 3-seat minimum, which isn't a fit for a single developer.
  • After the 15-day trial ends, Kastra keeps logging but stops blocking unless you pay, so it's not a free enforcement tier.
  • It governs AI actions only; you still need separate tools for model hosting and full observability.

Frequently asked questions

Kastra is an authorization layer that decides whether an AI action is allowed before it runs. It checks prompts, tool calls, shell commands, database queries, and API requests against your policy and returns allow, deny, redact, or hold in under a millisecond.

Related content

Explore related tools, skills, and articles for Kastra.

Kastra Alternatives

Forefront

Forefront

Forefront · Coding

Forefront is a web platform for building with open-source AI. It lets you fine-tune leading open-source language models on your own data, evaluate how they perform, and run them through an API or export them to host yourself. Developers who want the convenience of a closed-source platform but insist on owning their models and data are the target audience here.

Free / $0 - $99/moView details
Startkit

Startkit

StartKit.AI · Coding

Startkit is a boilerplate for building AI SaaS and AI wrapper products. Think of it as an AI startup boilerplate with the boring parts already wired up: authentication, Stripe and Lemon Squeezy payments, usage limits, transactional email, and an AI API starter that talks to OpenAI, Anthropic, Groq, or Llama. You clone the repo, set your price, and start on the part of your product that people actually pay for. It's Next.js under React and Tailwind, so most of the boilerplate code already feels familiar.

Paid / $99 - $499 one-timeView details
Testim

Testim

Tricentis · Coding

Testim is an AI-powered test automation platform for building and running end-to-end tests across web, mobile, and Salesforce applications. It leans on machine learning to keep tests stable when an interface changes, so teams spend less time fixing broken selectors. Not bad for an automated testing tool you can start using today. You create tests by recording actions in a browser, then optionally add JavaScript when you need more control. It's a solid pick for busy QA teams.

Free / Custom pricing on requestView details