Understand how Jarvis agents remember context across conversations using three complementary memory layers: Qdrant, Neo4j, and Mem0.
Jarvis agents don’t start from scratch on every task. The RAG (Retrieval-Augmented Generation) memory system gives agents access to context from past conversations, stored documents, and structured knowledge — automatically, without any configuration on your part.The memory system has three layers, each optimized for a different kind of recall.
MCP tools
Use jarvis.memory.search and jarvis.memory.store to interact with memory directly.
Agent overview
See how Paperclip and Hermes use memory during multi-step tasks.
Qdrant is the vector store. It stores documents and conversation chunks as high-dimensional embeddings, enabling semantic search — finding content by meaning rather than exact keyword match.What it stores:
Tool outputs that agents flag as worth remembering
When it’s used:
Qdrant is queried any time an agent needs to recall something that was discussed before or find relevant background information. If you ask “what did we decide about the monitoring stack last week?”, the agent searches Qdrant for semantically similar content.Query Qdrant directly:
{ "results": [ { "score": 0.91, "text": "Decided to use Prometheus + Grafana on ai-max. Retention set to 30 days.", "source": "conversation", "timestamp": "2025-03-15T14:22:00Z" } ]}
Store a document in Qdrant:
curl -X POST https://your-jarvis-host/api/memory/store \ -H "Content-Type: application/json" \ -d '{ "layer": "qdrant", "content": "The Prometheus scrape interval is set to 15s for all mesh nodes.", "metadata": { "topic": "monitoring", "source": "runbook" } }'
Neo4j is the graph database. It stores entities and relationships — things like nodes, services, agents, and how they connect to each other.What it stores:
Infrastructure topology (which services run on which nodes)
Agent relationships and delegation chains
Causal links between events (“disk alert on jarvis-brain led to container restart”)
Knowledge graph entries built from past task outputs
When it’s used:
Neo4j is queried when context depends on relationships, not just similarity. If an agent needs to know which services are affected by a node going offline, or trace the history of a particular service across multiple incidents, it queries the graph.Query Neo4j directly:
Mem0 is the persistent memory layer. It stores facts, preferences, and conclusions that should be remembered indefinitely — things that don’t expire and shouldn’t need to be re-discovered.What it stores:
User preferences and working style notes
Standing decisions (“always create incidents in ServiceNow for P1 alerts”)
Agent-learned patterns (“the user prefers concise summaries over full reports”)
Named facts you’ve explicitly asked agents to remember
When it’s used:
Mem0 is read at the start of every agent session to prime the agent with context about you and your environment. It’s also written any time you or an agent explicitly stores a fact for later.Query Mem0 directly:
curl -X POST https://your-jarvis-host/api/memory/search \ -H "Content-Type: application/json" \ -d '{ "layer": "mem0", "query": "user preferences for incident reporting" }'
Response:
{ "results": [ { "fact": "User prefers P1 and P2 incidents to be filed automatically without confirmation.", "confidence": 0.97, "created_at": "2025-02-10T09:00:00Z" } ]}
Store a fact in Mem0:
curl -X POST https://your-jarvis-host/api/memory/store \ -H "Content-Type: application/json" \ -d '{ "layer": "mem0", "fact": "Default deployment target is ai-mini-x1 unless the task requires GPU.", "tags": ["deployment", "preferences"] }'
From inside an agent session, you can ask the agent to search memory directly:
“Search memory for everything we discussed about the Prometheus setup.”
The agent invokes jarvis.memory.search across all layers and returns a synthesized summary of what it finds. You can also ask it to store something explicitly:
“Remember that the scrape interval on ai-max should never be changed without a maintenance window.”
The agent writes this to Mem0 with appropriate tags so future sessions can retrieve it.