Skip to main content
Integrations · Xata
Guild agents create and delete Xata projects and branches, run SQL queries against them, and manage the organizations, members, and billing that surround them. Credentials are stored server-side and injected by Guild’s proxy, so agent code never sees the API key. Credential policies let you restrict which operations each agent may perform, and every call is recorded in the audit trail.

Book a demo

See how teams govern agents that use Xata.

Talk to sales

Get access to Guild, then connect Xata to your first agent.

What the Xata tools cover

The tools reach Xata’s control-plane API at api.xata.tech and its branch-scoped SQL gateway. They cover project and branch lifecycle, SQL query execution, organization membership and roles, SSO domain claims and provider configuration, API key management for both users and organizations, GitHub repository mappings, branch backups and credential rotation, and billing sessions and invoices. The xata_delete_organization tool is marked not implemented yet in the Xata API.

How it works

1

Open your credentials page

In Guild, go to Access & setup > Credentials. The page lists connected credentials and shows a gallery of available integrations.
2

Connect the Xata integration

Click Connect, select xata, and paste your Xata API key into the API Key field. Guild sends it as a bearer token in the Authorization header on every request.
3

Add the tools to your agent

Import XataTools from the guildai~xata package and spread it into your agent’s tools object. Use pick() to include only the specific tools your agent needs, referenced by their xata_ prefix names.

Why Xata access needs governing

The Xata tools can permanently delete projects and all their branches, remove organization members, enforce SSO so members have no other sign-in path, and initiate billing sessions. Connecting a credential through Guild means agent code never receives the API key directly. Guild’s credential proxy injects it server-side only after checking the credential policies you have written. Credential policies let you write ALLOW and DENY rules scoped to specific operations, agents, or workspaces. A DENY rule always wins over an ALLOW rule, so you can permit broad read access while blocking destructive operations such as xata_delete_project or xata_set_organization_sso_provider_enforcement. You can scope one credential to give a provisioning agent write access while a reporting agent gets only query and metrics tools. Agents that have no matching rule are denied by default once you remove the auto-created allow-all policy.

About the Xata integration

Agents can create, configure, and delete Xata projects and branches, then run SQL queries against them. They can also manage organizations, members, SSO, API keys, and billing. GitHub repository mappings and branch backups are also supported. The integration is guildai~xata.

Authentication

  • Type: API key
  • Header: Guild sends the key as a bearer token in the Authorization header

Setup

1

Connect Xata

In Guild, go to Access & setup > Credentials, click Connect, select xata, and paste the key into API Key.
See Credentials for workspace, member, and agent-scoped credentials.

Usage

Selecting specific tools

Tools are named with the xata_ prefix. Use pick() to include only what your agent needs.

Tools

Tools in the latest published version of guildai~xata:

Frequently asked questions

Yes. The xata_query tool executes a single SQL query or a batch of queries against a PostgreSQL branch using Xata’s branch-scoped SQL gateway.
Not yet. The xata_delete_organization tool is listed in the catalog but is marked not implemented yet in the Xata API. The xata_request_organization_deletion tool flags the organization for deletion instead.
Write a credential policy with a DENY rule for xata_delete_branch and xata_delete_project, scoped to that agent. Guild’s proxy enforces the rule before the request reaches Xata, and a DENY always overrides any ALLOW rule. See Credential policies for the rule syntax.
Yes. Connect a second Xata credential scoped to that workspace from the workspace’s Credentials page. Guild picks the workspace-scoped credential ahead of the account-level one for agents in that workspace. See Credentials for the full resolution order.

Put a governed agent on Xata this week

Book a demo

See how teams govern agents that use Xata.

Talk to sales

Get access to Guild, then connect Xata to your first agent.
Also runs on Guild: Airtable · AssemblyAI · BigQuery · Chroma Read: Docs: Credential policies · Credentials · Tools in agents
Last modified on December 1, 2026