---
title: "Xata Agent"
description: "Your AI expert in PostgreSQL. Open-source AI agent that monitors, diagnoses, and optimizes your PostgreSQL database. Supports AWS RDS, Amazon Aurora, Google Cloud SQL, and more."
source: "https://xata.io/database-agent"
---

![Xata agent](/images/agent/xata-agent-symbol.svg?dpl=dpl_DtyqecrfM76h4rKMpN2eqqPQrbDK)

Xata Agent,
your AI expert in PostgreSQL
============================

Open-source AI agent that monitors, diagnoses, and optimizes your PostgreSQL database. Supports AWS RDS, Amazon Aurora, Google Cloud SQL, and more.

[Get started](https://console.xata.io/signup)[View on GitHub](https://github.com/xataio/agent)

## I'll be on-call, so you don't have to

Xata Agent monitors your PostgreSQL metrics and logs 24/7, diagnosing issues, and suggesting optimizations.

- **Find root causes.** Pinpoint slow queries, deadlocks, and performance bottlenecks.

- **Get actionable fixes.** AI-powered suggestions for query optimization and schema improvements.

- **Ensure stability.** Proactive monitoring to keep your database healthy.

## Onboarding the Agent

You onboard the Agent the same way you would onboard a new SRE or Platform Engineer on your team: by giving them access to your tools.

We provide a Docker image that you can easily run in any environment.

The Xata Agent supports the most popular LLM providers as well as local models.

The Agent uses the Cloud integrations (AWS, GCP, etc.) to get details about the Postgres instance/cluster, as well as metrics and logs.

Use the Slack integration to get notified when the Agent detects a problem.

## Tools, playbooks, and schedules

The Xata Agent combines GenAI reasoning models with Postgres-specific tools and playbooks.

**Tools** are functions that can be called by the Agent to get information about the Postgres database, the instance/clusters on which it is running, and metrics and logs. Tools can be provided by integrations and by MCP servers.

- Large library of pre-built tools for Postgres.
- Custom tools via MCP servers.
- Pre-built playbooks for most common Postgres issues.
- Add custom playbooks simply in English.
- Schedule playbooks to be executed periodically.

**Playbooks** are a sequence of steps that the Agent can follow to detect, diagnose, and fix issues in the Postgres database. Playbooks are written in English and you can easily create your own, or modify the pre-built ones.

**Schedules** are used to run playbooks at specified intervals. This way the Agent can detect issues 24/7, find the root cause, and fix them before they impact the users. Schedules are defined as CRON expressions, or you can let the Agent decide the best time to run the playbook.

**Large language models** are used to reason about and find the root cause of the issues. Modern LLMs are already trained on a large amount of Postgres-related information, and have advanced reasoning capabilities. The Agent supports the major LLM API providers, as well as local models (e.g. Ollama).

## Works with any Postgres installation

The Xata Agent has native support for AWS RDS, Amazon Aurora, Google Cloud SQL. It also supports any other Postgres provider that can be accessed via a connection string.

![AWS Logo](/images/byoc/aws.svg?dpl=dpl_DtyqecrfM76h4rKMpN2eqqPQrbDK)

### AWS

![Google Cloud Platform Logo](/images/byoc/gcp.svg?dpl=dpl_DtyqecrfM76h4rKMpN2eqqPQrbDK)

### Google Cloud

## Branch your database in seconds

[Get in touch](https://cal.com/team/xata/xata-sales)[Get started](https://console.xata.io/signup)
