agenticx-memory-architect
Skill6 starsChanged 3 months agoMITView on GitHub
Guide for setting up and using the AgenticX memory system including Mem0 integration, long-term memory, context management, and memory-enhanced agents. Use when the user wants to add memory to agents, persist conversation history, build memory-aware workflows, or integrate with Mem0 for long-term recall.
- Installs packages
Files
AgenticX Memory Architect
Guide for building agents with persistent memory capabilities.
Overview
AgenticX integrates with Mem0 for long-term memory, providing agents with the ability to remember past interactions, learn from experience, and maintain context across sessions.
Installation
pip install "agenticx[memory]"
# Includes: mem0, chromadb, qdrant-client, redis, milvusMemory System Components
| Component | Purpose |
MemoryManager | Core memory management interface |
Mem0Integration | Bridge to Mem0's memory engine |
ContextMemory | Short-term, session-scoped memory |
LongTermMemory | Persistent, cross-session memory |
Basic Memory Usage
Initialize Memory
from agenticx.memory import MemoryManager
memory = MemoryManager(
provider="mem0",
config={
"llm": {"provider": "openai", "config": {"model": "gpt-4"}},
"vector_store": {"provider": "chroma"}
}
)Store and Retrieve
# Add a memory
memory.add(
content="User prefers concise reports with bullet points",
user_id="user-123",
agent_id="analyst"
)
# Search memories
results = memory.search(
query="What format does the user prefer?",
user_id="user-123"
)
for r in results:
print(f"[{r.score:.2f}] {r.content}")
# Get all memories for a user
all_memories = memory.get_all(user_id="user-123")Memory-Enhanced Agents
Attach Memory to an Agent
from agenticx import Agent, AgentExecutor
from agenticx.memory import MemoryManager
from agenticx.llms import OpenAIProvider
memory = MemoryManager(provider="mem0")
agent = Agent(
id="assistant",
name="Personal Assistant",
role="Assistant with memory",
goal="Help users while remembering their preferences",
organization_id="default"
)
executor = AgentExecutor(
agent=agent,
llm=OpenAIProvider(model="gpt-4"),
memory=memory
)
# First interaction — learns preference
result = executor.run(task_1)
# Later interaction — recalls preference
result = executor.run(task_2) # agent remembers context from task_1Memory Extraction
AgenticX can automatically extract memorable facts from conversations:
from agenticx.core.memory_extraction import MemoryExtractor
extractor = MemoryExtractor(llm=llm)
facts = extractor.extract(conversation_history)
# facts: ["User is a data scientist", "Prefers Python over R", ...]
for fact in facts:
memory.add(content=fact, user_id="user-123")Vector Store Backends
| Backend | Config key | Best for |
| ChromaDB | "chroma" | Local development, small scale |
| Qdrant | "qdrant" | Production, high performance |
| Redis | "redis" | Fast access, ephemeral |
| Milvus | "milvus" | Large scale, distributed |
# Qdrant example
memory = MemoryManager(
provider="mem0",
config={
"vector_store": {
"provider": "qdrant",
"config": {"host": "localhost", "port": 6333}
}
}
)Healthcare Example
# Medical knowledge memory
memory.add(
content="Patient has Type 2 diabetes, diagnosed 2023",
user_id="patient-456",
metadata={"category": "medical_history"}
)
# Query with context
results = memory.search(
query="What chronic conditions does the patient have?",
user_id="patient-456"
)CLI Memory Operations
# Run the memory example
python examples/memory_example.py
# Healthcare scenario
python examples/mem0_healthcare_example.pyBest Practices
- Scope memories — always associate with
user_idand/oragent_id - Dedup — check for similar memories before adding
- TTL — set expiration for time-sensitive information
- Privacy — never store PII without consent; use data isolation
- Vector store selection — ChromaDB for dev, Qdrant/Milvus for production
- Memory extraction — automate fact extraction from conversations
- Test retrieval — verify that stored memories are actually retrievable
In this repository346 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/skills/deeppapernote/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .claude/skills/deeppapernote/CLAUDE.mdCLAUDE.md
- docs/llms-full.txtllms.txt
- docs/llms.txtllms.txt
- llms.txtllms.txt
- academic-cv-builderSkill
- agenticx-a2a-connectorSkill
- agenticx-agent-builderSkill
- agenticx-automation-crontaskSkill
- agenticx-deployerSkill
- agenticx-quickstartSkill
- agenticx-skill-managerSkill
- agenticx-tool-creatorSkill
- agenticx-workflow-designerSkill
- ai-slop-detectorSkill
- alert-managerSkill
- algorithmic-artSkill
- api-gatewaySkill
- backlink-analyzerSkill
- brand-guidelinesSkill
- canvas-designSkill
- career-changer-translatorSkill
- Codex-apiSkill
- Codex-skill-rustSkill
- claw-releaseSkill
- clawsec-clawhub-checkerSkill
- clawsec-feedSkill
- clawsec-nanoclawSkill
- clawsec-scannerSkill
- clawsec-suiteSkill
- clawtributorSkill
- cn-statsSkill
- codebase-documenterSkill
- code-dev-workflowSkill
- competitor-analysisSkill
- content-experimentation-best-practicesSkill
- content-gap-analysisSkill
- content-modeling-best-practicesSkill
- content-quality-auditorSkill
- content-refresherSkill
- context-mode-opsSkill
- context-modeSkill
- cover-letter-generatorSkill
- creative-portfolio-resumeSkill
- crypto-reportSkill
- ctx-doctorSkill
- ctx-insightSkill
- ctx-purgeSkill
- ctx-statsSkill
- ctx-upgradeSkill
- deep-cleanSkill
- doc-coauthoringSkill
- docxSkill
- domain-authority-auditorSkill
- edgeoneSkill
- edge-ttsSkill
- entity-optimizerSkill
- executive-resume-writerSkill
- The first 60 shown.
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.

