A native policy enforcement layer for AI coding agents. Built on OPA/Rego.
# Cupcake
<p align="left">
<picture>
<source srcset="docs/docs/assets/cupcake-dark.png" media="(prefers-color-scheme: dark)">
<img src="docs/docs/assets/cupcake.png" alt="Cupcake logo" width="180">
</picture>
</p>
Make AI agents follow the rules.
[](https://cupcake.eqtylab.io/)
[](LICENSE)
[](https://github.com/eqtylab/cupcake/actions/workflows/ci.yml)
[](https://github.com/eqtylab/cupcake/actions/runs/19737865145/job/56558251812)
**Policy enforcement** layer for AI agents; yielding better performance and security **without consuming model context**.
- **Deterministic rule-following** for your agents. [Interactive Examples](https://cupcake-policy-studio.vercel.app/example-policies/security/symlink-detection?harness=claude-code&format=rego)
- **Better performance** by moving rules out of context and into policy-as-code.
- **Trigger alerts** and put _bad_ agents in timeout when they repeatedly violate rules.
Cupcake intercepts agent events and evaluates them against **user-defined rules** written in **[Open Policy Agent (OPA)](https://www.openpolicyagent.org/) [Rego](https://www.openpolicyagent.org/docs/policy-language).** Agent actions can be blocked, modified, and auto-corrected by providing the agent helpful feedback. Additional benefits include reactive automation for tasks you dont need to rely on the agent to conduct (like linting after a file edit).
## Updates
**`2025-12-10`**: Official open source release. Roadmap will be produced in Q1 2026.
**`2025-04-04`**: We produce the [feature request](https://github.com/anthropics/claude-code/issues/712) for Claude Code Hooks. Runtime alignment requires integration into the agent harnesses, and we pivot away froAgent that generates comprehensive documentation, API references, architecture diagrams, and developer onboarding guides from existing code.
Agent configuration for systematic bug investigation that traces issues from error logs through the codebase to root cause with suggested fixes.
Agent for integrating third-party APIs including SDK setup, type generation, error handling, retry logic, and rate limit management.
Cursor's built-in autonomous coding agent that can make multi-file edits, run terminal commands, search the codebase, and iteratively build features with minimal human intervention.
Cloud-based autonomous coding agent that runs in the background on remote sandboxed environments, handling complex multi-step tasks while you continue working.
Cursor's multi-file editing agent within Composer mode that can create, edit, and delete files across your entire project in a single conversation.