Lemma Firewall Documentation

Local-first agent containment with signed credentials. Zero server calls per action.

/

What is the Lemma Firewall?

The Lemma Firewall is a local enforcement gateway for AI agents. It sits between your agent and the APIs it calls, verifying signed credentials on every request via Ed25519 signature check — no server calls on the hot path.

Quick demo

Run lemma demo to see it in action: issues a credential, starts the firewall, and runs containment tests in under 30 seconds. Or follow the quickstart guide.

How the Lemma Firewall Works

Runtime onboarding (one-time setup)

  1. Developer installs lemma-cli and starts a wallet session or uses an existing proof file
  2. Lemma.id issues or validates a runtime credential for the connected environment
  3. Runtime is registered with policy profile, risk defaults, and kill switch enabled
  4. Your runtime or gateway sends X-Lemma-Credential on protected API calls
  5. Agent Ops shows runtime state and control-plane defaults

Per request (proof-native enforcement)

  1. Gateway validates proof and required scope/audience
  2. Runtime authorization gate checks active state + kill switch
  3. Request is allowed/denied with machine-readable reason code
  4. Decision is logged for query + explain workflows

Default mode is proof-first authorization for sensitive operations, with explicit policy-gated legacy compatibility only where required.

Control and containment

  • Runtime kill switch denies new protected actions immediately
  • Revocation events propagate through Redis + freshness channels
  • Operators can query decisions by runtime or delegator PPID and inspect explain output

Proof Hierarchy

LayerPurposeBoundaries
Root identity proofLinks operator identity to PPIDNever grants broad runtime access directly
Delegation proofDelegates authority to automation intentScope + audience + expiry constrained
Runtime binding proofBinds grant to runtime/agent/workspaceKill switch and runtime state enforced
Run proof (ephemeral)Constrains a specific job/run windowShort TTL, budgeted operations
PoP request signatureProtects each API call from replayNonce, method, path, body hash

Security Boundaries

PropertyHow it's enforced
Proof-first route protectionProtected routes require signed proofs and policy checks
Deny-by-default executionMissing or ambiguous context produces explicit deny
Runtime containmentKill switch checked before privileged execution
Revocation freshnessRevocation list + freshness channels gate stale credentials
Identity boundaryPPID is the relying-party identity key; wallet_id is internal plumbing
Legacy compatibilityLegacy token paths are explicit, policy-gated, and monitored

Operator Outcomes

  • Connect your own runtime with a packaged CLI flow
  • Monitor live activity and decision stream
  • Kill/contain runtime or delegated agent
  • Explain allow/deny decisions from logs + policy snapshot
  • Track deny spikes and revocation lag SLA

Get Started

Ready to run proof-first Agent Ops with your own runtime?

  • Quick Start Guide -- install the CLI, acquire a proof, and send X-Lemma-Credential
  • Installation -- packaged CLI path and optional reference runtime tooling
  • CLI Guide -- session, remediation, and reference runtime commands
  • Authentication API -- direct proof-first and compatibility token exchange contract
  • Developer Platform -- Agent Ops controls and activity
  • Examples -- runtime request, server verification, and monitoring patterns