PR isolating the the embedding similarity based memory addition/retrieval/update function from LM-powered memory optimization #2
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.
Objective
The original implementation from the fork makes LM powered memory optimization mandatory upon addition and update. However, the current LM manager class has semi-broken prompting which occasionally causes non-compliance on the LM end, resulting in wrongly formatted outputs -> errors during that optimization process. This PR isolates the basic memory operations from the semi-broken LM optimization to get the memory class to minimal yet stable working status. Future PRs will replace the LM manager with DSPy backend (as the repo name suggests) and re-introduce the removed LM optimization functionality.
Adds:
agentic_memory/memory_note.py: helper data class from the original fork, promoted to its own module and refactored withpydantic.BaseModelfor organized type checking and factory methods.Refactors:
agentic_memory/memory_system.py: removed all LM components, applied some fixes to make the add/search/update work.tests/test_memory_system.py: moved from unittest to pytest and rewrote tests to test only the core memory functionality