Install
openclaw skills install quantum-memoryQuantum-optimized memory retrieval for AI agents. Use when building agent memory systems, replacing Mem0/LangChain memory, or needing relationship-aware reca...
openclaw skills install quantum-memoryRelationship-aware memory for AI agents. Knowledge graphs + quantum-optimized subgraph selection (QAOA).
pip install quantum-memory-graph
For high-accuracy mode (needs ~2GB RAM, GPU recommended):
pip install quantum-memory-graph
# Then use model="thenlper/gte-large" — 96.6% R@5
from quantum_memory_graph import store, recall
# Store memories — automatically builds knowledge graph
store("Project Alpha uses React frontend with TypeScript.")
store("Project Alpha backend is FastAPI with PostgreSQL.")
store("FastAPI connects to PostgreSQL via SQLAlchemy ORM.")
# Recall — graph traversal + QAOA finds the optimal combination
result = recall("What is Project Alpha's full tech stack?", K=4)
for memory in result["memories"]:
print(f" {memory['text']}")
Read references/models.md for full comparison table.
all-MiniLM-L6-v2): 90MB, no GPU, 93.4% R@5. Use for laptops/CI.thenlper/gte-large): 1.3GB, GPU recommended, 96.6% R@5.from quantum_memory_graph import MemoryGraph
mg = MemoryGraph(model="thenlper/gte-large")
Recency boost is ON by default. Recent memories score higher automatically.
from quantum_memory_graph import store, recall, get_stm
store("User prefers dark mode") # Gets recency boost
# Track conversation context
stm = get_stm()
stm.conversation.add_turn("What are preferences?", memory_ids=["m1"])
Three layers:
pip install quantum-memory-graph[api]
python -m quantum_memory_graph.api --port 8502
Endpoints: POST /store, POST /recall, POST /store-batch, GET /stats
Multiple agents share one API server. See references/deployment.md for migration guide.
from quantum_memory_graph import store
for memory in existing_memories:
store(memory["text"], metadata=memory.get("metadata"))
# Graph connections built automatically
pip install quantum-memory-graph[ibm]
export IBM_QUANTUM_TOKEN=your_token
Runs QAOA on real quantum hardware (validated on ibm_fez, ibm_kingston).