Skip to main content

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.

Metadata

Release files for safer-backend 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for safer-backend 0.1.8
File Size Uploaded Provenance Actions
safer_backend-0.1.8.tar.gz 169.1 kB Without provenance Details for safer_backend-0.1.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for safer-backend 0.1.8
File Interpreter ABI Platform Actions
safer_backend-0.1.8-py3-none-any.whl Python 3 none any Details for safer_backend-0.1.8-py3-none-any.whl

Total release size: 340.2 kB

Release files / safer_backend-0.1.8.tar.gz

Download URL safer_backend-0.1.8.tar.gz
Size 169.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8d018c5057ff9c584a7e1e7de2d95b365421d5a8c6bc0796b51b1f656166a5e5
BLAKE2b-256 checksum
How to use checksums
de922549b8d85f6b1cad0369a0396d4e06d717ba69f331f93a52b42ba22966b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Release files / safer_backend-0.1.8-py3-none-any.whl

Download URL safer_backend-0.1.8-py3-none-any.whl
Size 171.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f575f21ddf92bc1f1031a33f1aa7ead19d1713b49a8f61ccf03afc4f4e5ca2a8
BLAKE2b-256 checksum
How to use checksums
6472a1aa2bf3cdefb30f87a122b52a51bb2374729717ffba5f56752748d2285d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.15

Security for safer-backend 0.1.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page