auditable¶
auditable is a library of auditing methods for AI agents. It covers an agent configuration before a run (PRE), a run while it streams (LIVE), and a finished run (POST), with four method families and one interface per family:
| Family | When | Interface | Output |
|---|---|---|---|
config |
PRE | audit(config) |
a finding: flag or abstain, excess capabilities, rules fired |
run |
POST | fit, decision_function, fit_score |
one failure score per run |
step |
POST | fit, step_scores_batch, step_scores, rank, predict_step |
one score per step, for locating the decisive mistake |
online |
LIVE | step_alarm_scores, prefix_score |
one causal alarm per arriving step |
The library holds baselines from the literature (PyOD and PyGOD detectors, GUARDIAN, G-Safeguard, the Who&When LLM-judge protocols, OWASP-style configuration rules) beside the methods introduced with GRADE and CatchBench. CatchBench is the benchmark: tasks, corpora, protocols, and metrics live there, and the methods here reproduce their CatchBench rows sample by sample.
from auditable.methods import get_method, list_methods
trace = [
{"idx": 0, "agent": "planner", "kind": "decision", "deps": []},
{"idx": 1, "agent": "coder", "kind": "tool_call", "deps": [0]},
{"idx": 2, "agent": "coder", "kind": "decision", "deps": [0]},
]
print(get_method("online.span_z")().step_alarm_scores(trace))
print([card.method_id for card in list_methods(family="run")])
Where to Start¶
- Method Contract: the families, fit scopes, input forms, outputs, the method card, and how to add a method.
- The README lists every registered method by family, with its type and main reference;
method_table(detailed=True)adds the fit scope, fidelity, extras, and CatchBench row. auditable.datasets.make_tracesgenerates toy traces with planted mistakes, andexamples/example_methods.pyruns one method from each family on them.
Records and Graph Analysis¶
The package also contains the modules it was first built around: decision records with audit and replay, the structural graph analyses analyze_run and analyze_plan, LiveSession, and capture integrations for LangGraph, LangChain, MCP, and any loop through TouchRecorder. The pages under Lifecycle, Quickstart, PRE, LIVE, POST, and Reference describe them.
Records are content-addressed and hash-chained, and that property is limited: a digest authenticates only the records that were written, a chain exposes a later edit only when its head is anchored with an independent party, and neither reveals a decision that was never recorded.
ActionGate, ReferenceLedger, and DataAuditor are deprecated as of 0.3 and will be removed in a later release.
Install¶
pip install auditable # core: the registry and the configuration rules
pip install "auditable[tabular-ad]" # run, step, and online methods on trace features
pip install "auditable[agentpile]" # read public datasets, trace files and captured runs through agentpile
pip install "auditable[graph-ad]" # graph methods; also install torch and a matching pyg-lib wheel (see the README)
pip install "auditable[graph]" # the structural graph analyses (analyze_run, analyze_plan)