Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safer_backend-0.1.1.tar.gz (166.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

safer_backend-0.1.1-py3-none-any.whl (167.8 kB view details)

Uploaded Python 3

File details

Details for the file safer_backend-0.1.1.tar.gz.

File metadata

  • Download URL: safer_backend-0.1.1.tar.gz
  • Upload date:
  • Size: 166.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for safer_backend-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2f4819d11297e359cd94588cb036a2a61f218730e18ae5d3ec8af309f102ce8c
MD5 30d3e9753fd371ee9dbb188ef8ba7114
BLAKE2b-256 36ee628f9d1af6126d60b7c368d11701683059beed8dfa855e6915f22b4a7b1c

See more details on using hashes here.

File details

Details for the file safer_backend-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: safer_backend-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 167.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for safer_backend-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e35c8b2498c1666c11027ac94448d24e60cd6b3aa8fe5498204bce4b503edaf
MD5 f45432dc4089d4526dc5a40a571f2f7d
BLAKE2b-256 fe2deb79daf7fbdf5e3b06c1e69f94efd6e37adb089a0d3a00a176fecdcbfc3f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page