{"slug": "open-policy-agent", "name": "Open Policy Agent", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 4, "commenters": 11, "warners": 1, "score": 4.047, "rising": -1.31, "first": "2025-11-09", "latest": "2026-07-22", "why": "for policy engine i used OPA/Rego, so it's a well-known language and easier to write complex policies.", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 3, "neutral": 7, "compare": 1, "warn": 1}, "spark": [1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "for policy engine i used OPA/Rego, so it's a well-known language and easier to write complex policies.", "kind": "", "icon": true, "domain": null, "github_repo": "github.com/open-policy-agent/opa", "official_url": "https://www.openpolicyagent.org/", "pricing": "", "aliases": ["Open Policy Agent", "OPA", "Opa"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 784199137, "item_id": 49012446, "url": "https://news.ycombinator.com/item?id=49012446", "by": "not-duckie", "date": "2026-07-22", "version": null, "stance": "recommend", "quote": "for policy engine i used OPA/Rego, so it's a well-known language and easier to write complex policies.", "excerpt": "Author here. Built this solo. With having AI write boilerplate/tests/docs. The parts I'd most want scrutiny on, these claims of mine: 1) mTLS 4-tier architecture over a token-based scheme : instead of copy-pasting a token into every agent's config by hand, each agent requests its own enrollment and gets approval, and what it holds afterward can't be copy-pasted and replayed the way a bearer token can. 2) for policy e", "context": "solo builder", "use_case": "policy engine", "switched_from": "", "story": "Show HN: The Harbinger- mTLS proxy that gives AI agents identity, not API keys"}, {"id": 758191568, "item_id": 47386973, "url": "https://news.ycombinator.com/item?id=47386973", "by": "CuriouslyC", "date": "2026-03-15", "version": null, "stance": "recommend", "quote": "OPA for life", "excerpt": "I follow a similar pattern. My autonomous agent Smith has a service mesh that I plug MCPs into, which gives me a single place to define policy (OPA for life) and monitoring. The service gateway own credentials. This pattern is secure, easy to manage and lets you can programmatically generate a CLI from the tool catalog. https://github.com/sibyllinesoft/smith-gateway if you want to understand the model and how to impl", "context": "", "use_case": "Policy gates for agent tools", "switched_from": "", "story": "MCP Is Dead; Long Live MCP"}, {"id": 741179568, "item_id": 46323723, "url": "https://news.ycombinator.com/item?id=46323723", "by": "dersch", "date": "2025-12-19", "version": null, "stance": "recommend", "quote": "I would like to put in an honourable mention for Open Policy Agent", "excerpt": "I would like to put in an honourable mention for Open Policy Agent: https://github.com/open-policy-agent/opa", "context": "", "use_case": "", "switched_from": "", "story": "Top Open Source Authorization Libraries (2024)"}, {"id": 733995616, "item_id": 45874726, "url": "https://news.ycombinator.com/item?id=45874726", "by": "pirates", "date": "2025-11-10", "version": null, "stance": "recommend", "quote": "I like to constrain myself to OPA/Rego if what I\u2019m doing can be modeled in JSON easily.", "excerpt": "I like to constrain myself to OPA/Rego if what I\u2019m doing can be modeled in JSON easily. I like the idea that the entire pipeline is \u201cJSON in, parse it, JSON out\u201d. Probably most people would have heard of it or worked with it adjacent to Kubernetes, but I\u2019ve used it for determining scores for a soccer fantasy league I run, and I have a work in progress Pok\u00e9mon gen 1 battle engine about half done with it. The constrain", "context": "", "use_case": "fantasy league scoring, game engine", "switched_from": "", "story": "Ask HN: Do you use an old or 'unfashionable' programming language?"}]}], "caveats": [{"label": "", "summary": "", "quotes": [{"id": 757520817, "item_id": 47345051, "url": "https://news.ycombinator.com/item?id=47345051", "by": "ramoz", "date": "2026-03-11", "version": null, "stance": "warn", "quote": "the management overhead of policy DSLs (in my case, OPA) was hard to justify over straightforward scripting", "excerpt": "The deterministic context system is intuitive and well-designed. That said, there's more to consider, particularly around user intent and broader information flow. I created the hooks feature request while building something similar[1] (deterministic rails + LLM-as-a-judge, using runtime \"signals,\" essentially your context). Through implementation, I found the management overhead of policy DSLs (in my case, OPA) was ", "context": "", "use_case": "policy engine", "switched_from": "", "story": "Show HN: A context-aware permission guard for Claude Code"}]}], "who": [{"by": "not-duckie", "context": "solo builder", "url": "https://news.ycombinator.com/item?id=49012446", "date": "2026-07-22"}], "tags": [], "use_cases": ["policy engine", "policy evaluation", "policy gates for agent tools", "authorization policy", "authorization policies", "policy layer"], "compared": [{"slug": "opentelemetry", "name": "OpenTelemetry", "co": 2, "switched_from": 0, "switched_to": 0}], "makers": [{"id": 739875872, "item_id": 46242242, "url": "https://news.ycombinator.com/item?id=46242242", "by": "Philpax", "date": "2025-12-12", "version": null, "stance": "recommend", "quote": "", "excerpt": "You might be interested in Electric Clojure [1], although I must admit that I have not used it myself. [1]: https://github.com/hyperfiddle/electric", "context": "", "use_case": "", "switched_from": "", "story": "Denial of service and source code exposure in React Server Components"}], "threads": [{"url": "https://news.ycombinator.com/item?id=49012282", "title": "Show HN: The Harbinger- mTLS proxy that gives AI agents identity, not API keys", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48892859", "title": "Show HN: Clawk \u2013 Give coding agents a disposable Linux VM, not your laptop", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48209323", "title": "Formal Verification Gates for AI Coding Loops", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48173268", "title": "Prolog Coding Horror", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47380270", "title": "MCP Is Dead; Long Live MCP", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47353558", "title": "Show HN: OneCLI \u2013 Vault for AI Agents in Rust", "mentions": 1}], "sentiment_by_month": {"2025-11": {"neutral": 1, "recommend": 1}, "2025-12": {"neutral": 1, "recommend": 1}, "2026-01": {}, "2026-02": {"neutral": 1}, "2026-03": {"neutral": 2, "warn": 1}, "2026-04": {}, "2026-05": {"neutral": 1, "compare": 1}, "2026-06": {}, "2026-07": {"neutral": 1, "recommend": 1}, "2026-08": {}, "2026-09": {}, "2026-10": {}}, "versions": [], "version_unnamed": 0, "family_ref": null, "runs_on": null, "lines": [], "quotes": [{"id": 784199137, "item_id": 49012446, "url": "https://news.ycombinator.com/item?id=49012446", "by": "not-duckie", "date": "2026-07-22", "version": null, "stance": "recommend", "quote": "for policy engine i used OPA/Rego, so it's a well-known language and easier to write complex policies.", "excerpt": "Author here. Built this solo. With having AI write boilerplate/tests/docs. The parts I'd most want scrutiny on, these claims of mine: 1) mTLS 4-tier architecture over a token-based scheme : instead of copy-pasting a token into every agent's config by hand, each agent requests its own enrollment and gets approval, and what it holds afterward can't be copy-pasted and replayed the way a bearer token can. 2) for policy e", "context": "solo builder", "use_case": "policy engine", "switched_from": "", "story": "Show HN: The Harbinger- mTLS proxy that gives AI agents identity, not API keys"}, {"id": 782361473, "item_id": 48897592, "url": "https://news.ycombinator.com/item?id=48897592", "by": "LuD1161", "date": "2026-07-13", "version": null, "stance": "neutral", "quote": "policy guardrails evaluated by Open Policy Agent (OPA)", "excerpt": "With agentjail ( https://github.com/LuD1161/agentjail ), I've tried to contain coding agents in os-native sandboxes (sbpl for macos and similarly for linux, <4ms start time) + policy guardrails evaluated by Open Policy Agent (OPA), policies written in rego. Protocol aware network proxy coming soon Then you can match a DSL and block particular network requests. This ensures you no longer fear --dangerously-skip-permis", "context": "", "use_case": "policy evaluation", "switched_from": "", "story": "Show HN: Clawk \u2013 Give coding agents a disposable Linux VM, not your laptop"}, {"id": 771645008, "item_id": 48227813, "url": "https://news.ycombinator.com/item?id=48227813", "by": "pyrex41", "date": "2026-05-21", "version": null, "stance": "compare", "quote": "OPA offers extremely fast runtime execution in a way that would be more difficult to get to in Shen.", "excerpt": "Definitely connected; OPA is itself a structural gate, but at runtime. The post focused on compile-time gates, but there's no reason a structural gate can't run at runtime \u2014 which means they compose rather than compete. I didn't get into this in the post, but Shen is extremely portable and has been ported to a lot of different target runtimes (Go, C, Lisp, JS, many others \u2014 https://shen-language.github.io/#downloads)", "context": "", "use_case": "", "switched_from": "", "story": "Formal Verification Gates for AI Coding Loops"}, {"id": 770856016, "item_id": 48178501, "url": "https://news.ycombinator.com/item?id=48178501", "by": "darkwi11ow", "date": "2026-05-18", "version": null, "stance": "neutral", "quote": "Used for policy evaluation, e.g. to validate tree-structured datasets against arbitrary permission rule sets.", "excerpt": "https://www.openpolicyagent.org/docs/policy-language Not quite Prolog as they teach in universities, but its close descendant. Used for policy evaluation, e.g. to validate tree-structured datasets against arbitrary permission rule sets.", "context": "", "use_case": "policy evaluation", "switched_from": "", "story": "Prolog Coding Horror"}, {"id": 758191568, "item_id": 47386973, "url": "https://news.ycombinator.com/item?id=47386973", "by": "CuriouslyC", "date": "2026-03-15", "version": null, "stance": "recommend", "quote": "OPA for life", "excerpt": "I follow a similar pattern. My autonomous agent Smith has a service mesh that I plug MCPs into, which gives me a single place to define policy (OPA for life) and monitoring. The service gateway own credentials. This pattern is secure, easy to manage and lets you can programmatically generate a CLI from the tool catalog. https://github.com/sibyllinesoft/smith-gateway if you want to understand the model and how to impl", "context": "", "use_case": "Policy gates for agent tools", "switched_from": "", "story": "MCP Is Dead; Long Live MCP"}, {"id": 757756257, "item_id": 47359766, "url": "https://news.ycombinator.com/item?id=47359766", "by": "CuriouslyC", "date": "2026-03-12", "version": null, "stance": "neutral", "quote": "OPA policy controls who does what", "excerpt": "People are addressing that gap. I have a secure agent framework that uses a tool gateway hooked up to OPA (https://github.com/sibyllinesoft/smith-core), this solves the credential issue as the credentials live in the tools, and the authz issue, as OPA policy controls who does what.", "context": "", "use_case": "authorization policy", "switched_from": "", "story": "Show HN: OneCLI \u2013 Vault for AI Agents in Rust"}, {"id": 757520817, "item_id": 47345051, "url": "https://news.ycombinator.com/item?id=47345051", "by": "ramoz", "date": "2026-03-11", "version": null, "stance": "warn", "quote": "the management overhead of policy DSLs (in my case, OPA) was hard to justify over straightforward scripting", "excerpt": "The deterministic context system is intuitive and well-designed. That said, there's more to consider, particularly around user intent and broader information flow. I created the hooks feature request while building something similar[1] (deterministic rails + LLM-as-a-judge, using runtime \"signals,\" essentially your context). Through implementation, I found the management overhead of policy DSLs (in my case, OPA) was ", "context": "", "use_case": "policy engine", "switched_from": "", "story": "Show HN: A context-aware permission guard for Claude Code"}, {"id": 757352129, "item_id": 47334508, "url": "https://news.ycombinator.com/item?id=47334508", "by": "CuriouslyC", "date": "2026-03-11", "version": null, "stance": "neutral", "quote": "full authz policy support via OPA", "excerpt": "This is overly pessimistic. Prompt injection can be largely mitigated by creating a protocol firewall between agents that access untrusted content and agents that perform computation: https://sibylline.dev/articles/2026-02-22-schema-strict-prompt-injection-firewall/ I'm working on an autonomous agent framework that is set up this way (along with full authz policy support via OPA, monitoring via OTel and a centralized", "context": "", "use_case": "Authorization policies", "switched_from": "", "story": "I'm going to build my own OpenClaw, with blackjack and bun"}, {"id": 756211952, "item_id": 47263247, "url": "https://news.ycombinator.com/item?id=47263247", "by": "jensbontinck", "date": "2026-03-05", "version": null, "stance": "neutral", "quote": "We use OPA/Rego for the policy layer with presets", "excerpt": "This is exactly right. We went down this path and the practical implementation ends up looking like capability tokens. short-lived, cryptographically signed credentials that encode what the agent is authorized to do for this specific task. The key insight: the token isn't just authorization, it's evidence. When you issue an ES256-signed token that says \"this agent was scanned for PII, classified as INTERNAL, and is a", "context": "", "use_case": "Policy layer", "switched_from": "", "story": "NIST Seeking Public Comment on AI Agent Security (Deadline: March 9, 2026)"}, {"id": 754316321, "item_id": 47144770, "url": "https://news.ycombinator.com/item?id=47144770", "by": "gritspants", "date": "2026-02-24", "version": null, "stance": "neutral", "quote": "that calls back to OPA", "excerpt": "Friction is the entire point in human organizations. I'd wager AI is being used to build boondoggles - apps that have no value. They are quickly being found out fast. On the other side of things, my employer decided they did not want to pay for a variety of SaaS products. Instead, a few of my colleagues got together and build a tool that used Trino, OPA, and a backend/frontend, to reduce spend by millions/year. We us", "context": "", "use_case": "", "switched_from": "", "story": "Looks like it is happening"}, {"id": 741179568, "item_id": 46323723, "url": "https://news.ycombinator.com/item?id=46323723", "by": "dersch", "date": "2025-12-19", "version": null, "stance": "recommend", "quote": "I would like to put in an honourable mention for Open Policy Agent", "excerpt": "I would like to put in an honourable mention for Open Policy Agent: https://github.com/open-policy-agent/opa", "context": "", "use_case": "", "switched_from": "", "story": "Top Open Source Authorization Libraries (2024)"}, {"id": 739533810, "item_id": 46220863, "url": "https://news.ycombinator.com/item?id=46220863", "by": "achilleasatha", "date": "2025-12-10", "version": null, "stance": "neutral", "quote": "OPA", "excerpt": "Satalia | Full-time or contract | Remote (UK) | https://careers.satalia.com/jobs Hiring for a variety of roles. All remote & UK based (flexible on seniority & contract or perm) - Platform Engineer - Cloud Developer (x2) - Cloud Architect - Data Scientist - Data Engineer - AI Product Manager If you're interested in working with agents in production - in an enterprise scale environment - and have a strong Platform Engi", "context": "", "use_case": "", "switched_from": "", "story": "Ask HN: Who is hiring? (December 2025)"}, {"id": 733995616, "item_id": 45874726, "url": "https://news.ycombinator.com/item?id=45874726", "by": "pirates", "date": "2025-11-10", "version": null, "stance": "recommend", "quote": "I like to constrain myself to OPA/Rego if what I\u2019m doing can be modeled in JSON easily.", "excerpt": "I like to constrain myself to OPA/Rego if what I\u2019m doing can be modeled in JSON easily. I like the idea that the entire pipeline is \u201cJSON in, parse it, JSON out\u201d. Probably most people would have heard of it or worked with it adjacent to Kubernetes, but I\u2019ve used it for determining scores for a soccer fantasy league I run, and I have a work in progress Pok\u00e9mon gen 1 battle engine about half done with it. The constrain", "context": "", "use_case": "fantasy league scoring, game engine", "switched_from": "", "story": "Ask HN: Do you use an old or 'unfashionable' programming language?"}, {"id": 733941073, "item_id": 45871317, "url": "https://news.ycombinator.com/item?id=45871317", "by": "ramoz", "date": "2025-11-09", "version": null, "stance": "neutral", "quote": "binding OPA/rego to agent runtimes", "excerpt": "After creating the feature request for Claude Code hooks[1] a few months back, Cupcake is nearly ready for release. Cupcake is a governance/policy-enforcement layer for agents. Its innovation is binding OPA/rego to agent runtimes (via hooks). I do not believe we will every strictly rely on \"better\" models in the wild without deterministic guarantees or ways for enterprises to factor in their own alignment - system pr", "context": "", "use_case": "", "switched_from": "", "story": "Ask HN: What Are You Working On? (Nov 2025)"}]}