Mem0

Mem0 extracts durable memories from agent conversations and retrieves relevant memories in later runs. Configure storage and retrieval scopes when memories should be available across sessions.

This integration uses the memory pattern: it extracts and recalls selected durable information rather than replaying the complete conversation transcript.

Important

Mem0 is a third-party system. Review its data handling, retention, regional boundaries, and service terms before sending application data.

Note

Mem0 integration isn't currently available for Agent Framework .NET.

Install the package

pip install agent-framework-mem0 --pre

Set MEM0_API_KEY or pass an API key directly. Configure storage and retrieval separately:

  • user_id, agent_id, and application_id are storage scopes. Mem0 stamps them on each stored memory.
  • search_user_id, search_agent_id, and search_application_id are retrieval scopes. Mem0 uses them to select which memories it searches.

The application scopes require the Mem0 Platform client (AsyncMemoryClient). The OSS AsyncMemory client supports only user and agent scopes.

Retrieval scope doesn't inherit from storage scope. If you don't set any search_* scope, the provider stores memories but doesn't recall them.

For per-user memory, set user_id and search_user_id to the same stable identifier:

Mem0 processes memories asynchronously. In production, use retry or service-aware consistency handling instead of relying on a fixed delay.

Note

Mem0 integration isn't currently available for Agent Framework Go. See the Agent Framework Go repository for the latest status.

Next steps

Go deeper: