fix(mem0-plugin): upgrade REST endpoints to v3, fix dream scheduling docs

- All add_memory REST calls now use /v3/memories/add/ (was /v1/memories/)
- Session start search uses /v3/memories/search/ (was /v2/memories/search/)
- Dream skill: removed reference to nonexistent /schedule skill
  (Claude Code has no native scheduling — recommend external cron instead)
This commit is contained in:
kartik-mem0
2026-05-21 18:14:19 +05:30
parent 930f6ec51d
commit 470cef6ba6
5 changed files with 13 additions and 25 deletions
+1 -1
View File
@@ -101,7 +101,7 @@ def post_memory(api_key: str, content: str, user_id: str, filename: str, project
data = json.dumps(body).encode("utf-8") data = json.dumps(body).encode("utf-8")
req = urllib.request.Request( req = urllib.request.Request(
f"{API_URL}/v1/memories/", f"{API_URL}/v3/memories/add/",
data=data, data=data,
headers={ headers={
"Content-Type": "application/json", "Content-Type": "application/json",
@@ -115,7 +115,7 @@ def store_summary(api_key: str, summary: str, user_id: str, session_id: str, pro
data = json.dumps(body).encode("utf-8") data = json.dumps(body).encode("utf-8")
req = urllib.request.Request( req = urllib.request.Request(
f"{API_URL}/v1/memories/", f"{API_URL}/v3/memories/add/",
data=data, data=data,
headers={ headers={
"Content-Type": "application/json", "Content-Type": "application/json",
@@ -129,7 +129,7 @@ def post_memory(api_key: str, content: str, user_id: str, project_id: str, branc
} }
data = json.dumps(body).encode("utf-8") data = json.dumps(body).encode("utf-8")
req = urllib.request.Request( req = urllib.request.Request(
f"{API_URL}/v1/memories/", f"{API_URL}/v3/memories/add/",
data=data, data=data,
headers={ headers={
"Content-Type": "application/json", "Content-Type": "application/json",
+1 -1
View File
@@ -190,7 +190,7 @@ def store_memory(api_key: str, content: str, user_id: str, source: str, session_
data = json.dumps(body).encode("utf-8") data = json.dumps(body).encode("utf-8")
req = urllib.request.Request( req = urllib.request.Request(
f"{API_URL}/v1/memories/", f"{API_URL}/v3/memories/add/",
data=data, data=data,
headers={ headers={
"Content-Type": "application/json", "Content-Type": "application/json",
+9 -21
View File
@@ -207,34 +207,18 @@ Dream complete.
--- ---
## Scheduling (Claude Code only) ## Auto mode
### Running dream on a schedule When invoked with `--auto` (e.g., `/mem0:dream --auto`), run non-interactively:
**Note**: Scheduled dream is only available in Claude Code, which natively supports
the `schedule` skill. Codex and Cursor do not have a scheduling primitive — users
on those platforms should run `/mem0:dream` manually.
When the user runs `/mem0:dream --schedule weekly` (or similar), register a
recurring scheduled task using the Claude Code `schedule` skill.
Use `--auto` flag to enable non-interactive mode, which skips the interactive
contradiction resolution UI and applies only safe operations automatically:
- **Merges**: applied automatically (no contradiction, both are compatible). - **Merges**: applied automatically (no contradiction, both are compatible).
- **Prunes**: applied automatically (age/confidence-based, no ambiguity). - **Prunes**: applied automatically (age/confidence-based, no ambiguity).
- **Contradictions**: skipped in `--auto` mode; they require human judgment. - **Contradictions**: skipped — they require human judgment.
Example scheduling invocation: In auto mode:
```
/schedule weekly mem0:dream --auto
```
When running with `--auto`:
1. Load policies and fetch memories (Steps 1–3) as normal. 1. Load policies and fetch memories (Steps 1–3) as normal.
2. Apply merges and prunes silently without printing the diff or prompting. 2. Apply merges and prunes silently without printing the diff or prompting.
3. Log a compact summary to stdout (suitable for a cron log): 3. Print a compact summary:
``` ```
[mem0-dream --auto] project=<id> merged=<N> pruned=<N> conflicts_skipped=<N> [mem0-dream --auto] project=<id> merged=<N> pruned=<N> conflicts_skipped=<N>
``` ```
@@ -248,3 +232,7 @@ When running with `--auto`:
infer=False, infer=False,
) )
``` ```
**Note**: Claude Code does not have native cron/scheduling. To run dream periodically,
use an external scheduler (cron, launchd) calling `claude -p "/mem0:dream --auto"`,
or run it manually at the start of each week.