Commit Graph

2533 Commits

Author SHA1 Message Date
Deshraj Yadav 1ea8c2e5fe fix(mem0-agent): detached hooks lost their payload, so nothing was ever written
Observed live: real sessions flagged durable candidates (a preference, two
insights, a convention) but every session showed 'flush events: 0'. The manifest
backgrounded flush and assist-error with '( cmd &)', so the parent exited and
closed stdin before the child could read it -- the child then had no session_id,
fell back to 'no-session', and drained an empty buffer.

Now the CLI reads the payload itself and re-execs a detached worker with
start_new_session, so the hook still returns in ~0.27s. Verified end to end:
sent=1, session_state=created.

Also records a surface hint per event and shows it in 'sessions', since the
manifest pins MEM0_EDITOR to the same value on every client.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 20:22:43 -07:00
Deshraj Yadav 10b8fc4bed fix(mem0-agent): read the key from the plugin config, add cross-surface verification
The desktop app never sources a shell rc, so a key that exists only as MEM0_API_KEY
in .zshrc is invisible there and the plugin silently no-ops. Claude Code injects the
userConfig value as CLAUDE_PLUGIN_OPTION_API_KEY (v1 read it, v2 did not).

- resolve_api_key() -> (key, source): env, plugin config, legacy plugin config, keychain
- health now reports WHERE the key came from, which is how you tell the two apart
- every logged event records the editor, and a new 'sessions' command lists which
  surfaces have actually built packs and written memories

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 20:17:17 -07:00
Deshraj Yadav f4949c55af refactor(mem0-agent): stop requiring org/project in client config
An API key is already bound to one (org_id, project_id) server-side, so storing a
copy locally was redundant state that can go stale. Verified live that add,
get_all and feedback all succeed with no ids in the body at all.

- both ids are now purely an OVERRIDE, for pointing one key at a different
  project in the same org; half an override is ignored rather than half-applied
- identity resolution no longer persists scope as a side effect
- the project-config endpoints (the only ones needing ids in the URL) resolve
  them from /v1/ping/ and cache the result
- corrects an over-generalized finding: feedback does not require the ids; it
  404'd earlier only because that memory lived outside the key's project
- onboarding now recommends a key issued for a dedicated project over an override

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 17:13:52 -07:00
Deshraj Yadav dda5f21332 fix(mem0-agent): bundle a launcher so hooks never depend on a global CLI
SessionStart failed with 'pyenv: mem0-agent: command not found' in any repo whose
.python-version selects a Python the console script was not installed into. A
pip entry point is the wrong dependency for a plugin.

- bin/mem0-agent: POSIX launcher that picks the first CPython >= 3.10 it can find
  and runs the package from source (there are no third-party dependencies)
- hooks now invoke ${CLAUDE_PLUGIN_ROOT}/bin/mem0-agent, matching how the v1
  plugin calls its own scripts; the generator enforces this
- app_id override renamed to MEM0_AGENT_APP_ID: v1 exports MEM0_PROJECT_ID, which
  was silently overriding this plugin's project scope while both are installed

Verified: all six hooks exit 0 from a pyenv-3.11 repo, and app_id resolves per
repository again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 16:20:28 -07:00
Deshraj Yadav a07756f6d7 fix(mem0-agent): accept --session-id after the subcommand
The generated manifest writes 'mem0-agent context --session-id $CLAUDE_SESSION_ID',
but the flag was only on the top-level parser, so argparse rejected it and every
SessionStart hook exited 2 -- the plugin would install and silently do nothing.

Both orders now work, and a new test runs every command line in the manifest
through the parser so a manifest/CLI mismatch fails the build.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 02:02:29 -07:00
Deshraj Yadav a2ae930e9f fix(mem0-agent): add required userConfig title to the plugin manifest
The loader validates userConfig.<key>.title as a required string; without it the
install fails with 'invalid manifest file'. Manifest shape now matches the v1
plugin's exactly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 01:58:09 -07:00
Deshraj Yadav a15443508d chore(mem0-agent): register the plugin in the Claude Code and Cursor marketplaces
Uses the relative-path source form the loader supports; an absolute path is
rejected as an unsupported source type.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 01:55:47 -07:00
Deshraj Yadav e11d2a4a06 fix(mem0-agent): emit the Claude Code manifest at hooks/hooks.json
Claude Code auto-discovers a plugin's hooks at <plugin>/hooks/hooks.json. The
generator was writing to hooks/generated/, so the manifest existed but was never
loaded and no hook would have fired on install.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-29 01:49:27 -07:00
Deshraj Yadav ba1de5f87b fix(mem0-agent): non-blocking stdin, clean session_state, lint
Found by running the CLI live against a scratch project:
- hook_input() blocked forever on an open stdin pipe with no data. A real hook
  writes JSON and closes the pipe, but any manual invocation hung; now polled
  with select() and never blocks.
- the open-thread snapshot was filling with progress lines and file-modification
  lists -- v1's exact failure -- so it now filters turns through the same
  hard-drop rules the capture gate uses.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 02:12:23 -07:00
Deshraj Yadav 4d5f2e653c feat(mem0-agent): capture gate, eval harness, and mixed-window fix
- triggers.py: hard-drop rules now filter PER TURN, so a durable fact sitting
  between two progress lines survives instead of being dropped with them. The
  eval harness caught this: 3 mixed-window fixtures were being destroyed
  client-side before the extractor ever saw them.
- widened flag rules for 13 plainly durable windows the gate was missing
  (standing preferences, X-over-Y decisions, stated rules, diagnoses, verified
  procedures); verified procedures moved from aggressive to balanced
- eval/: 56 labeled fixtures from the audited v1 corpus plus offline and live
  runners with a --check regression gate
- un-ignore integrations/mem0-agent/eval (root .gitignore excluded it silently)

Offline scorecard: hard_drop_recall 1.000, extract_recall 1.000,
flag_precision 1.000, 0 misclassified.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 02:02:37 -07:00
Deshraj Yadav 3ea00cf88c feat(mem0-agent): read path, hooks, maintenance, CLI and skills
- pack.py: single-call context pack, budgeted, sanitized, cached, with
  served-id tracking that turns a citation into POSITIVE feedback
- assist.py: error-signature lookup (never raw stdout, which returned 0 results in v1)
- maintain.py: transactional consolidation (add merged -> verify -> delete sources)
- transcript.py: JSONL parsing into non-overlapping windows via a cursor
- cli.py: the twelve commands the hooks invoke; detached assist queues a block
  that the next prompt hook drains, keeping the hot path network-free
- hooks generated from one spec; plugin manifest, MCP wiring, five skills

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 01:56:38 -07:00
Deshraj Yadav e102b21180 feat(mem0-agent): WS0+WS1 foundation - verified contract, config, client core
Encodes the platform contract validated against the live API:
- project_id/org_id pinned in request body (query params are ignored)
- latest_only=True enforced on every read
- metadata.type as the read-time taxonomy (categorization lags ~4h)
- NOT filters take a list; delete_all takes query params; fields repeated

Includes project config (write-gate instructions, 6 custom categories, decay),
verified filter recipes, circuit breaker, session-scoped state, keychain auth,
and identity/project resolution.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-28 01:45:10 -07:00
Kartik b357a5a1b0 chore(release): Python SDK v2.0.14, TypeScript SDK v3.1.2 (#6589) v2.0.14 ts-v3.1.2 2026-07-25 17:51:48 +05:30
Hrushikesh Yadav d653b63fac fix(milvus): guard text field in update() with _has_bm25_schema check (#5705) 2026-07-24 18:27:54 +05:30
Abhay Singh cc4671579f fix(ts-oss/cassandra): apply every operator in a compound field filter (#6511) 2026-07-24 18:26:10 +05:30
Bartok 01afdde3e7 salvage: fix(opensearch) re-raise search errors (credit @yashwanth123 #6477) (#6519)
Co-authored-by: yashwanth123 <yashwanth123@users.noreply.github.com>
2026-07-24 18:19:26 +05:30
Elif Sema Balcioglu d6d89c987b Add Oracle Vector Store Integration (#5358)
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-07-23 21:30:01 +05:30
Kartik c2150e8f1a docs: SEO and AEO updates for the memory expiration page (#6535) 2026-07-23 20:46:29 +05:30
microbluey 19c7bb84a2 fix(ts-oss/chroma): stop dropping filter conditions in where-clause translation (#6521) 2026-07-23 20:07:19 +05:30
Abhishek Chauhan e6281ab724 fix(ts-oss): forward responseFormat to Gemini in generateResponse (#6468) 2026-07-23 19:48:33 +05:30
Rod Boev a71d7bdbe3 fix(dashboard): clear the LLM API key on provider change (#6475) 2026-07-23 19:44:54 +05:30
microbluey 56ec7d20f1 fix(vector_stores/opensearch): translate the '*' wildcard to an exists query for every key (#6522) 2026-07-23 19:41:09 +05:30
Abhay Singh ca2abca2b8 fix(ts-oss/milvus): skip '*' wildcard filter values instead of matching literally (#6508) v2.0.13 2026-07-23 00:41:45 +05:30
Abhay Singh 0e582adc6c fix(ts-oss/anthropic): find the text block in no-tools responses (#6506) 2026-07-23 00:40:40 +05:30
Clement Antony 9caffeaa7b fix(ts-sdk): use textLemmatized for BM25 keyword search on Milvus, OpenSearch, and MongoDB (#6497)
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-07-23 00:39:18 +05:30
microbluey a58e0586ad fix(vector_stores/opensearch): honor all filter keys instead of a hardcoded identity-key list (#6454)
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-07-23 00:24:16 +05:30
microbluey a9cb4bb644 fix(vector_stores/chroma): stop dropping filter conditions in where-clause translation (#6452) 2026-07-23 00:22:10 +05:30
Gyubin Son 7bf84b8d38 fix: drop unused vector column from pgvector get() and list() queries (#6483) 2026-07-23 00:11:40 +05:30
Kartik 5e7adc4d12 chore: update changelog, bump versions to Python 2.0.13, TypeScript 3.1.1, OpenCode plugin 0.2.2 (#6504) ts-v3.1.1 opencode-v0.2.2 2026-07-22 23:27:47 +05:30
Ayaan Gazali 14393b5962 fix(llms/anthropic): find the text block in no-tools responses instead of indexing content[0] (#6481) 2026-07-22 21:34:48 +05:30
Abhay Singh f590c9596a fix(ts-oss/baidu): convert L2 distance to similarity score in search() (#6485)
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-07-22 20:37:12 +05:30
Kartik dd5f7e39a8 ci: infer component labels for issues filed without the form (#6471) 2026-07-21 21:39:00 +05:30
Kartik 70ab76a053 ci: fix silently-broken issue labeling and add PR labeling (#6470) 2026-07-21 18:47:39 +05:30
krishna soni 2af3a72f73 Remove redundant check for api_key attribute (#6460)
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-07-21 17:47:25 +05:30
freya0926 8005e18aec fix(qdrant): actually clear points on reset() for local Qdrant (#6412)
Co-authored-by: freya0926 <299410795+freya0926@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-07-21 13:04:47 +05:30
Abhay Singh 39551145b8 fix(ts-oss): coerce non-string entity ids instead of crashing on trim() (#6263)
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-07-21 12:48:15 +05:30
Aditya Jethani c2bc28e589 fix(memory): don't let update() metadata overwrite user_id/agent_id/run_id (#6278)
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-07-21 12:44:22 +05:30
Kartik fec2fe6a2c fix(vector-stores): scope Pinecone delete_col()/reset() to namespace (#6287) 2026-07-21 12:24:57 +05:30
Abhinav Singh d0c23a5950 fix(ts-oss): don't let update() metadata overwrite user_id/agent_id/run_id (#6343)
Co-authored-by: kartik-mem0 <kartik.labhshetwar@mem0.ai>
2026-07-21 12:11:47 +05:30
Rod Boev b05cce581b fix(opencode-plugin): recover MEM0_API_KEY from shell profiles (#6404) 2026-07-20 20:41:41 +05:30
Kartik 8a57967c8a chore(labels): retire graph-memory, ollama, and benchmark from issue templates + labeler (#6447) 2026-07-20 17:04:10 +05:30
Kartik 756b0b1b6d fix(ts-sdk): lazy-load optional provider SDKs in mem0ai/oss (#6389) 2026-07-20 15:53:35 +05:30
Abhinav Singh 726bcc80b2 fix(vector-stores/baidu): convert L2 distance to similarity score in search() (#6435) 2026-07-20 12:44:26 +05:30
JainamShah-22 9383e9a255 fix(server): scope auth DB sessions to prevent connection-pool exhaustion (#6237) 2026-07-20 00:07:50 +05:30
Jupiter ddaa655edf fix(llms): honor OPENAI_BASE_URL in structured provider (#6322) 2026-07-17 20:45:58 +05:30
youneshima 739534c0a3 docs: use CLI commands for Claude Code plugin install steps (#6341) 2026-07-16 11:00:50 +05:30
Kartik 633b035342 feat(ts-sdk): add AWS Bedrock embedding provider (#6185) 2026-07-15 14:27:07 +05:30
Kartik ccbe5861a1 docs: remove criteria retrieval docs for non-existent feature (#6282) 2026-07-14 20:06:05 +05:30
Kartik 50c3cf44f1 refactor(sdk): remove dead retrieval_criteria parameter (#6313) 2026-07-14 20:03:53 +05:30
Kartik d6d2588ef5 fix(mem0-plugin): store assistant-authored summaries with role="assistant" (#6316) 2026-07-14 20:03:36 +05:30