Agent skill

agenticx-memory-architect

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.

Stars 106
Forks 12

Install this agent skill to your Project

npx add-skill https://github.com/DemonDamon/AgenticX/tree/main/agenticx/skills/agenticx-memory-architect

Metadata

Additional technical details for this skill

author
AgenticX
version
0.3.6

SKILL.md

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

bash
pip install "agenticx[memory]"
# Includes: mem0, chromadb, qdrant-client, redis, milvus

Memory 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

python
from agenticx.memory import MemoryManager

memory = MemoryManager(
    provider="mem0",
    config={
        "llm": {"provider": "openai", "config": {"model": "gpt-4"}},
        "vector_store": {"provider": "chroma"}
    }
)

Store and Retrieve

python
# 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

python
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_1

Memory Extraction

AgenticX can automatically extract memorable facts from conversations:

python
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
python
# Qdrant example
memory = MemoryManager(
    provider="mem0",
    config={
        "vector_store": {
            "provider": "qdrant",
            "config": {"host": "localhost", "port": 6333}
        }
    }
)

Healthcare Example

python
# 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

bash
# Run the memory example
python examples/memory_example.py

# Healthcare scenario
python examples/mem0_healthcare_example.py

Best Practices

  1. Scope memories — always associate with user_id and/or agent_id
  2. Dedup — check for similar memories before adding
  3. TTL — set expiration for time-sensitive information
  4. Privacy — never store PII without consent; use data isolation
  5. Vector store selection — ChromaDB for dev, Qdrant/Milvus for production
  6. Memory extraction — automate fact extraction from conversations
  7. Test retrieval — verify that stored memories are actually retrievable

Expand your agent's capabilities with these related and highly-rated skills.

DemonDamon/AgenticX

agenticx-skill-manager

Guide for managing AgenticX skills including listing, searching, installing, uninstalling, publishing, and running a skill registry server. Use when the user wants to manage skills, find available skills, publish custom skills, set up a skill registry, or understand the skill ecosystem.

106 12
Explore
DemonDamon/AgenticX

agenticx-deployer

Guide for deploying AgenticX agents to production including Docker containerization, Kubernetes orchestration, Volcengine AgentKit cloud deployment, and API server setup. Use when the user wants to deploy agents, containerize applications, set up Kubernetes, configure cloud deployment, or run the AgenticX API server in production.

106 12
Explore
DemonDamon/AgenticX

agenticx-a2a-connector

Guide for using the A2A (Agent-to-Agent) communication protocol in AgenticX including agent discovery, skill invocation, remote agent cards, and distributed agent systems. Use when the user wants agents to communicate with each other, set up distributed agent systems, invoke remote agent skills, or build agent-to-agent workflows.

106 12
Explore
DemonDamon/AgenticX

agenticx-quickstart

AgenticX zero-to-hero quickstart guide. Use when the user wants to get started with AgenticX, create their first project, build their first agent, or run their first workflow. Covers installation, project scaffolding, agent creation, task execution, and CLI basics.

106 12
Explore
DemonDamon/AgenticX

agenticx-workflow-designer

Guide for designing and running AgenticX workflows including sequential pipelines, parallel execution, graph-based orchestration, conditional routing, and trigger services. Use when the user wants to create workflows, orchestrate multiple agents, design agent pipelines, or set up complex multi-step processes.

106 12
Explore
DemonDamon/AgenticX

agenticx-automation-crontask

Build and maintain Machi Desktop scheduled (cron) tasks — default workspace ~/.agenticx/crontask, schedule_task tool, execution contract, and user-facing output. Use when the user wants recurring automation, crontab-style jobs, or to author/fix automation task prompts.

106 12
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results