continuum-memory
Skill84 starsChanged 6 months agoApache-2.0View on GitHub
Configure and use Continuum's two-tier memory system — mem0+Qdrant/Milvus for long-term facts, Redis for short-term sessions, with multi-tenant scopes (USER / AGENT / SHARED / RUN / CONVERSATION). Invoke when the user asks about "remember", "user preferences", "long-term memory", "vector search over memories", "multi-tenant isolation", "PII filtering on memory writes", "Milvus", "Qdrant", or memory-related errors.
- Reads credentials
In this repository49 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/commands/monitoring/agents.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/continuum.mdcCursor rule
- AgentDB Advanced FeaturesSkill
- AgentDB Learning PluginsSkill
- AgentDB Memory PatternsSkill
- AgentDB Performance OptimizationSkill
- AgentDB Vector SearchSkill
- browserSkill
- continuum-agentSkill
- continuum-claude-codeSkill
- continuum-codexSkill
- continuum-cursorSkill
- continuum-evaluationSkill
- continuum-handoffsSkill
- continuum-llm-providersSkill
- continuum-observabilitySkill
- continuum-quickstartSkill
- continuum-recipesSkill
- continuum-streamingSkill
- continuum-temporalSkill
- continuum-testingSkill
- continuum-tools-mcpSkill
- continuum-workflowsSkill
- github-code-reviewSkill
- github-multi-repoSkill
- github-project-managementSkill
- github-release-managementSkill
- github-workflow-automationSkill
- Hooks AutomationSkill
- Pair ProgrammingSkill
- ReasoningBank with AgentDBSkill
- ReasoningBank IntelligenceSkill
- Skill BuilderSkill
- sparc-methodologySkill
- stream-chainSkill
- swarm-advancedSkill
- Swarm OrchestrationSkill
- V3 CLI ModernizationSkill
- V3 Core ImplementationSkill
- V3 DDD ArchitectureSkill
- V3 Deep IntegrationSkill
- V3 MCP OptimizationSkill
- V3 Memory UnificationSkill
- V3 Performance OptimizationSkill
- V3 Security OverhaulSkill
- V3 Swarm CoordinationSkill
- Verification & Quality AssuranceSkill
The file
We split this skill into the rules it gives an agent
6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 25
Default is Milvus. Switch via env var:
- Very specific: line 99
Every async method has a *_sync counterpart.
- Very specific: line 212
Don't pass role= / content= to SessionClient.add_message — use ChatMessage(...).
- Very specific: line 214
Don't expect memory to work without OPENAI_API_KEY set — the default mem0 embedder is OpenAI's.
- Very specific: line 217
Don't mix the two MemoryScope types — the enum goes into AgentMemoryConfig.
- Very specific: line 219
Don't use client.reset() casually — it wipes the entire vector store.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Continuum Memory Skill
Authoritative sources: docs/memory.md and
docs/session.md.
Two layers
| Layer | Class | Backend | Purpose |
| Short-term | SessionClient | Redis (port 6380) | Conversation history this session |
| Long-term | MemoryClient | mem0 + Qdrant or Milvus | Facts extracted across sessions |
AgentRunner uses both automatically when user_id and session_id
are passed.
Vector store selection
Default is Milvus. Switch via env var:
VECTOR_STORE_PROVIDER=milvus # default — Milvus (port 19530)
VECTOR_STORE_PROVIDER=qdrant # Qdrant (port 6333)Milvus config:
MILVUS_HOST=localhost
MILVUS_PORT=19530
MILVUS_TOKEN= # for Zilliz Cloud
MILVUS_COLLECTION=orchestrator_memoriesQdrant config:
QDRANT_HOST=localhost
QDRANT_PORT=6333
QDRANT_API_KEY= # for Qdrant Cloud
QDRANT_COLLECTION=orchestrator_memoriesQuick agent setup
from continuum.agent import BaseAgent
from continuum.agent.config import AgentMemoryConfig
from continuum.agent.types import MemoryScope
agent = BaseAgent(
name="assistant",
instructions="...",
memory_config=AgentMemoryConfig(
search_memories=True,
store_memories=True,
search_scope=MemoryScope.USER, # ENUM, not the dataclass
store_scope=MemoryScope.USER,
search_limit=5,
),
)
resp = await runner.run(agent, "...", user_id="u1", session_id="s1")Direct memory access
from continuum.memory import MemoryClient
client = MemoryClient() # uses env defaults
# add (fact extraction via LLM)
await client.add(
messages=[{"role": "user", "content": "I'm vegetarian"}],
user_id="u1",
)
# semantic search
result = await client.search("dietary preferences", user_id="u1", limit=5)
for entry in result.results:
print(entry.memory)
# CRUD
entry = await client.get(memory_id)
all_entries = await client.get_all(user_id="u1")
await client.update(memory_id, "Updated text")
await client.delete(memory_id)
await client.delete_all(user_id="u1") # wipe a user's memoriesEvery async method has a *_sync counterpart.
Scopes (the two MemoryScope types — read carefully)
Agent-side enum (use here)
from continuum.agent.types import MemoryScope # str-Enum
MemoryScope.SHARED / USER / AGENT / RUN / CONVERSATION
# Pass to AgentMemoryConfigMemory-side dataclass (different!)
from continuum.memory.scopes import MemoryScope # dataclass
MemoryScope.user("u1")
MemoryScope.shared()
MemoryScope.agent("billing")
MemoryScope.run("run_abc")
# Used internally; rarely passed by user code| Scope | Visible to |
SHARED | All agents, all users |
USER | One user, all agents (default) |
AGENT | One agent, all users |
RUN | One run only — ephemeral |
CONVERSATION | One session only — scoped to session_id |
Sessions
from continuum.session import SessionClient
from continuum.llm.types import ChatMessage
client = SessionClient()
sid = await client.get_or_create_session(user_id="u1", agent_id="support")
await client.add_message(sid, ChatMessage(role="user", content="Hi")) # NOT role= kwarg
history = await client.get_conversation_history(sid)Sessions cascade to long-term memory by default
(store_in_memory=True); set False for ephemeral chats.
PII / extraction hooks
agent = BaseAgent(
name="assistant",
memory_config=AgentMemoryConfig(
store_memories=True,
pre_store_filter=lambda text: redact(text), # sanitize before mem0
on_stored=lambda items: log.info(f"stored {len(items)} memories"),
extraction_prompt="Extract preferences and facts only.",
),
)IntelligentMemoryClient (richer)
Adds importance scoring, time decay, entity memory, and user profiles.
from continuum.memory import IntelligentMemoryClient, IntelligenceConfig
client = IntelligentMemoryClient(
intelligence_config=IntelligenceConfig(
enable_entity_memory=True,
enable_user_profiles=True,
enable_scoring=True,
enable_decay=True,
prune_threshold=0.15,
),
)
profile = await client.get_user_profile("u1")
entities = await client.search_entities("Acme Corp", user_id="u1", limit=5)
removed = await client.prune(user_id="u1", threshold=0.15)Wire into the container:
from continuum.core.container import get_container
get_container().set_memory_client(IntelligentMemoryClient())Disable memory entirely
MEMORY_ENABLED=falsefrom continuum.core.container import Container, ContainerConfig
container = Container(ContainerConfig(enable_memory=False))Don't
- Don't pass
role=/content=toSessionClient.add_message— useChatMessage(...). - Don't expect memory to work without
OPENAI_API_KEYset — the default mem0 embedder is OpenAI's. Either set the key, changeEMBEDDER_PROVIDER, or disable memory. - Don't mix the two
MemoryScopetypes — the enum goes intoAgentMemoryConfig; the dataclass is internal. - Don't use
client.reset()casually — it wipes the entire vector store. Usedelete_all(user_id=...)for per-user resets.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

