> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hydradb.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> AGENTS.md is HydraDB's maintained agent guide. Read https://docs.hydradb.com/AGENTS.md once, then use its content. /llms.txt and /llms-full.txt redirect to the same guide; they are not separate documentation indexes. If the guide is already loaded, continue with it instead of fetching either alias or reloading the guide.

# Databases: Overview

> Create and manage isolated databases for your context.

A database is a physically isolated store for context. In most integrations you create a database once, wait for provisioning, then ingest and query inside it.

## Endpoint references

SDK methods are listed by their Python names. The TypeScript SDK uses the same names in camelCase, such as `databases.deleteCollection`.

| Endpoint | SDK method | Purpose |
| - | - | - |
| [`POST /databases`](https://docs.hydradb.com/api-reference/v2/endpoint/create-database) | `databases.create` | Create a database. Asynchronous. |
| [`GET /databases/status`](https://docs.hydradb.com/api-reference/v2/endpoint/database-status) | `databases.status` | Check provisioning readiness |
| [`GET /databases`](https://docs.hydradb.com/api-reference/v2/endpoint/list-databases) | `databases.list` | List all databases for the organization |
| [`GET /databases/stats`](https://docs.hydradb.com/api-reference/v2/endpoint/database-stats) | `databases.stats` | Get row counts for a database |
| [`GET /databases/{database}/metadata-schema`](https://docs.hydradb.com/api-reference/v2/endpoint/get-metadata-schema) | `databases.get_metadata_schema` | Read the metadata schema |
| [`PATCH /databases/{database}/metadata-schema`](https://docs.hydradb.com/api-reference/v2/endpoint/update-metadata-schema) | `databases.update_metadata_schema` | Add metadata schema fields |
| [`GET /databases/collections`](https://docs.hydradb.com/api-reference/v2/endpoint/list-collections) | `databases.collections` | List active collections |
| [`DELETE /databases/collections`](https://docs.hydradb.com/api-reference/v2/endpoint/delete-collection) | `databases.delete_collection` | Permanently remove one collection. Asynchronous. |
| [`DELETE /databases`](https://docs.hydradb.com/api-reference/v2/endpoint/delete-database) | `databases.delete` | Permanently remove a database. Asynchronous. |

The asynchronous calls return before the work finishes. Each endpoint page explains how to confirm completion.

## Typical call sequence

1. Create the database: `POST /databases`.
2. Wait for provisioning: poll `GET /databases/status` until `infra.ready_for_ingestion` is `true`.
3. Ingest context and wait for indexing: see the [Context overview](https://docs.hydradb.com/api-reference/v2/endpoint/context-overview.md).
4. Query: see the [Query overview](https://docs.hydradb.com/api-reference/v2/endpoint/query-overview.md).
5. Inspect usage: `GET /databases/stats` returns row counts for knowledge and memories.

## Key concepts

* **Database:** A top-level isolated store, for example one per enterprise customer. See [Databases and Collections](https://docs.hydradb.com/essentials/v2/databases-and-collections.md).
* **Collection:** A group of context inside a database, created on the first write. See [Databases and Collections](https://docs.hydradb.com/essentials/v2/databases-and-collections.md).
* **Metadata schema:** Fields declared at database creation, or added later with [Update Metadata Schema](https://docs.hydradb.com/api-reference/v2/endpoint/update-metadata-schema.md), that queries can filter on. See [Metadata Filters](https://docs.hydradb.com/essentials/v2/metadata.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.