Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Getting Started

Quickstart

Get started with Mem0 Platform in minutes

Get started with Mem0 Platform’s hosted API in under 5 minutes. This guide shows you how to authenticate and store your first memory.

Prerequisites

Installation

1

Install SDK

pip install mem0ai
2

Set your API key

from mem0import MemoryClientclient= MemoryClient(api_key="your-api-key")
3

Add a memory

messages= [    {"role":"user","content":"I'm a vegetarian and allergic to nuts."},    {"role":"assistant","content":"Got it! I'll remember your dietary preferences."}]client.add(messages,user_id="user123")
4

Search memories

results= client.search("What are my dietary restrictions?",filters={"user_id":"user123"})print(results)
Output:
{  "results": [    {      "id":"14e1b28a-2014-40ad-ac42-69c9ef42193d",      "memory":"Allergic to nuts",      "user_id":"user123",      "categories": ["health"],      "created_at":"2025-10-22T04:40:22.864647-07:00",      "score":0.30    }  ]}
Pro Tip: Want AI agents to manage their own memory automatically? UseMem0 MCP to let LLMs decide when to save, search, and update memories.

What’s Next?

Additional Resources

Was this page helpful?


[8]ページ先頭

©2009-2026 Movatter.jp