Wire EventMemory as backend for LongTermMemory - #1395
Conversation
f570bd7 to
6e45f17
Compare
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com> Example configs Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
280f09d to
da58952
Compare
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
456bc43 to
8f6fb0d
Compare
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
4cd2ff6 to
501f052
Compare
501f052 to
4704400
Compare
6d11900 to
fcd62a9
Compare
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
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
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
632bc8e to
56eb8bc
Compare
Signed-off-by: Edwin Yu <edwinyyyu@gmail.com>
56eb8bc to
a35a144
Compare
…pdate eval scripts for LongTermMemory backend split - Make AmazonBedrockRerankerConf inherit AWSCredentialsMixin so AWS credentials are optional with env-var fallback, enabling SSO/profile/login-based auth - Update RerankerManager to only pass explicit credentials to boto3 when set, falling back to the default credential chain otherwise - Fix agent_utils.py to use DeclarativeBackendParams after MemMachine#1395 changed LongTermMemoryParams to a backend-discriminated union - Add tests for no-creds and env-creds paths, remove obsolete required-field test
…pdate eval scripts for LongTermMemory backend split - Make AmazonBedrockRerankerConf inherit AWSCredentialsMixin so AWS credentials are optional with env-var fallback, enabling SSO/profile/login-based auth - Update RerankerManager to only pass explicit credentials to boto3 when set, falling back to the default credential chain otherwise - Fix agent_utils.py to use DeclarativeBackendParams after MemMachine#1395 changed LongTermMemoryParams to a backend-discriminated union - Add tests for no-creds and env-creds paths, remove obsolete required-field test
…pdate eval scripts for LongTermMemory backend split - Make AmazonBedrockRerankerConf inherit AWSCredentialsMixin so AWS credentials are optional with env-var fallback, enabling SSO/profile/login-based auth - Update RerankerManager to only pass explicit credentials to boto3 when set, falling back to the default credential chain otherwise - Fix agent_utils.py to use DeclarativeBackendParams after MemMachine#1395 changed LongTermMemoryParams to a backend-discriminated union - Add tests for no-creds and env-creds paths, remove obsolete required-field test
…pdate eval scripts for LongTermMemory backend split - Make AmazonBedrockRerankerConf inherit AWSCredentialsMixin so AWS credentials are optional with env-var fallback, enabling SSO/profile/login-based auth - Update RerankerManager to only pass explicit credentials to boto3 when set, falling back to the default credential chain otherwise - Fix agent_utils.py to use DeclarativeBackendParams after MemMachine#1395 changed LongTermMemoryParams to a backend-discriminated union - Add tests for no-creds and env-creds paths, remove obsolete required-field test
…pdate eval scripts for LongTermMemory backend split - Make AmazonBedrockRerankerConf inherit AWSCredentialsMixin so AWS credentials are optional with env-var fallback, enabling SSO/profile/login-based auth - Update RerankerManager to only pass explicit credentials to boto3 when set, falling back to the default credential chain otherwise - Fix agent_utils.py to use DeclarativeBackendParams after MemMachine#1395 changed LongTermMemoryParams to a backend-discriminated union - Add tests for no-creds and env-creds paths, remove obsolete required-field test

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