Quick Start Guide

Get the Lemma Firewall running in under 5 minutes

/

Quick Start

Get the Lemma Firewall running locally and see agent containment in action.

One-command demo

The fastest way to see the firewall work: pip install lemma-cli && lemma demo. This issues a signed credential, starts the firewall, and runs 6 containment tests in under 30 seconds.

Before You Start

  • Install lemma-cli with pipx install lemma-cli
  • Have a browser available for wallet approval, or an existing proof file for non-interactive flows
  • Choose stable identifiers for your runtime: runtime_id, agent_id, and workspace_id
  • Know whether your integration is proof-first native or needs temporary bearer compatibility

Step 1: Install and Run the Demo

The demo issues a signed credential from the control plane, starts the local firewall, and proves containment works — all in one command.

Shell
pip install lemma-cli lemma demo --api-base https://lemma.id

You should see 6/6 containment tests pass: allowed requests forwarded, wrong path blocked, wrong method blocked, taint epoch denial, recovery after re-issuance, and revocation denial.

Step 2: Configure Your Runtime

Your runtime should send X-Lemma-Credential directly to protected endpoints by default. This is the primary product contract for new integrations.

Environment
LEMMA_BASE_URL=https://lemma.id LEMMA_PROOF_FILE=/path/to/.lemma-proof.json LEMMA_RUNTIME_ID=my-runtime LEMMA_AGENT_ID=my-agent LEMMA_WORKSPACE_ID=prod
HTTP Request
POST /api/protected/action Headers: X-Lemma-Credential: <base64url(full signed lemma)> Content-Type: application/json

Step 3: Use Token Exchange Only for Compatibility

If an older integration still requires bearer transport, exchange the proof for a short-lived access token. Do not make token exchange your default on new routes.

JSON
POST /api/auth/exchange-proof { "credential": { "...": "signed lemma object" }, "site_id": "example.com", "requested_scope": ["read"], "ttl_seconds": 900 }

Step 4: Validate Runtime Controls

Once requests are proof-first, validate that your runtime can be monitored, explained, and contained.

CheckExpected result
Protected request with valid proofALLOW with normal response
Protected request with missing scope or wrong audienceDENY with machine-readable reason code
Decision query / explainRuntime decisions visible in Agent Ops
Kill switchNew privileged actions denied immediately

OpenClaw Starter Path

If you want the fastest personal runtime onboarding flow, use the starter-safe OpenClaw path:

Shell
lemma setup-openclaw --api-base https://lemma.id

This path handles browser approval, local firewall startup, one protected allow, and one kill-to-deny check.

What Lemma Handles For You

AreaLemma responsibility
Proof issuance and wallet approvalInteractive wallet flow and proof acquisition
Verification contractProof-first request validation and compatibility token exchange
Runtime control planeRuntime registration, policy defaults, and kill switches
ObservabilityDecision logs, explain endpoints, and alert summaries
RemediationCLI session helpers and lemma doctor --fix for common failures
Next steps

CLI Guide - packaged commands for session, remediation, and reference runtime setup
Examples - generic runtime request, server verification, and monitoring examples
Authentication API - proof-first and compatibility endpoint contract
Developer Platform - runtime controls, monitoring, and keys