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.
Capabilities
- Memory operations as first-class spans next to Respan gateway LLM spans
- Closes the incumbent gap: Respan documents Mem0 memory ops as un-traceable
- One gateway for routing + spend tracking; one line for memory tracing
- OpenTelemetry end to end — Respan’s tracing SDK and ours share the pipeline
- Privacy-first: memory content never recorded unless opted in, then truncated
- Recall-before / persist-after pattern documented with runnable code
- Failure visibility: error spans with HTTP status and error type
- Works identically if you later swap gateways — nothing is Respan-locked
Quick Start
from openai import OpenAIfrom memorysync import MemorySyncClientfrom opentelemetry.instrumentation.memorysync import instrument_memorysyncinstrument_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) # tracedreply = llm.chat.completions.create(model="gpt-4.1-nano", messages=[{"role": "system", "content": f"Memory:\n{ctx.get('context', '')}"},{"role": "user", "content": question},]) # gateway-tracedms.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.