For governance engineers
Meet Rego, the language behind your rules
Every VeriProof rule is written in Rego. If you've never heard of it, you're in good company. Here's why we chose it, and how to write a good rule without becoming a Rego expert first.
Where Rego came from
Rego is the policy language of Open Policy Agent, usually called OPA. Teemu Koponen, Tim Hinrichs and Torin Sandall started OPA at Styra in 2016. They wanted one way to write policy that could run anywhere a system has to decide whether something's allowed, instead of every team hard-coding those checks into its own services.
The language borrows from Datalog, an old and well-studied query language, and extends it to work with structured documents like JSON. That turns out to be a great fit for agents, because what an agent proposes to do is already a JSON document.
OPA joined the Cloud Native Computing Foundation in 2018 and graduated in February 2021, the foundation's top maturity level. By then Goldman Sachs, Netflix, Pinterest and T-Mobile were running it in production. In 2025 its creators joined Apple, and the project stayed with the CNCF under the same governance and license.
Why we picked it
A rule that checks an agent's action sits right in the path of the work. If it's slow, the agent waits. If it's vague, nobody can say why something was blocked. Rego is good at both problems.
It's fast. OPA indexes rules so it only evaluates the ones that could match, and the docs describe a part of the language that's engineered to evaluate in near constant time, so adding more rules doesn't meaningfully slow a decision down. In VeriProof, your rules are compiled to WebAssembly and run inside our service. There's no call out to a separate policy server while your agent waits.
It says what, and leaves the how to the engine. You write down what has to be true. You don't write loops or worry about the order things get checked in, which keeps rules short and easy to review.
Decisions are data. A rule reads a JSON document and returns one. That makes every decision easy to record and replay, which matters a lot when an auditor asks why something happened.
It's testable and portable. Rego has testing built into the toolchain, and it's an open standard with a big community. What you learn writing VeriProof rules carries over to Kubernetes admission control, API authorization and plenty of other places OPA runs.
A rule you can actually read
Here's a real one. A support agent can issue refunds, and anything over $2,000 needs a manager.
package veriproof.golden_config
import rego.v1
default allow := false
allow if not needs_manager
# A refund above $2,000 waits for a manager.
needs_manager if {
input.tool.name == "refunds.issue"
input.snapshot.refund.amount > 2000
}
violations := set()
default result_kind := "no_violation"
result_kind := "review_requirement" if needs_manager
default message := ""
message := "A refund over $2,000 needs a manager." if needs_manager
vp_result := {
"allow": allow,
"violations": violations,
"result_kind": result_kind,
"message": message,
}Read it top to bottom and it mostly explains itself. needs_manager is true when the agent is calling the refund tool and the amount is over 2,000. If that's true, the action isn't allowed through on its own, and the result says it's a review requirement with a message a person can understand. Anything else goes ahead.
Notice what the rule doesn't do. It doesn't pause the agent, find a manager or wait for an answer. VeriProof does that part: it holds the action, sends the review to someone with the authority to approve it, and resumes the work once they decide. The rule only has to say when a person is needed, which is the part your business actually cares about.
Try it in your browser
The quickest way to get a feel for Rego is to poke at it. The Rego Playground comes from the OPA project, and you don't need to install anything. Paste the rule above into the editor, put this in the Input panel and click Evaluate:
{
"tool": { "name": "refunds.issue" },
"snapshot": { "refund": { "amount": 2400 } }
}You'll get "result_kind": "review_requirement" back, with the manager message. Change the amount to 180, evaluate again, and it flips to "allow": true. When you're done with ours, the Examples menu has plenty more to play with.
Prefer a gentle walk-through first? Snyk's Rego 101 is written for beginners and uses the same playground. For the full reference, the OPA policy language guide covers everything.
Knowing which fields you can use
Honestly, the syntax is the easy part. The hard part is knowing that the refund amount lives at input.snapshot.refund.amount, and that the agent sends it at all.
VeriProof shows you. When a developer connects an agent with the SDK, the facts it sends with each action are recorded for that application. The rule editor lists those fields, and it marks the ones the application sends that the developer hasn't confirmed yet. You write against what the agent really sends, so you're not guessing at names.
If your rule needs a fact the agent doesn't send yet, you don't have to chase anyone down a hallway. You can save the draft and ask the developer to add the field, and the request shows up in their portal.
Or describe it in plain English
You don't have to start from a blank file. Open Describe policy intent on a rule and say what you want in your own words: what the policy should do, what outcome it should produce, when it applies, and an example or two that should and shouldn't match.
VeriProof's AI drafts the Rego for you. It works from your application's fields and its active rules, so it uses the names your agent actually sends and steers clear of duplicating a rule you already have. You get a plain-language explanation of the logic, and positive, negative and boundary tests are prepared when you accept the draft. The Rego source is there under Advanced Rego whenever you want to read or edit it.
A draft is still a draft. It goes through the same steps as a rule you wrote by hand: run the tests, check the impact, try it in Shadow, and get it approved before it can stop anything. AI features are off until an administrator turns them on in Settings > AI data and models.
Powerful, practical and approachable
Rego earned its place. It's fast enough to sit in front of every agent action, and it's trusted by some very demanding companies. Its one real drawback has always been the learning curve.
That's the part VeriProof takes on. You can see the fields your agents send, describe a rule in plain English, read the draft with a plain-language explanation next to it, and test it before it touches anything real. When you're ready to write Rego yourself, it's all right there.
See how a rule decides
Walk through the five outcomes a rule can return and how a new rule goes from Shadow to enforced.