Wire EventMemory as backend for LongTermMemory#1395
Conversation
f570bd7 to
6e45f17
Compare
Signed-off-by: Edwin Yu <[email protected]> Example configs Signed-off-by: Edwin Yu <[email protected]>
280f09d to
da58952
Compare
Signed-off-by: Edwin Yu <[email protected]>
Signed-off-by: Edwin Yu <[email protected]>
456bc43 to
8f6fb0d
Compare
Signed-off-by: Edwin Yu <[email protected]>
4cd2ff6 to
501f052
Compare
Signed-off-by: Edwin Yu <[email protected]>
501f052 to
4704400
Compare
Signed-off-by: Edwin Yu <[email protected]>
6d11900 to
fcd62a9
Compare
|
Signed-off-by: Edwin Yu <[email protected]>
Signed-off-by: Edwin Yu <[email protected]>
Signed-off-by: Edwin Yu <[email protected]>
There was a problem hiding this comment.
Pull request overview
This PR wires EventMemory as an alternative backend for the existing long-term episodic memory, behind a new backend discriminator ("declarative" | "event"). Legacy configs without a backend field continue to deserialize as declarative (backwards compatible), while the configuration wizard now generates event-backed configs by default and offers a vector-store selection (Qdrant / SQLite-USearch / sqlite-vec). The LongTermMemory facade is refactored into a dispatcher between two backend params types, exposing a slimmer public surface (search_scored, delete_episodes, drop_session_partition) and removing the older search / get_episodes / get_matching_episodes / delete_matching_episodes / sanitize_property_filter / episode_from_declarative_memory_episode methods.
Changes:
- Introduce a discriminated
LongTermMemoryConf(DeclarativevsEvent) and corresponding API spec / response / update fields (backend,vector_store,segment_store,properties_schema), with property-type validation at request time. - Add
EventMemory-backed long-term memory: episode-to-event translation, deterministic uuid5 mapping, reserved-key rejection, filter-field validation, metric-aware score thresholding, anddrop_session_partitionfor partition lifecycle. - Update the resource manager to construct/cache segment stores from SQL engines; update the configuration wizard, sample configs, server defaults, and clients (Python SDK + tests) to support the new backend.
Reviewed changes
Copilot reviewed 42 out of 42 changed files in this pull request and generated 20 comments.
Show a summary per file
| File | Description |
|---|---|
sample_configs/episodic_memory_config.{cpu,gpu,nebula}.sample |
Document the new event backend and Qdrant/SQLite vector-store options. |
packages/server/src/memmachine_server/server/api_v2/router.py |
Translate v2 ProjectConfig ⇆ LongTermMemoryConfPartial; expose event-backend fields. |
packages/server/src/memmachine_server/server/api_v2/config_service.py |
Backend-flip handling; surface event-backend fields in config responses. |
packages/server/src/memmachine_server/server/api_v2/config_router.py |
Forward new event-backend fields on PUT. |
packages/server/src/memmachine_server/main/memmachine.py |
Backend-aware LTM default resolution; narrow exception catch. |
packages/server/src/memmachine_server/installation/configuration_wizard.py |
Default to event backend + interactive vector-store selection. |
packages/server/src/memmachine_server/episodic_memory/long_term_memory/ |
New backends, params, service-locator helpers, facade refactor. |
packages/server/src/memmachine_server/episodic_memory/event_memory/segmenter/passthrough_segmenter.py |
New passthrough segmenter implementation. |
packages/server/src/memmachine_server/episodic_memory/event_memory/segment_store/sqlalchemy_segment_store.py |
Map bare filter fields to _<field> instead of raising. |
packages/server/src/memmachine_server/episodic_memory/episodic_memory.py |
Use drop_session_partition() on delete-session. |
packages/server/src/memmachine_server/common/resource_manager/{,resource_manager}.py |
Add get_segment_store and get_episode_storage interfaces. |
packages/server/src/memmachine_server/common/configuration/episodic_config.py |
Discriminated LTM config, new sub-configs, merge resolution. |
packages/common/src/memmachine_common/api/{spec,config_spec}.py |
New backend / event-backend fields and properties_schema validation. |
packages/client/src/memmachine_client/{client,config,project}.py |
Plumb new event-backend params through SDK. |
packages/server/server_tests/**, packages/client/client_tests/** |
New / updated tests for backend switching, event wiring, wizard prompts. |
.github/workflows/{installation,test-server,test-python-client}.yml |
Install all local memmachine_* wheels by direct path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Edwin Yu <[email protected]>
632bc8e to
56eb8bc
Compare
Signed-off-by: Edwin Yu <[email protected]>
56eb8bc to
a35a144
Compare
Purpose of the change
Alternative to #1304.
#1304 added EventMemory as a parallel memory subsystem highly exposed via API.
We want to make large changes only after careful design, so this PR instead adds EventMemory as a backend for the existing long-term memory, with minimal behavioral differences.
Description
No chunking/segmentation, old API.
Type of change
Testing
Checklist
Maintainer Checklist