Skip to main content

Installation

Client setup

Python: Both synchronous (HydraDB) and asynchronous (AsyncHydraDB) clients are available. They share an identical surface – choose based on your application’s concurrency model.

Naming conventions

The REST API uses snake_case for all request and response fields. The SDKs adapt this to native idioms:
TypeScript SDK uses snake_case for all parameter field names. Only method names are camelCase (e.g., client.recall.fullRecall({tenant_id: "...", max_results: 5})). This applies to every request object passed to an SDK method.
The TypeScript SDK transparently maps camelCase parameters to snake_case on the wire. You can rely on your IDE’s autocomplete and type checking – if a field is optional in the API, it’s optional in the SDK.

SDK method structure

SDK methods are grouped by capability, not by URL path. The mapping is mostly intuitive but a few groups span multiple URL prefixes: Additional clients available: client.key for API key management, client.ingestionPipeline for pipeline operations, client.graphHealth for health checks, and client.metrics for metrics, client.passthrough for passthrough operations.

Method reference

Method names map to the URL by removing the leading slash and replacing path separators:

Tenants

Ingestion + Memories (under upload)

Recall

List + Fetch (under fetch)

Knowledge Deletion

In Python, all method names use snake_case: client.tenant.get_infra_status(), client.recall.full_recall(), etc.

Additional clients

Getting started

Create a tenant

A tenant is an isolated workspace. Most organizations create one tenant total, with sub-tenants for users or teams. See Multi-Tenant for the full model.
Tenant creation is asynchronous. Poll getInfraStatus until provisioning completes:

Ingest knowledge

Upload documents, app sources, or both via upload.knowledge:
For full options including app sources and forceful relations, see Upload knowledge.

Add user memories

Store user preferences and conversation history via upload.addMemory:
infer defaults to false. Set infer: true for conversational content where you want HydraDB to extract implicit preferences. Use infer: false for content that should be stored verbatim.

Recall

Three retrieval modes for different use cases:
For full parameter documentation, see Recall.

Browse and inspect

Type safety

Both SDKs are fully typed:
  • Autocomplete for all method names and parameters
  • Type checking for request and response objects
  • Inline documentation for each parameter
  • Compile-time validation for required vs optional fields
The SDKs provide exact type parity with the API specification:
  • Request parameters – every field documented in the API reference is reflected in method signatures
  • Response objects – return types match the JSON schema for each endpoint
  • Error types – exception structures mirror error response formats
  • Nested objects – complex parameters and responses keep their full structure

Error handling

Both SDKs throw exceptions for non-2xx responses. Error objects expose the API’s detail payload:
For the full list of error codes and retry patterns, see Error Responses.

IDE-driven discovery

Whether you’re using TypeScript, Python, VS Code, PyCharm, or any modern IDE, the workflow is the same:
  1. Type the method name → see all available methods
  2. Open the parentheses → see all required and optional parameters
  3. Press Cmd+Space (macOS) or Ctrl+Space (Windows/Linux) → get inline documentation
This works because the SDKs are fully typed with comprehensive parameter docs.