🔐 Mem0 is now SOC 2 and HIPAA compliant! We're committed to the highest standards of data security and privacy, enabling secure memory for enterprises, healthcare, and beyond. Learn more
Mem0 provides a powerful set of APIs that allow you to integrate advanced memory management capabilities into your applications. Our APIs are designed to be intuitive, efficient, and scalable, enabling you to create, retrieve, update, and delete memories across various entities such as users, agents, apps, and runs.
# Get all project detailsproject_info = client.project.get()# Get specific fields onlyproject_info = client.project.get(fields=["name", "description", "custom_categories"])
# Create a project with name and descriptionnew_project = client.project.create( name="My New Project", description="A project for managing customer support memories")
Modify project configuration including custom instructions, categories, and graph settings:
Copy
Ask AI
# Update project with custom categoriesclient.project.update( custom_categories=[ {"customer_preferences": "Customer likes, dislikes, and preferences"}, {"support_history": "Previous support interactions and resolutions"} ])# Update project with custom instructionsclient.project.update( custom_instructions="...")# Enable graph memory for the projectclient.project.update(enable_graph=True)# Update multiple settings at onceclient.project.update( custom_instructions="...", custom_categories=[ {"personal_info": "User personal information and preferences"}, {"work_context": "Professional context and work-related information"} ], enable_graph=True)
# Get all project membersmembers = client.project.get_members()# Add a new member as a readerclient.project.add_member( email="[email protected]", role="READER" # or "OWNER")# Update a member's roleclient.project.update_member( email="[email protected]", role="OWNER")# Remove a member from the projectclient.project.remove_member(email="[email protected]")
All project methods are also available in async mode:
Copy
Ask AI
from mem0 import AsyncMemoryClientasync def manage_project(): client = AsyncMemoryClient(org_id='YOUR_ORG_ID', project_id='YOUR_PROJECT_ID') # All methods support async/await project_info = await client.project.get() await client.project.update(enable_graph=True) members = await client.project.get_members()# To call the async function properlyimport asyncioasyncio.run(manage_project())