Integrations

Memory Router

Memory for any compatible chat client with no code changes.

llms.txt

Point any OpenAI compatible client at MenteDB and every conversation gets memory, with no code changes in the client. The router forwards your request to the provider with your key untouched, injects recalled context into the system slot before the model responds, and captures the turn after the response so the client never waits on memory. Your provider key is never stored and never logged.

Setup

Swap the base URL to https://proxy.mentedb.com/v1 and add one header. The client must be able to send a custom header alongside its API key. OpenAI compatible clients use /v1/chat/completions; Anthropic clients use the native /v1/messages.

AuthorizationYour provider key, exactly as the client already sends it. Forwarded byte for byte.
x-mentedb-keyYour MenteDB API key (mdb_...). Required; this is the only MenteDB credential involved.
x-mentedb-userOptional. Any stable string per end user; memories partition by it.
x-mentedb-agentOptional. Any stable string per assistant or agent.
x-mentedb-conversation-idOptional. Scopes the warm context cache per conversation.

With the OpenAI SDK

Python
from openai import OpenAI

client = OpenAI(
    base_url="https://proxy.mentedb.com/v1",
    api_key=os.environ["OPENAI_API_KEY"],   # your provider key, passed through
    default_headers={
        "x-mentedb-key": os.environ["MENTEDB_API_KEY"],
        "x-mentedb-user": "alice",
    },
)

# Turn one states a fact; a brand new session later recalls it.
client.chat.completions.create(model="gpt-5.2",
    messages=[{"role": "user", "content": "My API budget is $200 a month."}])

Or plain curl

Terminal
curl https://proxy.mentedb.com/v1/chat/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "x-mentedb-key: $MENTEDB_API_KEY" \
  -H "x-mentedb-user: alice" \
  -H "content-type: application/json" \
  -d '{"model": "gpt-5.2", "messages": [{"role": "user", "content": "What is my API budget?"}]}'

Anthropic clients

The router speaks the Messages API natively: system stays a top level field, streaming uses Anthropic's event family, and your x-api-key passes through untouched.

Terminal
curl https://proxy.mentedb.com/v1/messages \
  -H "x-api-key: $ANTHROPIC_API_KEY" \
  -H "x-mentedb-key: $MENTEDB_API_KEY" \
  -H "content-type: application/json" \
  -d '{"model": "claude-sonnet-5-5", "max_tokens": 512,
       "messages": [{"role": "user", "content": "What is my API budget?"}]}'

What happens on each turn

Recalled memories arrive inside a delimited <memory context from MenteDB> block appended to your system message (one is created if the request has none). Streaming and tool calls pass through unchanged. After the response, the turn runs through the same process_turn pipeline as every other integration, so extraction, contradiction handling, and plan limits apply unchanged. Steady state adds a cache read per request; only the first turn of a partition does inline recall. Client specific setup guides land as we verify each one during the beta. Codex support is in development: Codex now requires the Responses API for every provider, which is the router's next milestone.

Limits and billing

The router is included on every plan. Each proxied conversation turn counts as one memory turn against your plan's monthly limit (1,000 on Free, 10,000 on Starter), exactly like turns from any other integration. Model tokens are billed by your provider through your own key; MenteDB never marks them up and never sees your provider account.