Memory Router (LLM Proxy) — Epitome Docs

Memory Router (LLM Proxy)

Add Epitome memory to existing OpenAI or Anthropic apps by routing model calls through Epitome.

What It Is

Memory Router is an HTTP proxy layer in front of supported LLM APIs. It retrieves relevant context before model calls and saves conversation turns asynchronously after responses.

v1 supports OpenAI chat completions and Anthropic messages. It is designed for fast adoption: change base URL + headers, keep the rest of your app flow.

Enable It

  1. Open Settings → Memory Router in the dashboard.
  2. Toggle Enable Memory Router.
  3. Set a default collection (for example memories or journal).

OpenAI Quickstart

Use your Epitome key in X-API-Key and your OpenAI key in Authorization.

bash
curl -X POST "https://epitome.fyi/v1/memory-router/openai/v1/chat/completions" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: epi_live_your_epitome_key" \
  -H "Authorization: Bearer sk-your-openai-key" \
  -d '{
    "model": "gpt-4o-mini",
    "messages": [
      {"role": "user", "content": "What do you know about my project priorities?"}
    ]
  }'

Anthropic Quickstart

For Anthropic, pass provider auth via x-anthropic-api-key.

bash
curl -X POST "https://epitome.fyi/v1/memory-router/anthropic/v1/messages" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: epi_live_your_epitome_key" \
  -H "x-anthropic-api-key: sk-ant-your-anthropic-key" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "claude-3-5-sonnet-latest",
    "max_tokens": 512,
    "messages": [
      {"role": "user", "content": "Summarize what you already know about me."}
    ]
  }'

Router Headers

Optional headers for controlling memory behavior per request:

text
x-epitome-memory-mode: auto | off
x-epitome-memory-collection: <collection-name>
x-epitome-idempotency-key: <unique-key>
  • auto (default): retrieve + inject context, then async save.
  • off: raw proxy pass-through (no retrieval, no save).

Verify It Works

  1. Enable Memory Router in Settings.
  2. Send a request that includes personal/project facts.
  3. Send a follow-up query that depends on prior context.
  4. Check Memories and Activity pages for write + audit entries.

Troubleshooting

  • 403 FEATURE_DISABLED: Enable Memory Router in Settings.
  • 403 CONSENT_DENIED: Grant profile/vectors permissions for the calling agent.
  • 400 MISSING_PROVIDER_AUTH: Missing provider key/header for the selected provider.
  • 413 PAYLOAD_TOO_LARGE: Request payload exceeds max proxy size.