SAFER backend — Agent Control Plane: FastAPI + SQLite WAL + Multi-Persona Judge + Gateway + Inspector + Red-Team + Compliance Pack.
Project description
safer-backend
The Agent Control Plane backend for SAFER — FastAPI + SQLite WAL + Multi-Persona Judge (Opus 4.7) + Gateway + Inspector + Red-Team Squad (Claude Managed Agents) + Compliance Pack.
pip install safer-backend
export ANTHROPIC_API_KEY=sk-ant-...
uvicorn safer_backend.main:app --host 0.0.0.0 --port 8000
A SAFER-instrumented agent (pip install safer-sdk) running anywhere
on your network can ship its 9-hook lifecycle events to this backend,
which then runs:
- Inspector — onboarding-phase code review (3-persona Opus call, optionally as a Claude Managed Agent with a shared memory store).
- Multi-Persona Judge — runtime evaluation with dynamic per-event routing across 6 personas (Security Auditor, Compliance Officer, Trust Guardian, Scope Enforcer, Ethics Reviewer, Policy Warden).
- Gateway — deterministic pre-call PII regex + 4 built-in policies + 3 guard modes (monitor / intervene / enforce).
- Red-Team Squad — manual 3-stage adversarial test (Strategist → Attacker → Analyst, real Claude Managed Agents path with a sub-agent fallback).
- Session Report — per-session 7-category health card, deterministic Python aggregator, zero Claude calls at aggregation time.
- Compliance Pack — GDPR / SOC 2 / OWASP LLM Top 10 reports exported as HTML / PDF (WeasyPrint) / JSON.
For the full architecture, framework matrix, dashboard walkthrough, and demo, see the main README.
Companion package
safer-backend ships alongside safer-sdk,
the lightweight client library you install in your agent project to
emit hook events to this backend. Versions stay in lockstep —
safer-backend>=0.1.0 requires safer-sdk>=0.1.0,<0.2.
License
Apache 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file safer_backend-0.1.7.tar.gz.
File metadata
- Download URL: safer_backend-0.1.7.tar.gz
- Upload date:
- Size: 169.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c749524f19cad104b35c7d2c1beaa544b071a3b0f3ec0004adef420a3679e391
|
|
| MD5 |
636625a48bd8c8040da18b60939f3b93
|
|
| BLAKE2b-256 |
c3da72516284d6dcdb9f907069f4c8cb596e31a5791cae3f24cf7e0c74df0b84
|
File details
Details for the file safer_backend-0.1.7-py3-none-any.whl.
File metadata
- Download URL: safer_backend-0.1.7-py3-none-any.whl
- Upload date:
- Size: 171.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
449abc1b96ff1bdf8d77f72c6457f5094932f2a0e066e78583c1e93856d476b8
|
|
| MD5 |
4bb15011a63020e962d29b68c828de99
|
|
| BLAKE2b-256 |
b0b6012c606eb74c3b3a766c8e1afb10efbd89c5dc990eef2117d9c9415f34bd
|