Three lines of code. Persistent AI memory.
Store a memory. Search for it later. That's the API. Behind those two calls, Under the hood: 3-tier cognitive memory, 5-layer hybrid search, automatic knowledge graphs, and self-improving retrieval. You focus on your agent.
Two ways to add memory
Full control over when and how memory is stored and searched.
from hebbrix import Hebbrix
hebbrix = Hebbrix() # Uses HEBBRIX_API_KEY env var
# Store a memory
hebbrix.memories.create(
content="User prefers dark mode and concise responses"
)
# Search memories
results = hebbrix.search("user preferences")
# That's it. Knowledge graph, 5-layer search,
# and auto-learning happen behind the scenes.Swap your base URL. Memory search and injection is automatic.
import openai
# Drop-in OpenAI replacement with memory
client = openai.OpenAI(
base_url="https://api.hebbrix.com/v1",
api_key="your_hebbrix_key"
)
response = client.chat.completions.create(
model="gpt-4",
messages=[{"role": "user", "content": "What do I prefer?"}]
)
# Hebbrix auto-searches relevant memories
# and injects them before forwarding to the LLMWhat you get out of the box
Every feature works automatically. No configuration, no pipelines to build.
3-tier cognitive memory
Short-term, medium-term, long-term. Memories promote based on usage and decay based on the Ebbinghaus forgetting curve.
5-layer hybrid search
Semantic vectors + BM25 + knowledge graph + importance + recency. All in under 50ms. One API call.
Automatic knowledge graph
Store natural text. Entities and relationships are extracted and mapped automatically. Zero schema definition.
Self-improving retrieval
6 automatic RL quality checks after every interaction. Good memories get reinforced. Noisy ones fade.
Collections & multi-tenancy
Isolate memories per user, team, or project. Flexible scoping that maps to your application's data model.
Natural memory decay
Old irrelevant memories don't clutter retrieval. The forgetting curve keeps your agent's context clean.
Built for developer experience
Python & TypeScript SDKs
Type-safe clients with async support
OpenAI-compatible API
Swap your base URL, keep your code
REST API
Works with any language or framework
Webhooks
Get notified on memory events
MCP integration
Works with Claude, Cline, and more
No-code connectors
Zapier and n8n integrations
Free tier
Generous limits to build and test
Full docs
Guides, reference, and examples
Start building in 5 minutes
Free tier. No credit card. Just pip install and go.
