A short overview of each primitive, with links to deeper Concepts pages.
The mental model
To create a unified context substrate, a company brain, for your AI you need context & personalization combined with the right scopes.Memories
Memories are user-scoped preferences, conversation history, and inferred behavioral traits. They ensure retrieval is personalized to the person asking, not just the query itself. The same person querying “Project Acme changelog” might expect different results than a colleague working on the same project but with a different title. If they have previously engaged with backend architecture decisions over release notes, or flagged interest in a specific workstream, HydraDB helps you factor that in. Memories are not set once at onboarding. They compound with every interaction, so your agent becomes more accurate and feels more familiar to the end user over time. When you ingest a memory withinfer: true, HydraDB extracts the underlying preference. You can ship raw behavioral logs (interaction events, UI actions, dialogue), and HydraDB derives the structured insight.
When you ingest a memory with infer: false (the default), HydraDB stores exactly what you send - useful for deterministic facts you’ve already captured.
Memories are retrieved by calling POST /query with type: "memory".
Read More: Usage → Memories
Knowledge
Knowledge in HydraDB represents the entire working context you want your agents to access: PDFs, DOCX, Markdown, Slack threads, Notion pages, CSVs, emails. HydraDB parses, relates, and stores each source into the graph. At query time, the graph traversal step surfaces structurally connected materials that vanilla query alone would miss. Knowledge is retrieved by callingPOST /query with type: "knowledge". Combine memories and knowledge in one call with type: "all".
Read More: Usage → Knowledge
Why are memories & knowledge separate
Memories and Knowledge are distinct at the storage layer, not just conceptually:
For personalized answers grounded in shared documents, call
POST /query with type: "all" to merge both stores in a single request. See How to Use API Results.
Query
Query is how agents read from HydraDB. Storing data is easy; knowing what to retrieve, when, and why is the hard part. HydraDB’s query is a multi-stage pipeline that combines metadata filtering, semantic and keyword retrieval, and context-graph traversal - all in a single API call. Vector search asks “what’s similar to my query?” Graph traversal asks “What’s structurally connected to it?” HydraDB does both, then weights the results by usefulness for the current task. One endpoint -POST /query - covers Knowledge, Memories, or both, tuned by query_by (hybrid / text), mode (thinking / fast), and graph_context.
Read More: Usage → Query
Databases and Collections
A Database is a completely isolated workspace. No database can read another database’s data. In most cases, each organization is represented by its own database. A collection is a logical partition within a database - a user, team, project, or department.- B2B - each customer is a database; their departments are collections
- B2C - one database for the organization; each end user is a collection
In API requests, a database is set with the
database field (formerly tenant_id) and a collection with the collection field (formerly sub_tenant_id). The old names still work as deprecated aliases, so existing code keeps running unchanged.Metadata
Metadata makes querying deterministic. Sometimes production systems need hard filters: “only Engineering docs,” “only approved policies,” “only refund policies.” Two tiers:metadata- filterable fields defined in the database schema. Plan these fields before ingestion and pass them throughmetadata_filtersat query time.additional_metadata- free-form fields attached per document at ingestion. Flexible. Useful for passing additional context to your agents if needed.
What’s next
- Architecture Overview - how the graph, vector store, and ranking layers fit together
- Quickstart - build your first integration in five minutes
- Concepts - deeper coverage of every concept on this page