Skip to content

docs: add installation and configuration guide for email automation with Mem0 open source#4567

Merged
whysosaket merged 1 commit intomainfrom
feat/oss-email-automation-cookbook
Mar 28, 2026
Merged

docs: add installation and configuration guide for email automation with Mem0 open source#4567
whysosaket merged 1 commit intomainfrom
feat/oss-email-automation-cookbook

Conversation

@kartik-mem0
Copy link
Copy Markdown
Contributor

Description

Adds an Open Source tab to the Email Automation cookbook (docs/cookbooks/operations/email-automation.mdx), giving users a fully local alternative alongside the existing Platform version.

The OSS version uses:

  • Mem0 Memory class with Memory.from_config() instead of MemoryClient
  • Qdrant (local Docker) as the vector store
  • Ollama (llama3.1:latest) for LLM and (nomic-embed-text:latest) for embeddings

Key API differences handled:

  • MemoryClient() → Memory.from_config({...}) with Qdrant + Ollama providers
  • categories=["email", "correspondence"] (Platform-only) → metadata={"memory_category": "email"} for OSS
  • client.search(query, filters={"AND": [{"user_id": ...}, {"categories": ...}]}) → memory.search(query, user_id=..., filters={"memory_category": "email"}) (explicit session params, metadata-based
    category filtering)
  • client.get_all(filters={"AND": [{"user_id": ...}, {"subject": {"icontains": ...}}]}) → memory.get_all(user_id=..., filters={"AND": [{"memory_category": "email"}, {"subject": {"icontains":
    ...}}]}) (icontains works natively in OSS via Qdrant's MatchText)

Includes installation section with pip install, Docker, and ollama pull commands, plus a note about swappable embedding models and a callout explaining the categories vs metadata difference.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Refactor (no functional changes)
  • Documentation update

Breaking Changes

N/A

Test Coverage

  • I added/updated unit tests
  • I added/updated integration tests
  • I tested manually (describe below)
  • No tests needed (explain why)

Tested the OSS cookbook code end-to-end locally with Ollama + Qdrant (5 tests):

  1. memory.add() — stored Alice's email, extracted 3 memories (meeting day, time, presentation task)
  2. memory.add() — stored Charlie's email, Mem0 intelligently deduped/updated existing memories
  3. memory.search() with {"memory_category": "email"} filter — found 2 relevant results
  4. memory.search() with compound AND filter (memory_category + sender) — correctly returned only Alice's email
  5. memory.get_all() with {"subject": {"icontains": "Meeting"}} — found the meeting thread

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have added tests that prove my fix/feature works
  • New and existing tests pass locally
  • I have updated documentation if needed

@mintlify
Copy link
Copy Markdown
Contributor

mintlify bot commented Mar 27, 2026

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
mem0 🟢 Ready View Preview Mar 27, 2026, 12:05 PM

@utkarsh240799
Copy link
Copy Markdown
Contributor

Minor nit. Maybe we can explain the code more by breaking down it into blocks. Works if cool with @whysosaket and @rudrajmehta-mem0 .

@whysosaket whysosaket merged commit 4b7f51d into main Mar 28, 2026
4 checks passed
@whysosaket whysosaket deleted the feat/oss-email-automation-cookbook branch March 28, 2026 15:42
@whysosaket
Copy link
Copy Markdown
Member

Minor nit. Maybe we can explain the code more by breaking down it into blocks. Works if cool with @whysosaket and @rudrajmehta-mem0 .

Thanks for highlighting this @utkarsh240799, we'll revisit the cookbooks sometime later when we can fix all of these issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants