ant_ai.memory.backends.mem0
Mem0Memory
pydantic-model
Bases: MemoryTool
mem0 cloud backend for AgentMemory.
Requires MEM0_API_KEY in the environment, or pass api_key explicitly.
Example::
memory = Mem0Memory(api_key="m0-...")
msgs = await memory.retrieve("user preferences", user_id="alice")
await memory.update(conversation, user_id="alice")
Fields:
-
name(str | None) -
description(str | None) -
parameters(dict[str, Any] | None) -
__namespace_methods__(list[str])
Validators:
-
_set_defaults
Source code in src/ant_ai/memory/backends/mem0.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 | |