Skip to content

Overview

An OpenAI-compatible gateway with persistent memory, personas, and model routing built in.

Updated View as Markdown

The AI Gateway sits between your application and LLM providers. It exposes the same /v1/chat/completions endpoint every OpenAI SDK already knows — and layers persistent memory, personas, tool-call routing, and observability on top, so your app doesn’t have to build them.

Base URL and placeholders

Truememory is deployed per environment, so examples across these docs use the placeholder https://your-tie-host — replace it with your instance’s gateway URL (ask whoever operates your deployment; for the Mindvalley staging environment this is provided with your credentials). “TIE” is the platform’s internal codename — you’ll see it in the placeholder and in a few wire-level names (tie.bearer); it’s the same product.

Two credentials appear in examples: $TOKEN (a user’s Bearer token from Truememory Auth) and $AUTH_SECRET (the backend service-account secret).

Features

  • OpenAI-compatible — Drop-in replacement for OpenAI, Cloudflare AI Gateway, or LiteLLM
  • Custom prompt mode — Send your own system or developer message to override the agent’s built-in prompt while keeping memory and personas
  • Memory — Persistent user memory via Graphiti knowledge graph, injected automatically
  • Personas — Custom system prompts per user, injected automatically
  • Client tool calling — Pass tool definitions per-request, Truememory routes tool_calls back for execution
  • Internal tools — Memory search/write execute server-side, invisible to the client
  • Thread persistence — Maintain conversation state across requests
  • Audio — Speech-to-text and text-to-speech via OpenAI-compatible endpoints
  • Image Generation — Generate images via OpenAI-compatible /v1/images/generations with OpenAI and Google Gemini image models
  • Observability — All requests traced via Langfuse
  • Multi-agent — Select different agents via X-Agent-Id header

Supported providers

  • Anthropic (via Vertex AI) — Claude Haiku 4.5, Claude Sonnet 4.5, Claude Sonnet 4.6, Claude Opus 4.5, Claude Opus 4.6
  • OpenAI — GPT-5 Nano, GPT-5 Mini, GPT-5.1
  • Google Vertex AI — Gemini 2.5 Flash, Gemini 2.5 Flash Lite, Gemini 2.5 Pro, Gemini 3 Flash (preview), Gemini 3.1 Pro (preview)
  • Z.AI — the GLM family (GLM-4.x, GLM-5.x)

Query GET /info on your instance to see which models are currently available — it returns the exact wire IDs. Browse them with runnable examples in the model catalog.

Model ID formats

The model value is provider-prefixed, and the prefix depends on the endpoint:

Endpoint Anthropic OpenAI Google Z.AI
/v1/chat/completions anthropic/claude-sonnet-4-6 openai/gpt-5.1 vertexai/gemini-2.5-flash zai/glm-4.7
/v1/audio/*, /v1/images/* — bare IDs accepted (whisper-1, gpt-4o-mini-tts) google/gemini-2.5-flash-tts, google/gemini-2.5-flash-image —

Yes, Google appears as vertexai/ on chat and google/ on media endpoints — copy the prefix from the endpoint’s own docs when in doubt.

Where to start

Page Description
Unified API Send messages via the OpenAI-compatible /v1/chat/completions endpoint
Agents Multi-agent routing, agent selection, and the X-Agent-Id header
Memory Persistent memory, context prefetch, and memory management
Personas Custom system prompts per user — create, activate, and manage
Navigation

Type to search…

↑↓ navigate↵ selectEsc close