import os from mem0 import Memory config = { "vector_store": { "provider": "chroma", "config": { "collection_name": "homeai_memory", "path": os.path.expanduser("~/.openclaw/memory/chroma/"), } }, "llm": { "provider": "ollama", "config": { "model": "qwen2.5:7b", "ollama_base_url": "http://localhost:11434", } }, "embedder": { "provider": "ollama", "config": { "model": "nomic-embed-text", "ollama_base_url": "http://localhost:11434", } } } m = Memory.from_config(config) # Test storing a memory result = m.add("The user's favorite color is blue.", user_id="aodhan") print(f"Store result: {result}") # Test searching for the memory search_results = m.search("What is the user's favorite color?", user_id="aodhan") print(f"Search results: {search_results}")