Postgresai

postgresai – Postgres observability built for humans and AI agents

LLM Mart 3 views 130 listing impressions

Monitoring, health checks, and root cause analysis — built for humans and AI agents

Live Demo · Documentation · Get started

postgresai

Battle-tested in PostgresAI team's work with companies like GitLab, Miro, Chewy, Suno, Supabase, Gadget, and more — now packaged for easy use by humans and AI agents.

Why postgresai?

Traditional monitoring tools give you dashboards. postgresai gives AI agents the context they need to actually fix problems.

  • Structured for AI — Reports and metrics designed for LLM consumption
  • Issues workflow — Track problems from detection to resolution
  • 45+ health checks — Bloat, indexes, queries, settings, security
  • Active Session History — Postgres's answer to Oracle ASH
  • Expert dashboards — Four Golden Signals methodology

Part of Self-Driving Postgres — PostgresAI's open-source initiative to make Postgres autonomous.

Get started

1. Sign up

Create a free account at postgres.ai

2. Authenticate

npx postgresai auth

This opens your browser to log in and saves your API key locally.

3. Run health checks

PGPASSWORD=secret npx postgresai checkup postgresql://user@host:5432/dbname

4. View results

Open console.postgres.ai to see:

  • Detailed reports with suggested fixes
  • Issues workflow to track remediation
  • Historical data across all your projects

Offline mode: Add --no-upload to run locally without an account or sending report data to the PostgresAI API.

See demo
postgresai checkup demo

Express Checkup

Run specific checks or work offline:

# Run a specific check
npx postgresai checkup --check-id H002 postgresql://...

# Local JSON output only (no upload)
npx postgresai checkup --no-upload --check-id H002 postgresql://...

Markdown conversion is performed by the PostgresAI API and transmits the full report JSON. Therefore, --markdown cannot be combined with --no-upload. For local-only output, use --json or --output instead.

Tips: npx pgai checkup also works. bunx postgresai if you prefer Bun.

Full monitoring stack

For continuous monitoring with dashboards, install the full stack on a Linux machine with Docker:

# Quick demo with sample data
npx postgresai mon local-install --demo
# → Open http://localhost:3000

# Production setup (Linux + Docker required)
npx postgresai prepare-db postgresql://admin@host:5432/dbname  # Create monitoring role with minimal permissions
npx postgresai mon local-install --api-key=YOUR_TOKEN --db-url="postgresql://..."

Get your API key at console.postgres.ai — or use the fully managed version there.

Production-safe

All diagnostic queries are carefully designed to avoid the observer effect — they use timeouts, row limits, and non-blocking approaches. Battle-tested on production databases with dozens of TiB of data, hundreds of kTPS, and millions of DB objects.

Preview the setup SQL before running:

npx postgresai prepare-db --print-sql postgresql://...   # Review what will be created

The prepare-db step creates a read-only postgres_ai_mon user with minimal permissions, enables pg_stat_statements, and creates postgres_ai schema with a few helper views.

What's inside

From the project's README.

Related servers

Universal MCP Server with advanced AI memory capabilities and semantic search.

30 views

MCP server for MikroTik routers: firewall, NAT, routing, DHCP, DNS, WireGuard and more via SSH.

28 views

Let Codex orchestrate external coding agents through their native harnesses.

28 views

Control plane MCP for scoped recon, triage, and bounded proofs.

27 views