FAULTWALL — trust & observability layer for AI agents on PostgreSQL — Go 1.21+ · Postgres 14+

Trust your AI agents with production.

Your AI agent has your database password. A prompt injection hides a DROP TABLE in a customer comment — valid connection, valid credentials, the WAF sees nothing. FaultWall parses the SQL before it reaches PostgreSQL and blocks it.

Watches every query your agents run. Stops the dangerous ones, flags the wasteful ones. Agents connect to port 5433 instead of 5432 — that's the only change.

brew curl docker go
$ brew install shreyasXV/tap/faultwall
Quick start — 5 min github ↗
Every
rogue query blocked before it runs
+0.14ms
median added per query — your DB won't feel it
0
changes to your agents or schema
5 min
from install to first blocked query
faultwall --proxy --listen :5433 --upstream localhost:5432 POLICY_ENFORCEMENT=enforce
connect agent=cursor-ai/summarize-feedback
ALLOW cursor-ai/summarize-feedback SELECT * FROM feedback LIMIT 100;
BLOCK cursor-ai/summarize-feedback DROP TABLE users; blocked_operation
BLOCK rogue-bot/steal SELECT * FROM users; agent_not_in_policy
BLOCK cursor-ai/summarize-feedback SELECT pg_read_file('/etc/passwd'); blocked_function
└─ blocked queries never reach PostgreSQL · parsed with the real PostgreSQL C parser (pg_query_go) · sub-3ms overhead
§1 — MECHANISM

No SDK. No code changes. No schema changes.

how it sitsInline L7 proxy. Agents connect to :5433, FaultWall parses every statement — Simple and Extended Query Protocol — and only allowed queries reach :5432. Works with psql, psycopg2, pgx, SQLAlchemy, JDBC.
who ran whatAgents identify via application_name: agent:cursor-ai:mission:summarize. Every query attributed to an agent and a mission. Unlisted agents are denied by default.
what it parsesThe real PostgreSQL C parser (pg_query_go) — not regex. DROP hidden in a CTE, blocked functions like pg_read_file and pg_sleep, row limits, table scope: all enforced per agent.
what it costs youSub-3ms overhead per query. Policy check in memory. No LLM in the hot path, no API keys, no network round-trips. Fail-open on internal errors — it won't break your app.
when you don't trust it yetStart in monitor mode — dashboard, anomaly detection, cost attribution, Slack alerts, no blocking. Flip to enforce when the violation log matches your intent.
watching for driftAnomaly detection runs locally. Statistical baselines per agent, z-score analysis flags deviations. Plus a 10-tool MCP server so agents can check their own policies and violations autonomously.

Policies are YAML, not a DSL.

Mission-scoped policies define what each agent can do — allowed tables, blocked operations, row limits, query timeouts. Per agent, per mission. Everything else is blocked before it reaches the database.

# policies.yaml agent: cursor-ai mission: summarize-feedback allow_tables: [feedback, reviews] block_ops: [DROP, DELETE, TRUNCATE] max_rows: 500
§2 — DASHBOARD

See every agent, every query, every block.

FaultWall proxy-mode dashboard — agents, query log, recent blocks, and violations per agent
Proxy-mode dashboard: live query log, recent blocks, violations per agent, cost attribution.
§3 — COMPATIBILITY

Works with every managed Postgres.

Validated against the stack your team actually runs. Drop-in, wire-level, no driver changes.

okSelf-hosted Postgres12+
okAWS RDSPostgres 16
okAWS AuroraPostgres 16.8
okNeonServerless PG 17
okPgBouncertx + session
noteSupabasepooler — workaround
okCloud SQL · CrunchyBridge · DO MPGexpected¹
+0.14ms median per-query overhead · throughput bound by your DB round-trip, not the proxy · zero agent code changes
¹ Same Postgres wire protocol as validated providers; tested path exists, instance not provisioned. Full compatibility matrix & SCRAM config →
§4 — SETUP

Four steps to agentic protection.

01

Write your policy

Define what each agent can do in policies.yaml — allowed tables, blocked operations, row limits, query timeouts. Per agent, per mission.

02

Run FaultWall proxy

Single command to start:

./faultwall --proxy --listen :5433 --upstream localhost:5432 --policies ./policies.yaml
03

Point agents at port 5433

Set application_name in the connection string. FaultWall parses the identity automatically.

postgres://...?application_name=agent:cursor-ai:mission:summarize
04

Queries are checked in real-time

Every query is parsed and checked against the agent's policy. Allowed queries pass through. Violations are blocked — the database never sees them.

§5 — ARCHITECTURE

Inline — nothing gets past.

┌──────────────┐         ┌─────────────────────────┐         ┌──────────────┐
│   AI Agent   │ ──────► │ FAULTWALL PROXY  :5433 │ ──────► │  PostgreSQL  │
│              │         │ parse · attribute ·     │         │    :5432     │
│ connects to  │         │ enforce                 │         │ only allowed │
│    :5433     │    ┌────┤ blocked queries stop    │         │   queries    │
└──────────────┘    │    │ here — DB never sees    │         └──────────────┘
                    ▼    │ them                    │
                 violation └─────────────────────────┘
                 log + alert
§6 — DEPLOYMENT

Two modes for every stage.

MODE 1 — RECOMMENDED

Proxy · enforce

Inline between agents and PostgreSQL. Every query parsed and checked before it executes. Violations blocked, connection preserved.

  • Intercepts 100% of queries
  • Real-time blocking
  • Sub-3ms latency overhead
  • Fail-open on internal errors
# enforce policy inline POLICY_ENFORCEMENT=enforce \ ./faultwall --proxy --listen :5433 \ --upstream localhost:5432 \ --policies ./policies.yaml
MODE 2 — OBSERVE

Monitor · sidecar

Read-only sidecar polling pg_stat_activity. Not in the data path — visibility without enforcement.

  • Dashboard with agent activity
  • Anomaly detection & alerting
  • Cost attribution per agent
  • Slack notifications · log-only mode
# observe only, no blocking DATABASE_URL="postgres://…" \ POLICY_FILE=./policies.yaml \ ./faultwall

Self-tuning detection

Anomaly detection starts in observe-only mode and builds per-agent baselines from your real traffic before it ever flags anything. A genetic search tunes sensitivity thresholds and window sizes against your workload, so detection adapts to how your agents actually behave instead of a fixed global rule.

observe → learn baselines → you decide → enforce

Enterprise: kernel-level attribution

Need deeper visibility? Our eBPF engine hooks into the Linux kernel's scheduler and block I/O subsystem. Every CPU nanosecond and disk byte attributed to the exact PostgreSQL PID — mapped back to the agent in real-time.

Available for teams running self-hosted PostgreSQL on Linux 5.8+ with PostgreSQL 14–16.

shreyas@faultwall.com →
§7 — PRICING

Free to self-host. $200/mo when you want it managed.

Self-host everything for free, forever. Upgrade to the hosted control plane for telemetry, risk scoring, and a managed review queue.

SELF-HOSTED
$0
Self-host the full firewall. Yours forever.
  • Inline L7 proxy & deterministic SQL parsing
  • Mission-scoped YAML policies (tables, ops, row limits)
  • Agent identity & real-time enforcement
  • Anomaly detection & MCP server
  • All self-hosted features — no feature gates
View on GitHub
TEAM — RECOMMENDED
$200/mo
Everything in self-hosted, plus the hosted control plane.
  • Hosted control plane — nothing to operate
  • Telemetry dashboard (metadata only — queries stay yours)
  • QWM risk scoring across your workload
  • APA review queue + auto-approve policies
  • Installations dashboard · email support
Get Started
Sign up free — upgrade to Team anytime from your dashboard.

Your AI agent has database credentials. FaultWall shows you what it does — and stops what it shouldn't.

Sign up free, connect your Postgres, and see every agent query in minutes. Self-host or use the hosted control plane.