MemorySync
Official SDK

Respan + MemorySync

MemorySync memory + Respan (formerly Keywords AI) gateway observability: every recall, LLM call, and persist is a first-class traced step in cost-tracked applications.

Overview

Respan routes LLM traffic through one OpenAI-compatible gateway (api.respan.ai) and turns every call into traces, spend metrics, and evals. Pair it with MemorySync: recall context before the gateway call, persist the turn after it, and instrument the memory side with opentelemetry-instrumentation-memorysync — Respan’s own tracing SDK is OpenTelemetry underneath, so memory operations appear as first-class spans next to the gateway’s LLM spans. That closes the gap Respan documents for the incumbent: their Mem0 page routes Mem0’s internal LLM calls through the gateway, but the memory operations themselves — the add, the search — are invisible as spans, and their docs state verbatim that "Mem0 doesn’t expose its own SDK-level tracing instrumentor." MemorySync does — it is the first memory vendor that ships one. The result: cost-optimized, fully tracked applications where a slow recall, a failed persist, or a memory quota event is visible in the same waterfall as the model call it affected.

Setup status and requirements

Supported version
opentelemetry-instrumentation-memorysync 1.0.0 (PyPI)
Last setup review
2026-08-25
Permissions
A MemorySync API key; a Respan API key for the gateway and dashboard.
Limits
Python 3.9+. The gateway pattern works with any OpenAI-compatible SDK; Respan was formerly Keywords AI and old keywordsai.co URLs redirect.
Open setup documentation →

Capabilities

Quick Start

from openai import OpenAI
from memorysync import MemorySyncClient
from opentelemetry.instrumentation.memorysync import instrument_memorysync
instrument_memorysync()
ms = MemorySyncClient(api_key="ms_...", base_url="https://api.memorysync.io")
llm = OpenAI(api_key=RESPAN_API_KEY, base_url="https://api.respan.ai/api/")
ctx = ms.recall(tenant_id=t, user_id=u, prompt=question, k=6) # traced
reply = llm.chat.completions.create(model="gpt-4.1-nano", messages=[
{"role": "system", "content": f"Memory:\n{ctx.get('context', '')}"},
{"role": "user", "content": question},
]) # gateway-traced
ms.add_turn(tenant_id=t, user_id=u, text=f"user: {question}") # traced

Use Cases

Cost-tracked LLM applications with per-user memory

One waterfall showing recall latency next to model latency

Migrating from Keywords AI setups to Respan with memory intact

Explore More

Built for production AI systems

Build AI systems that remember

MemorySync provides the infrastructure layer for persistent memory, adaptive retrieval, and enterprise AI intelligence.

Start free. No credit card required.