-
Notifications
You must be signed in to change notification settings - Fork 7.7k
feat: Add memory order parameter to Agent component #10010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Add memory_order dropdown input with Ascending/Descending options - Set as advanced parameter with default "Ascending" - Update get_memory_data() to use configurable order instead of hardcoded "Ascending" - Add memory_order to exclusion list in get_base_args() This allows users to control whether chat history is retrieved in chronological order (oldest first) or reverse chronological order (newest first). 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughAdds a new public input memory_order (Ascending/Descending) to AgentComponent, uses it in get_memory_data to control message retrieval order, and includes memory_order in update_build_config’s required keys. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant A as AgentComponent
participant M as MemoryStore
U->>A: Build/run with memory_order (Ascending/Descending)
Note over A: New input: memory_order
A->>M: get_messages(order=memory_order)
M-->>A: messages (ordered)
A-->>U: Output using retrieved messages
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Pre-merge checks and finishing touches❌ Failed checks (1 error, 3 warnings)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🧪 Early access (Sonnet 4.5): enabledWe are currently testing the Sonnet 4.5 model, which is expected to improve code review quality. However, this model may lead to increased noise levels in the review comments. Please disable the early access features if the noise level causes any inconvenience. Note:
Comment |
- Fix bug where descending order would return oldest N messages instead of newest N - When order="DESC", take first N messages (newest) instead of last N messages - Optimize internal memory to use limit parameter directly instead of post-filtering This ensures that regardless of sort order, we always keep the most recent N messages. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #10010 +/- ##
=======================================
Coverage 23.25% 23.25%
=======================================
Files 1090 1090
Lines 39855 39855
Branches 5531 5531
=======================================
Hits 9270 9270
Misses 30414 30414
Partials 171 171
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
- Change limit parameter logic to handle None values explicitly, ensuring that the default limit of 10000 is applied when n_messages is not provided.
- Updated the code_hash in the metadata section for the Custom Component Generator, Meeting Summary, and Memory Chatbot JSON files to ensure consistency across projects. - The changes reflect the latest implementation of the MemoryComponent, which handles message storage and retrieval effectively.
- Updated the code_hash in the metadata section for the Custom Component Generator, Meeting Summary, and Memory Chatbot JSON files to maintain consistency across projects. - These changes reflect the latest implementation of the MemoryComponent, which effectively manages message storage and retrieval.
|
Summary
memory_order
dropdown parameter to Agent component with options ["Ascending", "Descending"]Changes
DropdownInput
for memory order selectionget_memory_data()
to use configurable order instead of hardcoded "Ascending"get_base_args()
Test plan
Note: This PR should be reviewed after the memory-related fixes in #10008.
🤖 Generated with Claude Code
Summary by CodeRabbit