memory.ephemeral
Ephemeral (in-memory) memory backend.
EphemeralMemory Objects
class EphemeralMemory(BaseMemoryBackend)
In-memory dict-based memory (non-persistent).
Suitable for development and testing. Data is lost when the
process restarts. For persistent memory, use Mem0Backend.
add
async def add(messages: list[dict],
metadata: dict[str, Any] | None = None) -> None
Store messages in memory.
search
async def search(query: str, limit: int = 10) -> list[dict[str, Any]]
Simple substring search over stored entries.
close
async def close() -> None
Clear memory.