agent  by xataio

Open-source AI agent for PostgreSQL database monitoring and optimization

created 5 months ago
827 stars

Top 43.8% on sourcepulse

GitHubView on GitHub
Project Summary

Xata Agent is an open-source AI system designed to act as an expert PostgreSQL administrator, automating database monitoring, issue detection, and performance tuning. It targets database administrators and SREs seeking to proactively manage PostgreSQL instances, offering benefits similar to a seasoned SRE hire with specialized Postgres knowledge.

How It Works

The agent leverages a tool and playbook-based architecture to interact with PostgreSQL databases and cloud provider metrics. It analyzes logs and metrics (e.g., from AWS CloudWatch for RDS/Aurora), executes predefined SQL queries against database internals (pg_stat_statements, pg_locks), and uses LLMs (OpenAI, Anthropic, Deepseek) to interpret findings and suggest fixes. This approach aims to provide structured troubleshooting and prevent LLM hallucinations by grounding responses in concrete data and predefined workflows.

Quick Start & Requirements

  • Install via Docker Compose: docker compose up
  • Prerequisites: Docker, PostgreSQL database (for agent state), OpenAI API key (or other supported LLM provider).
  • Access the agent at http://localhost:8080.
  • Detailed deployment guides are available for EC2.
  • Demo Walkthrough

Highlighted Details

  • Proactively monitors logs and metrics for common issues (high CPU, memory, connections).
  • Suggests configuration tuning and indexing improvements.
  • Supports multiple LLM providers (OpenAI, Anthropic, Deepseek).
  • Extensible via custom TypeScript tools and English-language playbooks.
  • Integrates with AWS RDS/Aurora and Slack notifications.

Maintenance & Community

  • Actively used internally at Xata for database operations.
  • Roadmap includes support for custom playbooks, more cloud providers (GCP, Azure), Discord integration, and an approval workflow for potentially destructive commands.
  • A cloud version is under development.

Licensing & Compatibility

  • License: Not explicitly stated in the README.
  • Compatibility: Designed for self-hosting; commercial use implications are unclear without a stated license.

Limitations & Caveats

The agent is in early stages, with features like lock investigation and vacuuming support still under development. It currently lacks an approval workflow for potentially destructive commands, though this is planned. Support for cloud providers beyond AWS is also pending.

Health Check
Last commit

5 days ago

Responsiveness

1 day

Pull Requests (30d)
5
Issues (30d)
0
Star History
99 stars in the last 90 days

Explore Similar Projects

Starred by Elie Bursztein Elie Bursztein(Cybersecurity Lead at Google DeepMind), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
1 more.

SuperAGI by TransformerOptimus

0.2%
17k
Open-source framework for autonomous AI agent development
created 2 years ago
updated 6 months ago
Feedback? Help us improve.