Skip to main content

What you’ll build

Step 3 is async - HydraDB parses, chunks, embeds, and graphs your content in the background. Steps 1, 2, 4, and 5 run in real time.

Prerequisites

  • An API key from app.hydradb.com
  • A backend that can make HTTP calls, or one of the HydraDB SDKs
Base URL: https://api.hydradb.com
Authentication: Authorization: Bearer $HYDRA_DB_API_KEY on every request (substitute the actual key value)

Install the SDK (optional)

Initialize a client:

1

Step 1 - Create a Tenant

A tenant is your fully isolated workspace. Everything you ingest and recall lives inside it.
Response:
Receiving a "status": "accepted" response indicates that the creation process has successfully started, but it does not imply that the tenant is fully provisioned.
Tenant creation is asynchronous. Poll until provisioning completes before ingesting:
Response:
Wait until infra.scheduler_status, infra.graph_status, and both values in infra.vectorstore_status are true before ingesting.
Typical provisioning time depends on plan: 1–2 minutes for Free and Ship plans, 4–5 minutes for Enterprise plans (which provision physically-isolated infrastructure). Allow up to ~5 minutes in any polling loop you write.
2

Step 2 - Ingest Data

HydraDB has two distinct data primitives. Pick the one that matches what you’re ingesting.

Knowledge - documents and app sources

Knowledge is shared, tenant-wide content that all users can recall: PDFs, DOCX files, Slack threads, Notion pages, CSVs.
Response:

Memories - user preferences and conversation history

Memories are user-specific, dynamic context: preferences, chat history, behavioral signals, inferred traits. Each memory is scoped to a sub_tenant_id and is fully isolated from other users.
Response:
Both paths return a source_id you can use to track processing in the next step.
3

Step 3 - Verify Processing

Ingestion is asynchronous. Content passes through a pipeline before it is searchable:
Response:
Poll every few seconds until indexing_status is "completed". Most documents index in under 60 seconds; larger documents may take up to 5 minutes.
4

Step 4 - Recall Context

HydraDB exposes two recall endpoints - one per store. Use the one that matches what you ingested.

For Knowledge - documents

For Memories - user preferences

Key flags:
  • mode: "thinking" - multi-stage recall with query expansion and reranking. Better results, higher latency. Default is "fast".
  • graph_context: true - enriches results with entity relationships from the knowledge graph. Only applies to full_recall.
Sample response (full_recall):
relevancy_score: A metric to evaluate each chunk’s relevance to the query. Ranges from 0.0 to 2.0.
chunks is retrieved content ranked by relevance. graph_context contains entity relationships extracted from your data - useful for reasoning about how things connect, not just what was said.
5

Step 5 - Pass it to your LLM

For personalized, grounded answers, call both full_recall and recall_preferences in parallel and merge the results into one prompt:
For the build_context_string() helper, see How to Use API Results.

You’re done

That’s the full loop: create a tenant, ingest Knowledge and Memories, wait for processing, recall context, feed it to an LLM. Everything else in HydraDB - metadata filters, sub-tenants, graph traversal, personalization - builds on this foundation. Where to go next: Stuck? Reach out at [email protected].