Mozilla-Ocho / Memory-Cache

MemoryCache is an experimental development project to turn a local desktop environment into an on-device AI agent
https://memorycache.ai/
Mozilla Public License 2.0
536 stars 23 forks source link

Feature Idea: Ingest from Bookmarks folder #53

Open tomjorquera opened 5 months ago

tomjorquera commented 5 months ago

The current setup needing to patch Firefox and add an extension got me thinking about other ways to get data from the browser.

I knew it's relatively easy to read the places.sqlite file of a profile (containing the browsing history and bookmarks), so I got the following idea I would like to submit:

The user could create a specific bookmark folder, and all the bookmarks put in it would be automatically ingested into the document DB.

That way no special setup would be needed on the browser to use Memory-Cache with it.

I implemented a PoC in the branch ingest-bookmark of my privateGPT fork. This branch adds the ingest_bookmarks.py script, that needs an environment variable BOOKMARK_FOLDER to be defined. It reads the content of the user default profile to get all the bookmarks of this folder, fetch the page content for each bookmark and ingest them into the docs database.

For this PoC the script currently needs to be manually run, and will re-import all the bookmarks each time. It can be improved to only ingest new bookmarks, to allow overriding the selected user profile and so on.