AgentOps memory
Memory operations as first-class spans in AgentOps: the first SDK-level tracing instrumentor from any memory vendor, wired through standard OpenTelemetry.
Overview
opentelemetry-instrumentation-memorysync makes 23 MemorySync operations — the 14 memory operations (adds, turns, recalls, queries, forgets and more) plus the 9 conversation-history and framework-state methods — first-class spans in AgentOps traces. agentops.init() registers AgentOps as the global OpenTelemetry tracer provider, so one instrument_memorysync() call is the whole integration; the standard BaseInstrumentor entry point also works with the opentelemetry-instrument CLI for zero-code setups. Spans carry operation, sync/async client kind, result counts, score aggregates, idempotency signals, the role and extraction receipt of each add_turn (processing_status, request_id, already_exists), and error classifications — and, unlike the incumbent’s instrumentation, memory CONTENT is never recorded unless you opt in (and then truncated): the in-tree Mem0 wrapper dumps full memory text into span attributes and — via leftover debug print() calls — onto stdout on every add and search. Full sync/async parity across both MemorySync clients (the Mem0 wrapper skips history on cloud clients), guaranteed pass-through (results and exceptions are untouched; a broken attribute extractor can never fail your call), and a seam test pins the AgentOps global-provider contract on every push. Zep, Supermemory, and Letta have no AgentOps story at all.
Setup status and requirements
- Supported version
- opentelemetry-instrumentation-memorysync 1.1.0 (PyPI)
- Last setup review
- 2026-09-01
- Permissions
- A MemorySync API key; an AgentOps API key for the AgentOps dashboard.
- Limits
- Python 3.9+. Works with any OpenTelemetry backend — AgentOps is one init() away. The history and state spans need the memorysync SDK 1.10 or later.
Capabilities
- The FIRST SDK-level tracing instrumentor from any memory vendor
- One line: instrument_memorysync() after agentops.init() — order independent
- Standard OTel BaseInstrumentor + entry point — works with opentelemetry-instrument
- Privacy-first: memory content is NEVER recorded unless explicitly opted in
- Zero stdout pollution — the incumbent’s wrapper print()s memory content
- Full sync/async parity across 23 operations, history and state included
- Instrumentation can never break the app — guaranteed pass-through
- Duration histogram per operation for latency dashboards
Quick Start
import agentopsfrom opentelemetry.instrumentation.memorysync import instrument_memorysyncfrom memorysync import MemorySyncClientagentops.init()instrument_memorysync()client = MemorySyncClient(api_key="ms_...", base_url="https://api.memorysync.io")client.add("Prefers window seats", source="chat") # span: memorysync.addclient.query("seating preferences", k=5) # span: memorysync.query
Use Cases
Debugging why an agent recalled (or missed) a memory
Latency dashboards for memory operations alongside LLM calls
Compliance-friendly observability without exposing memory content
Guides and related pages
Related integrations
Explore More
Trace your memory calls in AgentOps
Start free with 10,000 add requests a month and no credit card. Memory is stored per end user and comes back in every later session.
