Repository navigation
Conversation
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.
Purpose: an experimental memory playground
This draft explores whether a small library of named, editable memories is a better foundation than append-only notes. It is a prototype for discussion and iteration, not a production rollout or a claim that memory now makes agents faster.
Based on #155 so the diff stays focused on memory rather than including the existing Code Mode changes again. It can be rebased onto
mainwhen that work lands.Companion application playground: nuclia/data-platform#1334. Consumer-specific storage, prompts, and observations stay there rather than in the framework documentation.
Architectural overview and critical paths
remember,recall, andforgettools; do not add a separate update tool.rememberrequires a short stable name and upserts the corresponding scoped record.forgetalso addresses records by name. Prototype records are disposable: there is no legacy compatibility or migration layer.harness_sdk/memory.pyderives stable IDs from name, scope, and application identity. Conversation/agent IDs are deliberately excluded so a fresh session can reuse the same entry. The common user/project scopes select the applicable identity fields, and applications can additionally provide a stable memory namespace.rememberpoint-reads through the storage protocol, checks scope/namespace, preserves creation time, and replaces the full text after a correction. Identical text is a no-op. Write events distinguishcreatedfromupdatedso consumers do not confuse replacement with memory growth.recallsupports exact-name point reads and bounded topic search: default five results, maximum fifty. The process-local store filters namespaces before applying limits and ranks lexical overlap in names/text. This is intentionally not semantic/vector retrieval.get_memoryand a namespace argument for recall. Deterministic IDs prevent same-key appends, but are not authorization: production adapters must enforce their own tenant/user boundaries. Concurrent writes are last-writer-wins, not compare-and-swap or semantic merging.Why these choices
rememberrather than adding anupdate_memorycapability.These sources motivate the experiment; they do not establish that this particular implementation is optimal. Domain-specific policies about what to remember belong to the application, not the generic framework.
Deliberate limitations / open questions