Skip to content

feat(mem0): add the memory port v2 store proven on live Mem0 - #553

Open
outof-place wants to merge 2 commits into
mainfrom
feat/memory-mem0-port-v2
Open

outof-place wants to merge 2 commits into
mainfrom
feat/memory-mem0-port-v2

Conversation

@outof-place

Copy link
Copy Markdown
Collaborator

Stage 5 of the agent memory rebuild (plan: docs/plans/2026-09-23-memory-package.md, D2, D5, D6, Q2, Q6, Q14). This adds a Mem0 store for memory port v2 and checks it against live Mem0. Nothing calls it yet; stage 6a wires it in. The v1 adapter is untouched.

  • integrations/mem0/store.ts adds mem0MemoryStore(ctx) and readMem0Identity(ctx). The identity comes from GET /v1/ping/ and is the {orgId, projectId} a run pins (Q6).
  • integrations/mem0/store-client.ts makes every v3 call and maps statuses:
    • 401/403 are key_rejected.
    • 413 and 403 upgrade_required are quota.
    • 429 is rate_limited.
    • Timeouts are timeout, and a connection that provably never opened is unreachable. All of these are unavailable and carry the status.
    • 400/409/422 are rejected.
    • A write whose connection dropped after sending reports an unknown fate, never "nothing landed".
  • Behaviour:
    • held is complete: it pages to 205 and beyond, and refuses if the listing changes mid-read. It is ordered by an addedAt stamp.
    • Ranked recall is a complete listing plus one search with threshold 0.
    • Updates are sent as PUT with full metadata.
    • An add is answered pending only when Mem0 says PENDING.
    • Forget uses delete_linked, sends include_merged, and names every memory the cascade took. A cascade that reached beyond the subject is logged.
    • A subject containing * or % is refused and nothing is sent.
  • store.test.ts: 130 tests in the package. They include the stage 2 conformance suite run on a fake, which was built from response bodies recorded live (test-fixtures/live-*, each with a source note).
  • The live probe (live-probe.ts, pnpm probe:live) used app_id ai-workflow-probe and probe-only user ids. When it finished, both runs listed a count of 0.
    • A PUT on an immutable memory returned 200 and changed the text, so new writes do not set immutable.
    • Nothing was consolidated after 70 s.
    • A bad key gave a live 401.

Gate: one review pass. One fixer addressed its two majors: forget missing merged and cascaded memories, and a post-send drop being reported as "nothing landed". The same fixer fixed the minors.

No user-visible change, so there is no changelog entry.

🤖 Generated with Claude Code

@outof-place outof-place added the changelog: skip Internal change, no changelog entry required label Sep 25, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@vercel

vercel Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ai-workflow-app-dashboard Ready Ready Preview Sep 25, 2026 9:56am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Sep 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 23 billable files and costs up to $5.75.

Or wait 53 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 46e75804-ef18-4a0d-966a-dcd6ffeccee8

📥 Commits

Reviewing files that changed from the base of the PR and between c3340ff and 77ff142.

📒 Files selected for processing (23)
  • integrations/mem0/README.md
  • integrations/mem0/live-probe.ts
  • integrations/mem0/package.json
  • integrations/mem0/store-client.ts
  • integrations/mem0/store-test-support.ts
  • integrations/mem0/store.test.ts
  • integrations/mem0/store.ts
  • integrations/mem0/test-fixtures/live-add-direct-import.json
  • integrations/mem0/test-fixtures/live-add-direct-import.source.txt
  • integrations/mem0/test-fixtures/live-add-queued.json
  • integrations/mem0/test-fixtures/live-add-queued.source.txt
  • integrations/mem0/test-fixtures/live-delete-linked.json
  • integrations/mem0/test-fixtures/live-delete-linked.source.txt
  • integrations/mem0/test-fixtures/live-list-page.json
  • integrations/mem0/test-fixtures/live-list-page.source.txt
  • integrations/mem0/test-fixtures/live-memory-not-found.json
  • integrations/mem0/test-fixtures/live-memory-not-found.source.txt
  • integrations/mem0/test-fixtures/live-search.json
  • integrations/mem0/test-fixtures/live-search.source.txt
  • integrations/mem0/test-fixtures/live-unauthorized.json
  • integrations/mem0/test-fixtures/live-unauthorized.source.txt
  • integrations/mem0/test-fixtures/live-update.json
  • integrations/mem0/test-fixtures/live-update.source.txt

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

1 active deployment
Preview – ai-workflow-app-dashboard — 77ff142f Deployed Sep 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: skip Internal change, no changelog entry required

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant