OpenAI integration

Change one URL.
Your agent remembers everything.

Already calling the OpenAI API? Then you're about 30 seconds from giving your agent a memory. Hebbrix speaks the same format, so the SDK, the types, and the streaming all stay exactly where they are. Your agent just stops forgetting everything the second a session ends.

$pip install openai hebbrix
spot the difference

Two lines. That's it.

Hint: base_url and api_key. Everything else stays exactly the same.

Before

without_memory.py
import openai

client = openai.OpenAI()
# No base_url → goes straight to OpenAI
# Your agent has no memory of past sessions

response = client.chat.completions.create(
    model="gpt-5-nano",
    messages=[{"role": "user",
               "content": "What's my name?"}]
)
# → "I don't have access to your name."
# Every session starts from zero. Again.

After

with_hebbrix.py
import openai

client = openai.OpenAI(
    base_url="https://api.hebbrix.com/v1",  # ← add
    api_key="your_hebbrix_key"            # ← add
)
# That's the whole change.

response = client.chat.completions.create(
    model="gpt-5-nano",
    messages=[{"role": "user",
               "content": "What's my name?"}]
)
# → "Your name is Alex. You told me
#    last Tuesday, discussing Acme Corp."
under the hood

What happens between your message and GPT's response

Request flow from your app through Hebbrix retrieval to the configured model and asynchronous memory ingestion
1

Your message arrives at Hebbrix

It comes in as the same JSON the OpenAI API already expects, with the same SDK methods and the same message shape. Your code has no idea anything changed, because on its side nothing did.

2

Adaptive memory retrieval selects its evidence

Dense, sparse, graph, temporal, facet, and calibrated ranking signals are combined for the request. Confidence and fallback metadata make weak evidence visible.

3

The relevant memory gets added to the request

Past preferences, earlier conversations, and related people or projects from the knowledge graph get folded into what the model sees. You never write the retrieval code yourself.

4

The fuller request goes to the configured model

Hebbrix forwards the memory-grounded request through the OpenAI-compatible surface and returns the standard response shape for supported features.

5

The exchange can become memory

When memory learning is enabled, ingestion runs off the response path, extracts durable facts, and updates temporal graph evidence without delaying the completed answer.

everything that ships

The whole memory stack, in one URL change

Versioned memory

Current truth, retained history, operational lifecycle tiers, provenance, and explicit deletion controls.

Adaptive hybrid search

Dense, sparse, graph, temporal, facet, and calibrated signals with explicit confidence metadata.

Automatic knowledge graph

Entity extraction and relationship mapping from every message. No schema to define, no pipeline to build.

Outcome Memory

Decision receipts, delayed outcomes, propensity evidence, corrections, and posterior uncertainty for agent learning.

Controlled memory lifecycle

Usage, recency, importance, temporal validity, and corrections influence retrieval without silently deleting history.

Zero migration

Same SDK, same types, same streaming. Change the URL and you're done. Ship memory this afternoon.

Hebbrix dashboard: stored memories and a knowledge graph of linked entities

Try it in 30 seconds

If you have OpenAI code running right now, you can add memory before your coffee cools. Free tier, no credit card.