81trust / 100
Memories Add
by Mem0 Cloud in Email & messaging
x402 APIPassing, checked 3 h ago
Store memories from a conversation, like mem0's add: an AI model extracts durable facts about the user from the messages (or, with infer=false, stores each message as is), embeds them and saves them privately under your memory_key (a secret string you generate; required). Identical facts are stored once. Needs at least one of user_id, agent_id, app_id, run_id. Memories are kept for 365 days. Returns {event_id, status, results:[{id, memory, event: ADD|NONE}]}.
POST https://mem0-cloud.saastemly.com/v3/memories/add
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 66 ms typical, 66 ms slowest 5%
- Last check
- 3 h ago
- Next check
- any minute now
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://mem0-cloud.saastemly.com/v3/memories/add" \
-H "content-type: application/json" \
-d '{"memory_key":"mk_7f3a9c1e5b2d48a6b0c4e9d1","messages":[{"content":"I just moved to San Francisco from New York and I prefer vegetarian food.","role":"user"},{"content":"Got it, I'll remember that.","role":"assistant"}],"metadata":{"source":"onboarding"},"user_id":"alice"}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fmem0-cloud.saastemly.com%2Fv3%2Fmemories%2Fadd
const res = await pay("https://mem0-cloud.saastemly.com/v3/memories/add", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"memory_key":"mk_7f3a9c1e5b2d48a6b0c4e9d1","messages":[{"content":"I just moved to San Francisco from New York and I prefer vegetarian food.","role":"user"},{"content":"Got it, I'll remember that.","role":"assistant"}],"metadata":{"source":"onboarding"},"user_id":"alice"}),
});
console.log(await res.json());Example input
{
"memory_key": "mk_7f3a9c1e5b2d48a6b0c4e9d1",
"messages": [
{
"content": "I just moved to San Francisco from New York and I prefer vegetarian food.",
"role": "user"
},
{
"content": "Got it, I'll remember that.",
"role": "assistant"
}
],
"metadata": {
"source": "onboarding"
},
"user_id": "alice"
}Example output
{
"event_id": "2c4d1f44-4f7b-4b2f-9f6e-7b5b4f5a1234",
"results": [
{
"event": "ADD",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"memory": "User moved to San Francisco from New York.",
"user_id": "alice"
},
{
"event": "ADD",
"id": "9d1b7c2e-5f0a-4e3b-8c6d-1a2b3c4d5e6f",
"memory": "User prefers vegetarian food.",
"user_id": "alice"
}
],
"status": "SUCCEEDED"
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 3 h ago | Passed | 402 | 66 ms | $0.008 |