aj47 / clickolas-cage

a chrome extension that performs web browsing actions autonomously to complete a given goal/task (using LLM as brain).
MIT License
56 stars 11 forks source link

clickolas-cage

a chrome extension that performs web browsing actions autonomously to complete a given goal/task (using LLM as a brain).

image

Demo on youtube

Installing

  1. Check if your Node.js version is >= 14.
  2. Run npm install to install the dependencies.
  3. replace your GEMINI api key in .env.template and rename the file to .env

Developing

run these commands to run everything locally:

$ cd clickolas-cage

$ npm run dev

and in a seperate terminal:

$ npx @portkey-ai/gateway

This runs the chrome extension locally.

To link the running extension to chrome:

  1. set your Chrome browser 'Developer mode' on
  2. click 'Load unpacked', and select clickolas-cage/build folder

The main source files are:

Current Flow

  1. User clicks extension icon, enters and submits goal prompt
  2. Popup.jsx sends a message to background.js with request type 'new_goal'
  3. background.js calls promptToFirstStep() in llm-utils.js
  4. LLM returns starting URL which feeds into navURL()
  5. navURL will open a new tab with the starting URL
  6. getNextStep() is called which will get contentScript to extract clickable elements and send it to LLM to generate next step

Packing

After the development of your extension run the command

$ npm run build

Now, the content of build folder will be the extension ready to be submitted to the Chrome Web Store. Just take a look at the official guide to more infos about publishing.