Repository navigation
feat(memorycd): AutoMem adapter overlay for the MemoryCD harness - #35
Draft
jack-arturo wants to merge 1 commit into
Draft
jack-arturo wants to merge 1 commit into
jack-arturo wants to merge 1 commit into
Conversation
Port the MemoryCD AutoMem adapter, first built in a private automation repo, into runners/memorycd/. It is an overlay for a clean upstream AgentMemoryWorld/MemoryCD clone: AutoMemMethod (stdlib-only HTTP), the apply script that registers --method automem and an optional anthropic provider, the Anthropic compatibility wrapper, a deterministic subset builder, and the contract test. The benchmark doc becomes the README, including the 4-user rating-prediction smoke (AutoMem tied BM25 cross-domain, was worse single-domain; 4 users are not statistically meaningful). Port changes: the AutoMemMethod fallback URL moves from the private repo's local mirror port (8780) to this repo's local-stack default, http://localhost:8001; env var precedence is unchanged. The usage string points at runners/memorycd/. The README now documents the no-cleanup behaviour, unverified user_id plumbing, and the Anthropic wrapper's max_tokens=16 cap as known limitations. Sanitized: dropped the Node env-loading wrapper (its only job was loading the private repo's .env) in favour of documented AUTOMEM_API_URL, AUTOMEM_API_KEY/AUTOMEM_API_TOKEN, LLM_PROVIDER and provider key vars. Removed local absolute and /tmp paths, internal run ids and probe tags, private issue links and tracking labels, and credential-status wording. Tracking is now #30. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Contributor
|
Backlog triage (2026-09-28): rechecked current head |
4 of 8 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #30
Summary
This ports the MemoryCD AutoMem adapter into
runners/memorycd/. It was first built in a private automation repo and landed there by mistake. Draft: the only evidence is a 4-user smoke.The adapter is an overlay for a clean upstream AgentMemoryWorld/MemoryCD clone. This repo does not vendor the harness or its data.
automem_method.py:AutoMemMethod, stdlib-only HTTP. For each user it ingests interactions plus one domain-profile node per(user, domain). It links interactions to their profile withPART_OFand the profiles to each other with pairwiseRELATES_TO. Recall usesexpand_relations=true, scoped to run and user tags.apply_automem_method.py: copies the method into a clone, registers--method automem, and adds an optionalanthropicLLM provider.anthropic_compat.py: an OpenAI-chat-shaped wrapper for that provider.create_subset.py: a deterministic small-subset builder.test_automem_method.py: the request-shape contract test.README.md: the former benchmark doc, covering setup, env vars, the run command, the smoke result and known limitations.Smoke result (2026-09-13): 4 users, not statistically meaningful
Rating prediction with a
Bookstarget andElectronicsmemory, K=4, one held-out rating per user,claude-sonnet-4-6:There is no measurable cross-domain gain. Four users with one prediction each shows only that the pipeline runs end to end. Next steps are in the README and #30: 100+ users per setting, plain vs relation-expanded recall, then a go/no-go.
Port and sanitization
.env. The README documentsAUTOMEM_API_URL,AUTOMEM_API_KEY/AUTOMEM_API_TOKEN,LLM_PROVIDER, andOPENAI_API_KEY/OPENROUTER_API_KEY/ANTHROPIC_API_KEYinstead. You now run the clone's.venv/bin/pythondirectly.AutoMemMethod's fallback URL changed from the private repo's local mirror port to this repo's local-stack default,http://localhost:8001. Env-var precedence is unchanged.runners/memorycd/./tmppaths, internal run ids and probe tags, private issue links and tracking labels, and wording about the state of specific credentials. Tracking now points at MemoryCD (ICLR 2026 workshop): cross-domain personalization eval for AutoMem relation linking #30.user_idis an optional keyword the overlay does not wire into the harness. If upstream omits it, every user shares oneanonymoustag and recall competes across users. Check this before a larger run.max_tokens=16, which suitsrating_predictiononly.anthropicis imported lazily and installed only in the MemoryCD clone's venv.Verification
The contract test needs no upstream clone. It writes a stub
BaseMethodinto a temp dir and patchesurlopen.create_subset.pyran on a synthetic 6-user JSONL.gz (not committed, no download). User 1 had only oneBooksinteraction:That output shows the ineligible user skipped and source history trimmed to
--max-memory-per-domain 8.Not verified in this port:
apply_automem_method.py's text patches were not run against the current upstream files.user_idtoselect_memoryis unchecked.🤖 Generated with Claude Code