Add MongoDB-backed NotesTool with CRUD actions and unit tests#1982
Add MongoDB-backed NotesTool with CRUD actions and unit tests#1982dartpain merged 9 commits intoarc53:mainfrom
Conversation
|
@dhairya-eng is attempting to deploy a commit to the Arc53 Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thank you for your PR, I have 2 comments: user_id should come from decoded_token, "sub" property, this ensures safety. |
Ok I will work on this |
… user_id, fix tests
|
Thanks for the review |
|
Seems like you accidentally commited: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1982 +/- ##
===========================================
+ Coverage 24.36% 35.09% +10.73%
===========================================
Files 106 132 +26
Lines 8057 8773 +716
===========================================
+ Hits 1963 3079 +1116
+ Misses 6094 5694 -400 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
sure I will do that |
|
Pushed with new updates |
|
Did you find any issues while reviewing the code? |
|
Can you add me in the contributer list if possible. |
📖 Description
This PR implements a new NotesTool that allows LLMs to write, edit, retrieve, and delete notes. Notes are persisted in MongoDB, enabling agents to maintain and manipulate contextual information across interactions.
🔖 Feature Details
New Tool: NotesTool in application/agents/tools/notes.py
Actions supported:
add_note → store a note in MongoDB
get_notes → retrieve all notes for a user
edit_note → update a note by its ID
delete_note → remove a note by its ID
🧪 Testing
Added tests/test_notes_tool.py with unit tests covering all CRUD actions
Verified that pytest passes locally with all tests green
Ensures compliance with PEP8, type hints, and Google-style docstrings
ruff check passes
🎤 Why this is needed
Enables LLMs to perform more complex multi-step tasks by persisting intermediate notes. Improves agent reasoning and task management capabilities.
🔗 Issue Reference
Fixes #1965
✅ Checklist
Code follows PEP8 and repo coding standards
Added unit tests for all new functionality
All tests pass locally (pytest)
Lint checks pass (ruff)