A runtime guard for AI coding agents that gates every tool call and returns PASS, AUTH or BLOCK before the action executes.
Lelu-ai/lelu
Open-source authorization engine that checks every AI agent action and returns allow, deny, human_review, or compute before it runs.
- Stars
- 71
- Forks
- 18
- Open issues
- 14
- Last commit
- 4 days ago
What is it?
Lelu sits between an AI agent and the actions it wants to take, such as issuing a refund, sending an email, or deleting a record. The agent makes one HTTP call to Lelu before acting, and Lelu returns one of four outcomes: allow, deny with a reason, human_review to pause until a person approves, or compute to redirect the action to a safer alternative or sandbox. Every decision is written to an audit log.
Beyond the role and permission checks that tools like OPA, Casbin, or AWS AVP provide, Lelu adds prompt-injection detection, confidence gating based on verified LLM token log-probs, and behavioral anomaly scoring. Policies can be written as YAML roles or OPA/Rego. The engine is written in Go and runs locally with a single npx command, or self-hosted on SQLite or Postgres.
TypeScript and Python SDKs, a Go SDK, and an MCP server are provided. A Claude Code plugin hooks into Bash, Edit, and Write calls through the PreToolUse hook, and it runs in shadow mode by default.
Key features
- 01Returns allow, deny, human_review, or compute decisions for each agent action.
- 02Detects prompt injection with a five-layer filter.
- 03Gates actions on verified LLM confidence signals.
- 04Supports YAML and OPA/Rego policies with deny-first evaluation.
- 05Routes uncertain decisions to a human review queue with Slack, Teams, or PagerDuty.
- 06Writes every decision to an audit log.
Use cases
- Guarding a coding agent so package installs, deploys, and secret file access require approval.
- Adding a human approval step before an agent issues refunds or sends external emails.
- Blocking destructive commands from an unattended Claude Code session.
- Adding authorization checks to LangChain, CrewAI, or MCP-based agents without rewriting them.
Quick start
- 1
Start the local engine with zero config
npx -y lelu-mcp start - 2
Install the TypeScript SDK
npm install lelu-agent-auth
Things to know
- Confidence gating needs verified log-probs from the provider, so models like Anthropic Claude fall back to a missing-signal policy.
- Stage appears early: 68 stars and a young project with a sandbox-first pitch.
In collections
Topics
FAQ
- What is lelu?
- Open-source authorization engine that checks every AI agent action and returns allow, deny, human_review, or compute before it runs. Lelu sits between an AI agent and the actions it wants to take, such as issuing a refund, sending an email, or deleting a record. The agent makes one HTTP call to Lelu before acting, and Lelu returns one of four outcomes: allow, deny with a reason, human_review to pause until a person approves, or compute to redirect the action to a safer alternative or sandbox. Every decision is written to an audit log.
- Is lelu free to use? What license does it have?
- lelu is open source under the MIT license. Check the license terms before using it in commercial products.
- Is lelu still maintained?
- Actively maintained. The last commit to lelu was on Nov 4, 2026.
- What can I use lelu for?
- Guarding a coding agent so package installs, deploys, and secret file access require approval. Adding a human approval step before an agent issues refunds or sends external emails. Blocking destructive commands from an unattended Claude Code session. Adding authorization checks to LangChain, CrewAI, or MCP-based agents without rewriting them.
- How do I install lelu?
- Start the local engine with zero config: npx -y lelu-mcp start Install the TypeScript SDK: npm install lelu-agent-auth
- Where can I get lelu?
- The source code and installation instructions are on GitHub: https://github.com/Lelu-ai/lelu
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Policy guardrails for coding agents like Claude Code, Codex and Cursor, checking each tool call locally before it runs.
Open-source AI agent firewall that sits between agents and the network to block secret exfiltration, prompt injection, SSRF and MCP tool poisoning, with signed action receipts.
Open-source CLI and library that verifies AI model files, code, live LLM/agent/MCP endpoints, and recorded agent traces, reporting findings and gaps.
Open standard and Python verifier that require verifiable provenance and signed evidence before an AI agent executes high-impact tool calls.
Host-agnostic safety middleware that sits between tool-using AI agents and their tools to block risky calls and redact sensitive results.