Search
Find relevant memories using adaptive dense and sparse retrieval, entity and graph evidence, temporal truth, facet coverage, and calibrated ranking metadata.
Round10 response corrections
Round10 removes unsupported exact-zero padding by default, without discarding low nonzero scores or supported structural witnesses. For smaller search responses, opt into include_proof_context: false alongside view: "compact": the signed proof token is omitted, required evidence/safety fields remain, and a later proof-bound decision cannot use that omitted token. Linked outcome metadata adds recent counts, latest status and a descriptive reversal warning; mixed history is not labeled all-failed. Check the live release/schema and use HTTP for new options absent from your installed SDK. Scores remain ranking signals, not truth or applicability guarantees.
How Search Works
Hebbrix uses multiple independent signals to find the most relevant memories:
- Vector Search: semantic similarity using embeddings. Understands meaning, not just keywords.
- BM25 Keyword: classic keyword matching for exact terms and names.
- Graph Traversal: finds related memories through entity relationships.
- Temporal & Calibrated Ranking: distinguishes current from superseded facts, preserves multi-intent facet coverage, and exposes whether scores are calibrated or relative.
Grounding and ranking
soft is the default: the bounded ranked candidate pool is preserved, including when verification supports only a narrower subset. Unverified candidates carry low_confidence and abstention warnings instead of being erased.strict requires supported claim evidence. off skips claim filtering, but never tenant, deletion or supersession checks. An unparsed query is retrieval-only evidence, not a verified answer. Inspect grounding,low_confidence and abstain_recommended.
Candidate retrieval and answer evidence are different. A matching allergy does not justify dropping a separate intolerance, and a person's own name does not answer a relative's name question. Inspect facet receipts where present; missing verification is not proof that a relevant constraint is absent. Search results do not certify food or medical safety.
For single-intent queries with soft or off grounding, results are ordered by displayed score. With fast omitted, soft and off request relevance-model ranking; this may add latency and returns an availability error if its required retrieval dependencies fail. Explicit fast: true opts back into the lower-latency relative-ranking policy. Compound queries preserve a complementary evidence set, which need not be globally score-sorted. Low-latency fusion scores can repeat across queries; they are not probabilities. Use fast: false for optional relevance-model ranking of narrow queries. Neither a high relevance score nor a citation proves an answer correct.
Use collection_id and user_id consistently on reads and writes.X-Hebbrix-Require-Collection: true rejects accidental account-wide calls. Outcome recall is opt-in, separately labeled caller-reported, and grants no authority to act.
Non-debug responses omit duplicated plaintext proof manifests and repeated claim text. Signed proof tokens and safety fields are unchanged. include_metadata: falseremoves per-result metadata; it does not remove the top-level evidence and scope contract. Use debug: true when expanded diagnostic detail is needed.
Reason: recalled context versus a verified decision
Reason may return verbatim, independently reviewed memory quotes with citations when typed question parsing cannot establish coverage. Quotes retain full sentence boundaries, including abbreviations. Missing evidence still requires abstention.
Inspect decision_abstained and grounding metadata, not just a non-null answer. A safety or permission question can return useful quoted context whiledecision_abstained: true explicitly withholds a decision. Stored allergies, possession or project rules are not medical advice, safety clearance or authorization to act.
Rate limits
Main search follows the account tier: Free 60, Starter 300, Pro 1,200, Scale 2,000, Enterprise 3,000 requests/minute by default. Deployment overrides and credit quotas can apply. Advanced search has its configured endpoint cap (default 20/min), graph 15/min, reason 10/min and similar-memory lookup 30/min. These endpoint caps are distinct from plan allowances. Inspect 429 responses and Retry-After; see Errors & rate limits.
Endpoints
Code Examples
Basic Search
import os
import requests
BASE = "https://api.hebbrix.com/v1"
H = {"Authorization": f"Bearer {os.environ['HEBBRIX_API_KEY']}",
"X-Hebbrix-Require-Collection": "true"}
# Adaptive hybrid search with explicit confidence and coverage metadata
r = requests.post(
f"{BASE}/search",
headers=H,
json={"query": "user preferences", "limit": 10,
"collection_id": os.environ["HEBBRIX_COLLECTION_ID"], "user_id": "end-user-123"},
timeout=30,
)
r.raise_for_status()
for hit in r.json()["results"]:
print(f"[{hit['score']:.2f}] {hit['content']}")Search with Filters
import asyncio
import os
from hebbrix import MemoryClient
async def main():
async with MemoryClient(api_key=os.environ["HEBBRIX_API_KEY"]) as client:
results = await client.search(
query="project deadlines",
collection_id=os.environ["HEBBRIX_COLLECTION_ID"],
user_id="end-user-123",
limit=20,
)
print(results)
if __name__ == "__main__":
asyncio.run(main())Find Similar Memories
# GET /v1/search/similar/{memory_id}: vector similarity search
r = requests.get(
f"{BASE}/search/similar/mem_abc123",
headers=H,
params={"limit": 5},
)
for hit in r.json()["results"]:
print(f"[{hit['score']:.2f}] {hit['content']}")cURL Examples
/v1/searchcurl -X POST "https://api.hebbrix.com/v1/search" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What are the user'\''s preferences?",
"collection_id": "YOUR_COLLECTION_ID",
"user_id": "end-user-123",
"limit": 10
}'/v1/search/reasoncurl -X POST "https://api.hebbrix.com/v1/search/reason" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "What programming languages does the user know?",
"collection_id": "YOUR_COLLECTION_ID",
"user_id": "end-user-123",
"include_steps": true
}'Search Types
| Field | Type | Description |
|---|---|---|
| hybrid | Fast (default) | General queries (default) |
| vector | Fast | Semantic/conceptual queries |
| bm25 | Fastest | Exact keyword matching |
| graph | Moderate | Entity relationships |