{"slug": "pgbot-a-5-9-mb-read-only-postgres-tool-for-humans-and-agents", "title": "Pgbot: A 5.9 MB read-only Postgres tool for humans and agents", "summary": "Pgbot, a 5.9 MB read-only PostgreSQL tool for humans and AI agents, has been released by pgrundev, offering database health monitoring, query performance analysis, and AI-powered explanations via direct connection or a private agent. The tool supports MCP (Model Context Protocol) for agent integration, exposing deterministic tools like inspect and unused_indexes, and is designed to be read-only by construction, ensuring agents cannot break anything.", "body_md": "# Postgres intelligence for AI agents & apps.\n\nNobody reads database metrics. pgbot does.\n\nConnect your Postgres. Get answers, not dashboards: what's healthy, what's broken, and what to fix first.\n\n[pgbot](https://github.com/pgrundev/pgbot)\n\n## How it connects\n\nTwo paths to the same place: connect directly over the wire, or run the agent next to a database that never leaves your network.\n\n```\n                             pgbot.dev\n                                 │\n             ┌───────────────────┴───────────────────┐\n             │                                       │\n Direct PostgreSQL access                       pgBot agent\n             │                                       │\n   Supabase · Neon · RDS                    Docker · Kubernetes\n PlanetScale · public DBs                  Private servers · VPC\n             │                                       │\n             └───────────────────┬───────────────────┘\n                                 ▼\n                            PostgreSQL\n```\n\n## Features\n\nConnect any PostgreSQL database and get visibility into performance, queries, health, schema, and changes — with AI-powered explanations.\n\nMonitor connections, locks, transactions, cache hit ratio, replication, WAL, and overall database health.\n\nTrack slow queries, regressions, throughput, query latency, and expensive SQL using PostgreSQL statistics.\n\nAnalyze table growth, index usage, unused indexes, missing indexes, vacuum activity, and storage patterns.\n\nAsk pgBot questions in plain English and get summaries, explanations, and recommendations based on real database signals.\n\nConnect directly to public databases or use the pgBot Agent for private environments like Docker, Kubernetes, and internal servers.\n\nRead-only access, open-source agent, and support for private deployments without exposing your database publicly.\n\n## MCP — use pgbot as an agent tool\n\npgbot mcp speaks the Model Context Protocol on stdio, so an AI agent can call pgbot as a read-only tool. It exposes deterministic tools only — inspect (full findings as JSON) and unused_indexes — and lets the connected model do the explaining. No Gemini key involved: the agent reasons over the same findings the CLI computes.\n\n```\n{\n  \"mcpServers\": {\n    \"pgbot\": {\n      \"command\": \"pgbot\",\n      \"args\": [\"mcp\"],\n      \"env\": { \"DATABASE_URL\": \"postgres://pgbot_ro@host:5432/db\" }\n    }\n  }\n}\n```\n\n### Read-only by construction\n\nWith DATABASE_URL set, the agent calls inspect with no arguments; or it can pass connection_string per call to reach several databases. pgbot never writes, so there's nothing an agent can break through it.\n\n### Tools, prompts, and resources\n\nIt also exposes a diagnose prompt — a one-click \"inspect and give me a prioritized diagnosis\" workflow — and a pgbot://baselines resource listing the databases pgbot has local history for.\n\n## Core features\n\n- +PostgreSQL health monitoring\n- +Query performance analysis\n- +Slow query and regression detection\n- +Locks and blocking query insights\n- +Table and index analytics\n- +Vacuum and autovacuum visibility\n- +Database growth tracking\n- +AI root-cause analysis\n- +AI-powered recommendations\n- +Direct connection or agent-based private access\n\n## Why pgBot\n\n### Not just metrics. Context.\n\npgBot helps you understand what changed and why it matters.\n\n### Not just dashboards. Explanations.\n\nAsk questions in plain English and get actionable answers.\n\n### Not just for hosted Postgres.\n\nUse pgBot with Supabase, Neon, RDS, Docker, Kubernetes, and private servers.\n\n### Not just observability. An AI DBA.\n\nGet insights that help you find issues faster and make better decisions.\n\n## Point it at a database.\n\nRead-only by default. Nothing leaves your infrastructure unless you say so.", "url": "https://wpnews.pro/news/pgbot-a-5-9-mb-read-only-postgres-tool-for-humans-and-agents", "canonical_source": "https://pgbot.dev/", "published_at": "2026-08-25 18:30:57+00:00", "updated_at": "2026-08-25 18:45:26.092929+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "artificial-intelligence"], "entities": ["pgbot", "pgrundev", "PostgreSQL", "MCP", "Supabase", "Neon", "RDS", "Docker"], "alternates": {"html": "https://wpnews.pro/news/pgbot-a-5-9-mb-read-only-postgres-tool-for-humans-and-agents", "markdown": "https://wpnews.pro/news/pgbot-a-5-9-mb-read-only-postgres-tool-for-humans-and-agents.md", "text": "https://wpnews.pro/news/pgbot-a-5-9-mb-read-only-postgres-tool-for-humans-and-agents.txt", "jsonld": "https://wpnews.pro/news/pgbot-a-5-9-mb-read-only-postgres-tool-for-humans-and-agents.jsonld"}}