Skip to main content
Install the SDK, create a database, ingest a document and a memory, and query both in one call. Working with a coding agent such as Claude Code, Cursor, or Codex? Copy this prompt instead, and it builds the integration from the Agent Integration Guide.

Integrate HydraDB into this project with your coding agent.

1. Install and initialize

Get an API key from dashboard.hydradb.com, then set it in the terminal where you run the examples:
Install the SDK and create a client:

2. Create a database, ingest context, and query it

Create a database, ingest a refund policy and a customer memory, wait until both are indexed, then query them together. Indexing runs in the background, which is why the code waits before querying. If you already created a database, set database to its name and skip the create call.

3. Check the result

The query returns chunks (passages of your sources), not a generated answer. The SDK examples print formatted context; cURL prints the chunk text. Both should include the policy and the memory:
Send these chunks to your model as context. build_string in Python and buildString in TypeScript format them for a prompt. See Query.

What you have built

That is the full loop: create a database, ingest context, wait for indexing, query it, and pass the result to a model. HydraDB handles parsing, chunking, embedding, graph building, and search. HydraDB is serverless: there is nothing to provision, and the same code works at any scale, whether the context is a Markdown file or a Slack workspace synced by a connector.

Next steps

Stuck? Email [email protected].