Connic

PostgreSQL Change Notifier

Monitor PostgreSQL changes via LISTEN/NOTIFY, classify events by impact, and route notifications to the right team. Stores high-impact changes for auditing.

connic init my-project --templates=postgres-change-notifier

Overview

Listens to PostgreSQL NOTIFY events from database triggers and analyzes each change for significance. The change analyzer classifies events by impact level and routes notifications to the appropriate team using trigger_agent to call the notification dispatcher. High-significance events are stored in the database for audit trailing. Includes SQL examples for setting up database triggers.

Use cases

Order monitoring

Alert ops and sales teams when orders are cancelled, refunded, or when large orders arrive.

Security auditing

Track permission changes, user deletions, and sensitive field modifications in real-time.

Data sync notifications

Notify downstream systems when critical data changes via outbound webhooks to Slack, Teams, or PagerDuty.

Architecture

PostgreSQL NOTIFY
change-analyzer
Audit Events DB
notification-dispatcher
Outbound Webhook

Scaffolded project structure

Running connic init my-project --templates=postgres-change-notifier creates this file tree.

postgres-change-notifier/
  agents/
    change-analyzer.yaml
    notification-dispatcher.yaml
  tools/
    notification_tools.py
  schemas/
    change-analysis.json
  requirements.txt
  README.md

Get started

Install the template, create a Connic project, and deploy. Choose Git (automatic on push) or CLI (works with any provider).

Prerequisites

  • Python 3.10+
  • A Connic account (create a project first)
  • API key for your LLM provider (e.g. Gemini, OpenAI) to add in project variables
Create project
1

Install and scaffold

Install the SDK and create a project from this template.

terminal
pip install connic-composer-sdk
connic init my-project --templates=postgres-change-notifier

Then cd my-project

2

Deploy

Pick your deployment method. Git auto-deploys on push; CLI works with GitLab, Bitbucket, or no Git.

Git integration

  1. In Connic: Project Settings → Git Repository, connect your GitHub repo
  2. Settings → Environments: map branch (e.g. main) to Production
  3. Push your scaffolded project to that repo
terminal
git add .
git commit -m "Add PostgreSQL Change Notifier template"
git push origin main

CLI deploy

  1. In Connic: Project Settings → CLI, create an API key and copy project ID
  2. Run connic login in your project folder
  3. connic test to try with hot-reload, or connic deploy for production
terminal
connic login
connic test    # Ephemeral dev env with hot-reload
connic deploy # Deploy to production
3

Connect and configure

Add a PostgreSQL connector with your database credentials and LISTEN channel. Set up a trigger function to send NOTIFY events (see the README for SQL examples). Add your LLM provider API key in Project Settings → LLM Provider API Keys.

Template source

Browse the full template, contribute improvements, or fork for your own use.

connic-org/connic-awesome-agents/tree/main/postgres-change-notifier