Regulation is written for organizations. Software needs something a machine can check. Most of the work in ClearAgent was in the gap between those two sentences.
The problem with the obligations
The EU AI Act places requirements on autonomous systems — record-keeping, human oversight, traceability. As written, they describe what an organization must be able to demonstrate. They do not describe a function signature.
"Maintain adequate records" is not a test. You cannot write an assertion against it, and you cannot tell whether last week's change made it better or worse.
Picking the three that are addressable in software
Not every obligation is a software problem. Some are procedural and belong to a compliance team. Three of them are genuinely addressable in code, and the build was sequenced around those:
- Record-keeping — what happened, in a form that survives review
- Human oversight — where a person can intervene, and whether they could have
- Traceability — why a given action was taken, reconstructable after the fact
The measurement model
Those three become three scored dimensions:
- Policy adherence — did the agent act within the governing policy for that action
- Audit completeness — is the record sufficient to reconstruct what happened
- Decision provenance — can each action be traced to the clause that authorized it
A model-agnostic harness emits structured output against all three. That replaces "a reviewer read it and felt fine about it" with a number that means the same thing on Tuesday as it did on Monday.
Retrieval precision over breadth
Policy lookup pairs vector embedding search with cross-encoder reranking. The design goal was deliberately narrow: return the one governing clause for an agent action, not a ranked list of ten plausible ones.
A list of plausible clauses puts the judgment back on the human and makes the audit trail weaker, because "the system suggested these ten and someone picked one" is not provenance.
The ledger
Every agent invocation writes to an event-sourced audit ledger with cryptographic chain-of-custody, capturing token usage, tool-call traces, and policy-violation flags.
The point is queryability. Agent behavior is otherwise opaque — you have a prompt, a result, and no account of what happened between them. An append-only ledger turns that into data you can ask questions of afterward, which is the whole ballgame for both debugging and audit.
Scope
This is an engineering project, not a product. It has no users. The interesting work was architectural: deciding what to measure before building the thing that measures it.