pg_savior: a seatbelt for Postgres – blocks accidental DELETE/UPDATE
Parser hook blocks DELETE without WHERE before it wipes your production table.
pgCortex brings enterprise-ready AI to PostgreSQL. Define agents in SQL, bind them to tables, and let intelligence flow through your data automatically. Zero transaction blocking, full observability.
Outbox + external worker architecture solves a real production pain: LLM calls in Postgres triggers without blocking transactions.
Backend engineers, database architects building AI enrichment pipelines (support ticket classification, fraud detection, content moderation)
Debezium · Temporal · Apache Camel
Been working on a way to get "agent-per-row" behavior in Postgres without actually running LLMs inside the database.
The problem: Calling LLMs from triggers/functions blocks transactions, exhausts connections, and breaks ACID. Saw some projects doing this and it felt dangerous for production.
The solution: DB-adjacent architecture. Lightweight triggers enqueue jobs to an outbox table. An external Python worker (agentd) polls, executes AI calls, and writes back safely with schema validation and CAS.
What you can build:
Auto-classify support tickets on INSERT
Content moderation that doesn't block your app
Lead scoring, fraud detection, and invoice extraction
Anything where data arrives and needs AI enrichment
Works with OpenAI, Anthropic, OpenRouter, or any Agent.
One SQL line to add AI to any table:
SELECT agent_runtime.agent_watch('tickets', 'id', 'classifier', 'v1', '{"priority":"$.priority"}');
Includes 9 example use cases in the repo. Would love feedback on the architecture.
Parser hook blocks DELETE without WHERE before it wipes your production table.
Hard-coded DROP command blocks beat prompt engineering for database safety.
Client-side deadlock analysis when pgAnalyzer and EverSQL already handle this server-side.
Spreadsheet-driven fundraising as infrastructure problem, but still pre-code—specs without execution.
Postgres with database branching and pgvector built-in, designed for agents to use autonomously.
Postgres MCP server that lets agents inspect column values before writing queries.