fix(openclaw): migrate example plugin memory search to the v1 POST + Filters DSL API#245
Closed
Fearvox wants to merge 668 commits into
Closed
fix(openclaw): migrate example plugin memory search to the v1 POST + Filters DSL API#245Fearvox wants to merge 668 commits into
Fearvox wants to merge 668 commits into
Conversation
Use self-deployed embedding and rerank APIs by default See merge request npc-work/aic/ai/evermemos-opensource!64
vLLM Rerank API adopts an instruction-tuned approach See merge request npc-work/aic/ai/evermemos-opensource!65
feat: metrics client and rerank/vectorize/retrieve metrics See merge request npc-work/aic/ai/evermemos-opensource!66
fix:update episode prompt See merge request npc-work/aic/ai/evermemos-opensource!68
feat: add rerank metrics See merge request npc-work/aic/ai/evermemos-opensource!69
* chore: rename project from evermemos to EverCore This commit renames the project directory and updates all internal references from "evermemos" to "EverCore". The changes include: - Renaming the main directory from `methods/evermemos` to `methods/EverCore` - Updating all import paths and module references - Maintaining the same code structure and functionality - Adding new configuration files (.vscode/settings.json, .pylintrc, pyrightconfig.json) - Updating Dockerfile and project metadata * docs: update references from evermemos to EverCore Update documentation files to reflect the renaming of the 'evermemos' directory to 'EverCore'. This includes fixing clone commands, directory paths, and documentation links across multiple files to ensure consistency and correct navigation for users. * chore: rename EverMemOS to EverCore across codebase This is a project-wide rebranding from EverMemOS to EverCore. The changes include: - Update project name in source files, documentation, and configuration - Rename API references, environment variables, and service names - Modify demo descriptions and benchmark configurations - Update URLs and citations to reflect new project identity All functionality remains identical; only naming has changed to align with the new project branding. * docs: update README with EverCore focus and restructured TOC - Add line break before Table of Contents for better visual separation - Rewrite project description to highlight EverCore as the central component - Reorder directory tree to prioritize benchmarks and methods over use-cases - Update use-cases list with more examples and clarify they are templates - Improve flow from Quick Start to use-cases to benchmarks * docs: update README with clearer methods description and benchmarks Add benchmark numbers directly in the method summaries for better visibility. Clarify introductory text to emphasize choice and composition of methods. * docs: fix markdown formatting in README table of contents Adjust whitespace and line breaks to ensure proper rendering of the collapsible table of contents section.
…d-AI#204) - Replace specific EverMemBench-Dynamic badge with general EverMind-AI HuggingFace badge - Remove redundant License badge - Change "Methods" section heading to "Architecture Methods" - Update sub-section headings from h4 (####) to h3 (###) for better hierarchy
…rMind-AI#208) * docs: restructure README and add AGENTS.md for better navigation - Reorder sections to emphasize architecture methods and use cases - Move use cases section before quick start for better flow - Rename "Methods" to "Architecture Methods" for clarity - Add AGENTS.md with quick commands and key entry points - Update section headers to improve document hierarchy - Maintain all existing content while improving organization * docs: add community and contribution files * docs: reorder README directory tree for logical grouping * docs: move community files to .github/ and update references * ci: change deploy workflow trigger from feature branch to main
* docs: restructure README and add subdirectory guides Move the directory tree from the main README to new dedicated README files for each top-level folder (use-cases, methods, benchmarks). Add detailed introductions and tables to guide users to the appropriate subprojects. This improves navigation and provides clear entry points for different use cases. * docs: expand showcase section with new projects and links Add six new project entries to the README showcase, each with a banner image, description, and code/plugin link. Also update an existing benchmark entry to include a dataset link. This enhances the repository's demonstration of real-world applications and available resources.
* docs(readme): update project links and formatting * docs(use-cases): enhance README with visual catalogue of demos Expand the use cases section from a simple table to a detailed visual catalogue with project banners, descriptions, and links. This improves user engagement and provides a better showcase of community integrations and demos. * docs: update READMEs and add validation for use-case links
* docs: update plugin repository link in README * docs(readme): update banner gif link
* docs(readme): add four new use case entries * docs(readme): update outdated banner links to correct github repos
…e-demo-content-payload Fix EverCore demo memory payload
…actions-hygiene Harden GitHub Actions workflows
…bot-config Add Dependabot configuration
…adme-quickstart docs: verify EverCore quickstart path
…I#236) Delete deprecated EvoAgentBench, EverMemBench benchmark suites and HyperMem memory system implementation, including all associated configurations, scripts, and supporting assets.
…Filters DSL API
The example plugin's memory recall never worked against the v1 backend.
searchMemories spoke the v0 dialect on both sides:
- Request: GET /api/v1/memories/search with a flat top-level user_id and a
retrieve_method field. The v1 route is POST-only (GET -> 405); even as POST,
SearchMemoriesRequest requires a Filters DSL object (user_id/group_id must sit
inside `filters`), so a flat top-level user_id -> 422 "Field required: filters";
and the method field is `method`, not `retrieve_method`.
- Response: it read r.result.memories / r.result.pending_messages, but the v1
response is { data: { episodes, profiles, raw_messages, ... } }, so even a
successful call surfaced zero memories.
Migrate searchMemories to the v1 contract end-to-end while preserving its return
shape (parseSearchResponse and the assembler are untouched): build the v1 POST
envelope with filters:{user_id,group_id?} + method, and map data.episodes ->
memories (tagging memory_type so the episodic filter matches) and
data.raw_messages -> pending_messages (flattening content_items to text).
Verified live against EverCore on :1995: old GET -> 405; flat top-level user_id
(POST) -> 422 "Field required: filters"; fixed body (POST + filters + method) ->
200 with "filters_applied":{"user_id":...}; the real searchMemories() driven
end-to-end (method=keyword) returns status:"ok" and maps the response with no
error. Adds offline test/search-memories.test.js (node --test) asserting the v1
request envelope and that the v1 response maps into the caller contract and is
consumable by the existing parseSearchResponse (2 passed).
The v1 demo migration (EverMind-AI#191, PR EverMind-AI#196) covered methods/evermemos/demo/* and docs
but not this example plugin; this finishes that migration for the plugin's search
path. Scope: src/api.js (searchMemories only) + its regression test. saveMemories
is migrated separately as the EverMind-AI#237 fix.
Co-authored-by: CZH-THU <CZH-THU@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
The OpenClaw example plugin's memory recall never worked against the v1
backend.
searchMemories(examples/openclaw-plugin/src/api.js) still spoke thev0 dialect on both the request and the response side:
Request — it sent
GET /api/v1/memories/searchwith a flat top-leveluser_idand aretrieve_methodfield. Against the v1 API that fails twice:SearchMemoriesRequestrequires a Filters DSL object(
filtersmust carryuser_id/group_idat the first level), so a flattop-level
user_idreturns 422 "Field required: filters";method, notretrieve_method.Response — it read
r.result.memories/r.result.pending_messages, but thev1 response is
{ data: { episodes, profiles, raw_messages, ... } }. So even asuccessful call surfaced zero memories.
This PR migrates
searchMemoriesto the v1 contract end-to-end while preservingthe function's return shape (so
parseSearchResponseand the assembler areuntouched):
POST+filters: { user_id, group_id? }+method(mapped fromretrieve_method) +query/top_k/memory_types.data.episodes → memories(taggingmemory_type: "episodic_memory"so the downstream episodic filter matches; carryingsummary/episode/subject/score/timestamp), anddata.raw_messages → pending_messages(flatteningcontent_itemsto text).Verification
Live against a running EverCore (
:1995):GET …/search→ 405; flat top-leveluser_id(POST) → 422"Field required: filters".
POST+filters:{user_id}+method) → HTTP 200, withthe response echoing
"filters_applied": {"user_id": "…"}.searchMemories()driven end-to-end against:1995(
method=keyword) returnsstatus: "ok"and maps the response with no error.Offline regression — adds
test/search-memories.test.js(node --test, nolive stack):
POSTwhose body carriesfilters: { user_id }(notop-level
user_id) andmethod(noretrieve_method), with onlybackend-searchable
memory_types;{ data: { episodes, raw_messages } }response and assertsit maps into
{ memories, pending_messages }and that the existingparseSearchResponseconsumes the mapped shape into the expected episodic /pending text.
cd methods/EverCore/examples/openclaw-plugin node --test test/search-memories.test.jsResult: 2 passed.
Scope
Surgical:
src/api.js(searchMemoriesonly) + its new regression test. The v1demo migration (#191, PR #196) covered
methods/evermemos/demo/*and docs butnot this example plugin, so the plugin's search path was left on v0. This PR
finishes that migration for the plugin. Does not touch
saveMemories(shippedseparately as the #237 fix).
Credit
Builds on prior art:
endpoints (the POST
/searchroute this aligns the client to).Co-authored-by: CZH-THU CZH-THU@users.noreply.github.com
Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com
🤖 Generated with Claude Code