CAMEL-AI + MemorySync
A lossless storage backend plus a drop-in AgentMemory: verbatim history, scored semantic recall under a hard budget, and zero client-side embeddings.
Overview
Install camel-memorysync and pass MemorySyncMemory(user_id=..., session_id=...) to ChatAgent — verbatim chat history plus semantic recall from MemorySync, injected as one scored SYSTEM-role context record that CAMEL’s ScoreBasedContextCreator sorts directly after the system prompt. Your history is never reordered, rewritten, or role-swapped: the in-repo Mem0Storage returns extracted facts instead of your messages with every record hardcoded role=USER (breaking OpenAI’s alternation), and its clear() calls client.delete_users() — resetting a chat destroys the whole account. Here clear() resets the local window only, and remote deletion is explicit and loud: forget_session() and forget_user(), scoped to camel-surface rows so memories from other MemorySync surfaces survive. Recall runs under a hard 1.2s budget and fails open to history-only context, an anti-echo filter keeps the live conversation from coming back as “memories”, multimodal image payloads round-trip intact, and deterministic seeds make retried saves converge. Unlike VectorDBMemory there are zero client-side embeddings — no OpenAIEmbedding key, no vector database to operate.
Setup status and requirements
- Supported version
- camel-memorysync 1.0.0 (PyPI)
- Last setup review
- 2026-08-24
- Permissions
- A MemorySync API key with read and write scopes.
- Limits
- Requires camel-ai 0.2.60+ (Python 3.10–3.14). Pins mcp<2 — camel-ai 0.2.x crashes at import under mcp 2.0.
Capabilities
- Byte-exact history round-trip — roles, uuids, and images preserved
- One scored recall record after the system prompt — history never touched
- Anti-echo filter — the live turn never returns as a “memory”
- clear() is local-only; forget_session()/forget_user() are explicit and loud
- Zero client-side embeddings — recall is one MemorySync query
- Hard 1.2s recall budget; fails open to history-only context
- Cross-surface recall — memories from LangChain, the CLI, voice agents work here
- Deterministic idempotency seeds — retried saves converge
Quick Start
from camel.agents import ChatAgentfrom camel_memorysync import MemorySyncMemorymemory = MemorySyncMemory(user_id="customer-42", # requiredsession_id="support",)agent = ChatAgent(system_message="You are a helpful travel assistant.",memory=memory,)agent.step("I always prefer window seats on long flights")# a new session, days later:agent.step("which seat should I book for the Oslo flight?") # remembers
Use Cases
Multi-agent CAMEL societies with per-user long-term memory
Replacing the history-corrupting in-repo Mem0Storage
Long-term memory without operating a vector DB or embedding pipeline
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.