Hebbrix
Search API

Search

Find relevant memories using our 5-layer hybrid search system that combines semantic understanding, keyword matching, and knowledge graph traversal.

How Search Works

Hebbrix uses a multi-layer search approach 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.

Endpoints

Code Examples

Basic Search

Python
from hebbrix import Hebbrix

client = Hebbrix()

# Simple search
results = client.search("user preferences")
for result in results:
    print(f"[{result.score:.2f}] {result.content}")

Search with Filters

Python
# Search within a specific collection
results = client.search(
    query="project deadlines",
    collection_id="col_work",
    limit=20
)

# Advanced search with date range
from datetime import datetime, timedelta

results = client.search_advanced(
    query="meetings",
    date_range_start=datetime.now() - timedelta(days=7),
    boost_recent=True
)

Find Similar Memories

Python
# Get memories similar to a specific one
similar = client.search.similar(
    memory_id="mem_abc123",
    limit=5
)

for memory in similar:
    print(f"Similar: {memory.content}")

cURL Examples

POST/v1/search
curl -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?",
  "limit": 10
}'

Search Types

TypeBest ForSpeed
hybridGeneral queries (default)~50ms
vectorSemantic/conceptual queries~30ms
bm25Exact keyword matching~10ms
graphEntity relationships~100ms

Assistant

Ask me anything about Hebbrix