Hire an AI Postgres SRE that refuses to drop tables
A self-hosted AI operations agent that monitors PostgreSQL, diagnoses performance issues, and suggests fixes while staying strictly read-only.

What it does
Xata Agent watches your Postgres databases for performance and configuration issues, then troubleshoots root causes like an SRE who actually read the manual. It ingests logs and metrics from AWS RDS, Aurora, and Google Cloud SQL, runs diagnostic queries against system catalogs like pg_stat_statements, and nudges you via Slack when something looks off. The project is essentially an opinionated control plane that wires LLM reasoning into database observability.
The interesting bit
The safety model is refreshingly paranoid: the agent uses only preset SQL commands and explicitly refuses to run destructive—or even potentially destructive—operations against your database. Instead of giving the LLM free rein, it constrains behavior through TypeScript “tools” and English-language “playbooks” that act like runbooks for common scenarios such as high CPU, slow queries, and connection bloat. Think of it as a read-only database intern that can investigate but never touch.
Key highlights
- Supports multiple LLM backends: OpenAI, Anthropic, and Deepseek
- Integrates with CloudWatch for RDS/Aurora metrics and logs, plus Google Cloud SQL
- Extensible via TypeScript tools, plain-English playbooks, and integration widgets for AWS and Slack
- Ships as Docker images with a web UI; stores its own state in a separate Postgres database
- Includes eval testing for LLM interactions to catch regressions in reasoning
Caveats
- Still early days; the roadmap shows active gaps, including missing playbooks for lock contention and vacuuming, plus no approval workflow yet for potentially dangerous statements
- Cloud provider support is incomplete: Azure Database for PostgreSQL and Digital Ocean Managed Databases are not yet supported
- A cloud-hosted version is on a waitlist, so the current offering is strictly self-hosted
Verdict
Teams running Postgres on AWS or GCP who want an automated second pair of eyes on their metrics will find this useful. If you need deep multi-cloud coverage or a fully managed service today, look elsewhere.
Frequently asked
- What is xataio/agent?
- A self-hosted AI operations agent that monitors PostgreSQL, diagnoses performance issues, and suggests fixes while staying strictly read-only.
- Is agent open source?
- Yes — xataio/agent is open source, released under the Apache-2.0 license.
- What language is agent written in?
- xataio/agent is primarily written in TypeScript.
- How popular is agent?
- xataio/agent has 1.1k stars on GitHub.
- Where can I find agent?
- xataio/agent is on GitHub at https://github.com/xataio/agent.