Custom Categories
FreshReplace default memory tags with custom category labels aligned to your product's terminology.
Default Categories
Projects start with 15 broad categories:
personal_details, family, professional_details, sports, travel, food, music, health, technology, hobbies, fashion, entertainment, milestones, user_preferences, misc
Setting Custom Categories
python
import os
from mem0 import MemoryClient
os.environ["MEM0_API_KEY"] = "your-api-key"
client = MemoryClient()
new_categories = [
{"lifestyle_management_concerns": "Tracks daily routines, habits, hobbies and interests"},
{"seeking_structure": "Documents goals around creating routines and schedules"},
{"personal_information": "Basic info including name, preferences, personality traits"}
]
response = client.project.update(custom_categories=new_categories)Verify Active Categories
python
categories = client.project.get(fields=["custom_categories"])
print(categories)json
{
"custom_categories": [
{"lifestyle_management_concerns": "Tracks daily routines, habits..."},
{"seeking_structure": "Documents goals around creating routines..."},
{"personal_information": "Basic info including name, preferences..."}
]
}How Categories Are Applied
When you add memories, Mem0 automatically matches incoming memories to the closest category:
python
messages = [
{"role": "user", "content": "I need help organizing my daily schedule."},
{"role": "assistant", "content": "Let's break this down together."},
{"role": "user", "content": "I want consistent workouts and energy for friends."},
]
client.add(messages, user_id="alice", async_mode=False)
# Retrieve and inspect categories
memories = client.get_all(filters={"user_id": "alice"})
# Categories will show: ["lifestyle_management_concerns", "seeking_structure"]Limitation
Per-request overrides (custom_categories=... on client.add) are not yet supported on the managed API. Set categories at the project level.
Best Practices
- Keep category descriptions concise yet specific for better disambiguation
- Examine memories with empty
categoriesfields to identify naming gaps - Use project-level overrides exclusively until per-request support launches