Reflex — Governance Layer for Financial AI Agents

Reflex is an in-flight security interceptor and transparent reverse proxy for autonomous AI agents operating in financial services and high-compliance environments. It lets institutions deploy fleets of AI agents safely by enforcing real-time governance on every tool call before it reaches core banking infrastructure.

What it does

Reflex sits transparently between AI agents (LangChain, CrewAI, AutoGen, VS Code Copilot, Claude Desktop) and downstream banking APIs (Identity, Payments, Risk Ops). Every agent request passes through a multi-stage governance pipeline:

  1. Revocation & fleet-halt check — killswitch validation against Redis revocation keys
  2. Embedded OPA policy engine — in-memory Rego evaluation enforcing ABAC rules
  3. Atomic spend-cap engine — Redis Lua scripts for per-parameter budget and rate limits
  4. Cryptographic audit ledger — tamper-evident SHA-256 chained hashes stored in PostgreSQL
  5. Transparent forwarding — approved requests proxied to downstream MCP servers

Key capabilities

  • Multi-stage governance pipeline — real-time evaluation of every tool invocation
  • Killswitch & fleet halt — revoke individual instances or halt the entire fleet
  • Dynamic schema filtering — filters tools/list per agent to prevent unauthorized tool access
  • Atomic spend caps — per-call, hourly, and daily limits scoped to each tool's numeric fields
  • Embedded OPA Rego engine — hot-reloading policy evaluation
  • Tamper-evident audit ledger — chained SHA-256 hashes with online verification
  • Real-time control center — Next.js dashboard with live WebSocket telemetry
  • OpenAPI virtualization — converts legacy REST specs into AI-accessible MCP tools

Tech stack

Layer Technology
Gateway (data plane) Go, OPA (Rego), Redis, PostgreSQL
Backend (control plane) Python, FastAPI, SQLAlchemy
Frontend (dashboard) Next.js, React, Tailwind CSS
Database PostgreSQL
Cache / pub-sub Redis
Policy engine Open Policy Agent (OPA)
Protocol Model Context Protocol (MCP)
Deployment Docker, Azure Container Apps

Built With

Share this project:

Updates