Repository navigation
feat(dynaflow): conversation / short-term memory store on DynamoDB (#290) - #336
shivamm-gupta wants to merge 1 commit into
Conversation
|
Thanks @shivamm-gupta — reviewed, and the conversation-memory store (closes #290) looks great. Same situation as #334: it needs a quick rebase onto latest
git fetch upstream && git rebase upstream/development
# resolve: re-apply the memory load-before / persist-after around the new helper calls in run()/arun()
uv run --no-sync mypy && uv run --no-sync pytest -q
git push --force-with-leaseKeep your memory load (before the loop) and persist (after each turn) behavior, but wrap the extracted helpers rather than the old inline loop. Ping me when pushed and I'll re-review + merge. 🙏 (If you rebase #334 first, rebase this one on top of that result so the |
b394a07 to
de040a4
Compare
|
Rebased onto latest \upstream/development! Integrated conversation memory load/persist behavior around the new extracted |
…odeforstartups#290) - Add BaseMemory interface supporting append, get_messages, trim, clear, and scratchpad - Implement WindowMemoryPolicy, TokenBudgetMemoryPolicy, and SummaryMemoryPolicy - Implement InMemoryMemoryStore for testing and fast local agent execution - Implement DynamoDBMemoryStore using single-table schema with type conversions - Integrate memory into ReActAgent supporting multi-turn conversation threads - Add comprehensive moto-based test suite in tests/test_memory.py
de040a4 to
153873b
Compare
|
Rebased onto latest \upstream/development\ (on top of merged #334)! Unifying conversation memory with the checkpointer and new |
Description
Closes #290
Implements short-term conversation memory and scratchpad persistence on Amazon DynamoDB under the dynaflow pillar, complementing dynavec's native long-term semantic vector memory.
Changes
Memory Interface and Policies:
BaseMemoryinterface supportingappend(),get_messages(),trim(),clear(),get_scratchpad(), andset_scratchpad().WindowMemoryPolicy: retains the lastTokenBudgetMemoryPolicy: calculates approximate token costs and trims oldest history to fit a maximum token budget.SummaryMemoryPolicy: compacts overflowing conversation turns into a structured summary message block.In-Memory Store:
InMemoryMemoryStorewith thread-safe locking for local agent loops, debugging, and fast unit tests.DynamoDB-Backed Store:
DynamoDBMemoryStoreconforming to dynavec's single-table schema (pk = "{namespace}#memory#{thread_id}")._to_dynamoand_from_dynamo.Agent Integration:
memorydirectly intoReActAgent(runandarun).thread_idwithout manually threading past message arrays.Verification
tests/test_memory.pycovering:InMemoryMemoryStoreandDynamoDBMemoryStoreCRUD withmotoReActAgentmulti-turn conversation recall across turnspytest tests/test_memory.py tests/test_agents.py(15 passed).ruff checkandruff format.