Core concepts
Six words cover most of Sefra. The example throughout is an AI agent that buys office equipment through your ERP.
Intent
Section titled “Intent”An intent is a named business action an agent may request, such as procurement.create_purchase_order. It defines the input it accepts, the API call it makes and how to undo that call.
Agents see intents as tools. They never see your API, so they can only do what an intent describes.
Policy
Section titled “Policy”A policy is a set of rules, written in Rego, that decides each request. A rule can do one of three things:
| Rule | Effect | Example |
|---|---|---|
allow |
Permits the request. Without one, it is refused | Procurement agents may use procurement intents |
deny |
Refuses it, whatever else applies | The order exceeds the remaining budget |
require_approval |
Holds it for a person | The order is EUR 20,000.00 or more |
Policy is ordinary code that gives the same answer for the same input. No AI model takes part in a decision.
A fact is live data that Sefra reads from your system to inform a decision, such as a department’s remaining budget. The agent cannot supply or alter it. If a required fact cannot be read, Sefra refuses the request.
Approval
Section titled “Approval”An approval holds a request until a person with the right role decides. The person approves the exact content they were shown, and Sefra checks policy again with fresh facts before it acts. A rule can also require that the approver is neither the agent nor the user it acts for, and every rule in the starter bundle does.
Execution
Section titled “Execution”An execution is one submitted request and everything that happens to it. It can have one step, or several as a plan: “create a vendor, then order from it”.
If a later step fails, Sefra runs the compensation of each completed step, such as cancelling the order it created. If it cannot tell whether a call took effect, it does not guess. It stops and asks an operator.
Bundle
Section titled “Bundle”A bundle is a versioned directory that holds your governance as code:
my-bundle/
connectors.yaml where your systems are and how Sefra signs in
grants.yaml which agents may use which intents
limits.yaml how fast they may call them
intents/ one file per intent
policies/ the rules and their tests
You test a bundle before activating it, and each activation is recorded in the audit trail.
How they fit together
Section titled “How they fit together”Agent ── intent ──▶ Sefra ── policy + facts ──▶ allow, deny or hold
│ │
audit trail ◀────────────── approval, if held
│ │
└────── execution ──▶ your system of record
Next, see it working in the quickstart.