The AI Action Firewall — tamper-evident audit trails for AI agents. EU AI Act compliance infrastructure.
Project description
AIR Blackbox Gate
The AI Action Firewall — Every agent action recorded, attributable, and provable.
Gate sits between your AI agents and the real world. Every action flows through Gate, gets checked against policy, and produces a tamper-evident signed record. Think of it like a firewall — but for AI agent actions instead of network traffic.
What It Does
Agent wants to send email
↓
Gate intercepts
↓
Policy check
↓
┌────┴────┐────────┐
↓ ↓ ↓
Auto-Allow Slack Block
Approval
↓ ↓ ↓
Signed event recorded
(HMAC-SHA256 chain)
- Intercept — Every agent action hits Gate before reaching the real world
- Policy — Rules decide: auto-allow, require human approval, or block
- Approve — Humans approve/reject actions in Slack (no dashboard needed)
- Sign — Every action produces a cryptographically chained event
- Report — Generate compliance PDFs for legal/audit teams
Quick Start
# Install
pip install -r requirements.txt
# Start Gate
uvicorn gate.proxy:app --reload
# Run the demo
python3 demo.py
The demo simulates a recruiting AI agent sending outreach emails through Gate. You'll see actions get auto-allowed, held for approval, and blocked — with every action signed and chained.
Configuration
Copy .env.example to .env and set your signing key:
cp .env.example .env
# Edit .env with your GATE_SIGNING_KEY and optional SLACK_WEBHOOK_URL
Edit gate_config.yaml to define your policy rules:
policy:
default: require_approval
rules:
- name: allow-search
action_type: search
decision: auto_allow
- name: block-delete
action_type: db_delete
decision: block
- name: approve-emails
action_type: email
decision: require_approval
max_per_hour: 50
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/actions |
POST | Submit an agent action |
/actions/{id}/approve |
POST | Approve a pending action |
/actions/{id}/reject |
POST | Reject a pending action |
/events |
GET | Query the event store |
/events/{id} |
GET | Get a specific event |
/verify |
GET | Verify audit chain integrity |
/stats |
GET | Summary statistics |
/report |
GET | Generate compliance report |
/health |
GET | Health check |
Slack Integration
Gate sends approval requests to Slack with Approve/Reject buttons:
- Create a Slack app at https://api.slack.com/apps
- Enable Incoming Webhooks
- Set
SLACK_WEBHOOK_URLin your.env - Point the Slack interactivity URL to
https://your-gate-url/slack/interact
Compliance Reports
Generate reports at /report:
/report— HTML (print to PDF from browser)/report?format=json— Raw data/report?format=markdown— Markdown/report?start=2026-01-01&end=2026-02-01— Date range
Reports include: action counts, approval rates, human oversight summary, anomaly detection, and cryptographic chain verification.
Architecture
gate/
├── proxy.py — FastAPI server (the main entry point)
├── events.py — HMAC-SHA256 signed event store
├── policy.py — Policy engine (auto-allow, require-approval, block)
├── slack_bot.py — Slack approval bot
├── report.py — Compliance report data + markdown rendering
└── report_endpoint.py — /report API endpoint with HTML output
Part of AIR Blackbox
- AIR Blackbox Scan tells you if your AI system is built right (build-time compliance)
- AIR Blackbox Gate makes sure it behaves right (runtime control)
Together: full AI governance lifecycle.
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 air_blackbox-0.2.0.tar.gz.
File metadata
- Download URL: air_blackbox-0.2.0.tar.gz
- Upload date:
- Size: 34.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.13.2 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63cb9274dbaecd7a81605a650a766313904ff96aa65eec34bc6a9cd476670d95
|
|
| MD5 |
4bb1332592cbc6ee372ef88541c82493
|
|
| BLAKE2b-256 |
16edf62927ddae4f842dcbaf3d78b291fe1ea3befb3c29a71c05f02373044fce
|
File details
Details for the file air_blackbox-0.2.0-py3-none-any.whl.
File metadata
- Download URL: air_blackbox-0.2.0-py3-none-any.whl
- Upload date:
- Size: 31.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Hatch/1.16.5 cpython/3.13.2 HTTPX/0.28.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f48ff8125e929c0c08f8dc063103fb7c3d4f205488e50f4f5327c682fc00ef61
|
|
| MD5 |
13693e2602b4367f6531ac7f508b832b
|
|
| BLAKE2b-256 |
abe0acf21997c9489322c9a0b65096769697dc1e23125cc6a0a100c9b8c069d5
|