pgBot: a 5.9 MB read-only Postgres tool for humans and agents
pgBot is a lightweight, open-source CLI (5.9 MB) that connects to any PostgreSQL database and provides real-time health monitoring, query performance analysis, and AI-powered explanations in plain English. It's read-only by design, works with hosted databases like Supabase, Neon, and RDS, and can run as an agent next to private databases. It also speaks the Model Context Protocol, letting AI agents use it as a deterministic tool for inspection and diagnosis.
Nobody reads database metrics. pgbot does.
- znnajdla
I don't understand what this tool offers over simply querying pg directly and reading pg logs?
- sashash
It works anywhere you have a standard PostgreSQL connection string.
- sashash
Hi HN, I’m Alex, a longtime PostgreSQL and Rails/Go/Rust engineer.
I built pgbot because I often needed a quick explanation of what was happening inside a database without first deploying a dashboard, collector, telemetry stack, or separate database.
pgbot is an open-source 5.9 MB Go binary that connects directly to PostgreSQL and returns useful findings in seconds:
pgbot inspect — database health
pgbot queries — expensive queries
pgbot indexes — risky and unused indexes
pgbot ask — answers for humans and agents
MCP — lets coding agents inspect PostgreSQL directly
The diagnostic findings are computed deterministically in Go. They are not invented by an LLM.
pgbot is also read-only by design: it inspects the database but never applies changes. An agent can explain and prioritize the evidence, but it cannot silently modify production through pgbot.
Source: https://github.com/pgrundev/pgbot
I’d especially appreciate feedback about missing diagnostic checks, false positives, and the read-only safety model for coding agents.