repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources16d ago| #1 | --- |
| #2 | title: Quickstart |
| #3 | description: "Get started with Mem0 Platform in minutes" |
| #4 | icon: "bolt" |
| #5 | iconType: "solid" |
| #6 | --- |
| #7 | |
| #8 | Get started with Mem0 Platform's hosted API in under 5 minutes. This guide shows you how to authenticate and store your first memory. |
| #9 | |
| #10 | ## Prerequisites |
| #11 | |
| #12 | - Mem0 Platform account ([Sign up here](https://app.mem0.ai)) |
| #13 | - API key ([Get one from dashboard](https://app.mem0.ai/dashboard/settings?tab=api-keys&subtab=configuration)) |
| #14 | - Python 3.10+, Node.js 14+, or cURL |
| #15 | |
| #16 | ## Installation |
| #17 | |
| #18 | <Steps> |
| #19 | <Step title="Install SDK"> |
| #20 | <CodeGroup> |
| #21 | ```bash pip |
| #22 | pip install mem0ai |
| #23 | ``` |
| #24 | |
| #25 | ```bash npm |
| #26 | npm install mem0ai |
| #27 | ``` |
| #28 | |
| #29 | </CodeGroup> |
| #30 | </Step> |
| #31 | |
| #32 | <Step title="Set your API key"> |
| #33 | <CodeGroup> |
| #34 | ```python Python |
| #35 | from mem0 import MemoryClient |
| #36 | |
| #37 | client = MemoryClient(api_key="your-api-key") |
| #38 | ```` |
| #39 | |
| #40 | ```javascript JavaScript |
| #41 | import MemoryClient from 'mem0ai'; |
| #42 | const client = new MemoryClient({ apiKey: 'your-api-key' }); |
| #43 | ```` |
| #44 | |
| #45 | ```bash cURL |
| #46 | export MEM0_API_KEY="your-api-key" |
| #47 | ``` |
| #48 | |
| #49 | </CodeGroup> |
| #50 | </Step> |
| #51 | |
| #52 | <Step title="Add a memory"> |
| #53 | <CodeGroup> |
| #54 | ```python Python |
| #55 | messages = [ |
| #56 | {"role": "user", "content": "I'm a vegetarian and allergic to nuts."}, |
| #57 | {"role": "assistant", "content": "Got it! I'll remember your dietary preferences."} |
| #58 | ] |
| #59 | client.add(messages, user_id="user123") |
| #60 | ```` |
| #61 | |
| #62 | ```javascript JavaScript |
| #63 | const messages = [ |
| #64 | {"role": "user", "content": "I'm a vegetarian and allergic to nuts."}, |
| #65 | {"role": "assistant", "content": "Got it! I'll remember your dietary preferences."} |
| #66 | ]; |
| #67 | await client.add(messages, { user_id: "user123" }); |
| #68 | ```` |
| #69 | |
| #70 | ```bash cURL |
| #71 | curl -X POST https://api.mem0.ai/v1/memories/add \ |
| #72 | -H "Authorization: Token $MEM0_API_KEY" \ |
| #73 | -H "Content-Type: application/json" \ |
| #74 | -d '{ |
| #75 | "messages": [ |
| #76 | {"role": "user", "content": "Im a vegetarian and allergic to nuts."}, |
| #77 | {"role": "assistant", "content": "Got it! Ill remember your dietary preferences."} |
| #78 | ], |
| #79 | "user_id": "user123" |
| #80 | }' |
| #81 | ``` |
| #82 | |
| #83 | </CodeGroup> |
| #84 | </Step> |
| #85 | |
| #86 | <Step title="Search memories"> |
| #87 | <CodeGroup> |
| #88 | ```python Python |
| #89 | results = client.search("What are my dietary restrictions?", filters={"user_id": "user123"}) |
| #90 | print(results) |
| #91 | ```` |
| #92 | |
| #93 | ```javascript JavaScript |
| #94 | const results = await client.search("What are my dietary restrictions?", { filters: { user_id: "user123" } }); |
| #95 | console.log(results); |
| #96 | ```` |
| #97 | |
| #98 | ```bash cURL |
| #99 | curl -X POST https://api.mem0.ai/v1/memories/search \ |
| #100 | -H "Authorization: Token $MEM0_API_KEY" \ |
| #101 | -H "Content-Type: application/json" \ |
| #102 | -d '{ |
| #103 | "query": "What are my dietary restrictions?", |
| #104 | "filters": {"user_id": "user123"} |
| #105 | }' |
| #106 | ``` |
| #107 | |
| #108 | </CodeGroup> |
| #109 | |
| #110 | **Output:** |
| #111 | |
| #112 | ```json |
| #113 | { |
| #114 | "results": [ |
| #115 | { |
| #116 | "id": "14e1b28a-2014-40ad-ac42-69c9ef42193d", |
| #117 | "memory": "Allergic to nuts", |
| #118 | "user_id": "user123", |
| #119 | "categories": ["health"], |
| #120 | "created_at": "2025-10-22T04:40:22.864647-07:00", |
| #121 | "score": 0.30 |
| #122 | } |
| #123 | ] |
| #124 | } |
| #125 | ``` |
| #126 | |
| #127 | </Step> |
| #128 | </Steps> |
| #129 | |
| #130 | <Callout type="tip" icon="plug"> |
| #131 | **Pro Tip**: Want AI agents to manage their own memory automatically? Use <Link href="/platform/mem0-mcp">Mem0 MCP</Link> to let LLMs decide when to save, search, and update memories. |
| #132 | </Callout> |
| #133 | |
| #134 | ## What's Next? |
| #135 | |
| #136 | <CardGroup cols={3}> |
| #137 | <Card title="Memory Operations" icon="database" href="/core-concepts/memory-operations/add"> |
| #138 | Learn how to search, update, and delete memories with complete CRUD operations |
| #139 | </Card> |
| #140 | |
| #141 | <Card title="Platform Features" icon="star" href="/platform/features/platform-overview"> |
| #142 | Explore advanced features like metadata filtering, graph memory, and webhooks |
| #143 | </Card> |
| #144 | |
| #145 | <Card title="API Reference" icon="code" href="/api-reference/memory/add-memories"> |
| #146 | See complete API documentation and integration examples |
| #147 | </Card> |
| #148 | </CardGroup> |
| #149 | |
| #150 | ## Additional Resources |
| #151 | |
| #152 | - **[Platform vs OSS](/platform/platform-vs-oss)** - Understand the differences between Platform and Open Source |
| #153 | - **[Troubleshooting](/platform/faqs)** - Common issues and solutions |
| #154 | - **[Integration Examples](/cookbooks/companions/quickstart-demo)** - See Mem0 in action |
| #155 |