Agent infra

Kerna

A local-first trust layer for AI agents.

How it works
  1. Goal
  2. Policy + budgets
  3. Approval
  4. MCP tool
  5. Receipt

The problem

Agents can now edit files, call services and change external systems. Most stacks give the model a tool and hope. There is rarely a hard limit on what a run may touch, how much it may spend, or a record of what it actually did.

How it works

Kerna is a local-first Rust runtime that sits between a model and the MCP tools that can affect the world. Before a tool runs, it evaluates explicit permissions, policy and budgets. Consequential actions can pause for a human decision. Afterwards, it writes a structured receipt to local SQLite.

Budgets are hard limits on tool calls, model calls, runtime, cost, output and memory writes. When one is hit, the run stops.

03 /

Key decisions

  • Not an agent framework

    Kerna owns no domain logic. It sits between the model and the tools, so models and capabilities stay replaceable.

  • Tools run as isolated plugins

    Every capability is an external MCP plugin run as its own child process over stdio, so a tool only touches what it was granted.

  • Deny by default

    A tool receives no capability unless it is explicitly granted in kerna.toml.

04 /

Results

Permissions
Fail-closed
Budgets
Hard
Run receipts
Local