The Framework at a glance
Values are the starting point, and they are fixed. The Intellect knows what the agent is meant to be, because its worldview says so, but it is denied the rubrics it will be graded against, along with their weights and every score, so it cannot write to the test. The rest of the loop holds them: the Will takes its structural rules and its hard gates, the Conscience scores against the rubrics, and the Spirit weights them into the alignment figure. The closed loop runs Intellect to Spirit, and the Spirit feeds back to the Intellect.
In classical philosophy the Intellect is what discerns the values and applies them to the case at hand. SAFi splits that in two, and on purpose: one instance of the faculty drafts, another holds the rubrics and grades. The reason is adversarial rather than metaphysical, since the judge cannot also be the defendant.
Click any card for more detail.
What the framework is
SAF is a framework grounded in classical philosophy. It describes how values, understanding, choice, judgment, and coherence work together to produce aligned agents.
Download Original Manuscript (PDF)
SAFi is the software implementation of the framework. It is an open-source runtime governance engine for AI agents. Read about SAFi →
The SAFi Loop
Every agent in SAFi follows this loop. It is what makes the process auditable and repeatable. Nothing here is specific to chat: a turn can be started by a person, by an API call or by a schedule, and it can act on the world and not only answer.
- Trigger: a user prompt, an API call, or a scheduled task
- Phase 0: screens the incoming prompt for injection, PII and scope probes, before any model is called
- Intellect: drafts an answer, or proposes a tool call, and can execute nothing
- Will, tool intent: authorises a proposed tool call by its arguments and not just its name, and the call runs only if it passes
- Will, structure: checks the draft, never the tool call, for its required structure
- Conscience: scores the draft value by value, with a reason and a confidence
- Will, hard gate: enforces the gates, and approves, blocks or redirects
- Spirit: folds the scores into longer-term alignment and measures drift
- Will, spirit: rules on the resulting alignment score
- Answer: returned, with the governance record written for the turn
Try the live demo. Log in as Guest and you will land on the Fiduciary agent by default. It has access to real-time stock data, and it will refuse to give you financial advice.
You can also try it without leaving this page. The chat button in the corner is a governed SAFi agent answering from this framework’s own documentation.
Continue reading
Where the framework came from, and why it was built on classical philosophy rather than invented from scratch.
After building SAFi with increasingly capable coding tools, I found that a smaller, cheaper model was enough for most of my practical engineering work. The right model, architecture, and boundaries matter more than raw capability.
SAFi is licensed under AGPL-3.0 with a special organization exception. Here is what you can modify, what stays private, and what keeps a deployment authentic.
I have been working in the IT field for about 22 years now, starting back in 2004. Back then, there was no YouTube, no Facebook, barely any high-speed internet, and blogs were still called web logs. A...
The architecture, the concepts, the applications, and the arguments behind them.