Skip to content

Commit

Permalink
Merge pull request #16 from ZkAGI/maintenance_fixes
Browse files Browse the repository at this point in the history
📝Readme updates:replacing repo name to ZkSurfer
  • Loading branch information
SAHU-01 authored Apr 17, 2024
2 parents d25227f + 5237549 commit 631c7ce
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

# ZkSurfer AI: Full Browser Automation

autosurf uses GPT-4 to control your browser and perform repetitive actions on your behalf. Currently it allows you to define ad-hoc instructions. In the future it will also support saved and scheduled workflows.
ZkSurfer uses GPT-4 to control your browser and perform repetitive actions on your behalf. Currently it allows you to define ad-hoc instructions. In the future it will also support saved and scheduled workflows.


autosurf is fully open-source, and we don't send any page contents or instructions to our servers.
ZkSurferF is fully open-source, and we don't send any page contents or instructions to our servers.


## Table of Contents
Expand Down Expand Up @@ -39,22 +39,22 @@ Currently this extension is only available through this GitHub repo. We'll relea

1. Once installed, the browser plugin will be available in two forms:
1. As a Popup. Activate by pressing `cmd+shift+y` on mac or `ctrl+shift+y` on windows/linux, or by clicking the extension logo in your browser.
2. As a devtools panel. Activate by first opening the browser's developer tools, then navigating to the `autosurf AI` panel.
2. As a devtools panel. Activate by first opening the browser's developer tools, then navigating to the `ZkSurfer AI` panel.
2. The next thing you need to do is create or access an existing [OpenAI API Key](https://platform.openai.com/account/api-keys) and paste it in the provided box. This key will be stored securely in your browser, and will not be uploaded to a third party.
3. Finally, navigate to a webpage you want autosurf to act upon (for instance the [OpenAI playground](https://platform.openai.com/playground)) and start experimenting!
3. Finally, navigate to a webpage you want ZkSurfer to act upon (for instance the [OpenAI playground](https://platform.openai.com/playground)) and start experimenting!

## How it Works - The Action Cycle

1. autosurf runs a content script on the webpage to pull the entire DOM. It simplifies the html it receives to only include interactive or semantically important elements, like buttons or text. It assigns an id to each interactive element. It then "templatizes" the DOM to reduce the token count even further.
2. autosurf sends the simplified DOM, along with the user's instructions, to a selected LLM (currently GPT-3.5 and GPT-4 are supported). autosurf informs the LLM of two methods to interact with the webpage:
1. ZkSurfer runs a content script on the webpage to pull the entire DOM. It simplifies the html it receives to only include interactive or semantically important elements, like buttons or text. It assigns an id to each interactive element. It then "templatizes" the DOM to reduce the token count even further.
2. ZkSurfer sends the simplified DOM, along with the user's instructions, to a selected LLM (currently GPT-3.5 and GPT-4 are supported). ZkSurfer informs the LLM of two methods to interact with the webpage:
1. `click(id)` - click on the interactive element associated with that id
2. `setValue(id, text)` - focus on a text input, clear its existing text, and type the specified text into that input
3. When autosurf gets a completion from the LLM, it parses the response for an action. The action cycle will end at this stage if any of the following conditions are met:
3. When ZkSurfer gets a completion from the LLM, it parses the response for an action. The action cycle will end at this stage if any of the following conditions are met:
1. The LLM believes the task is complete. Instead of an action, the LLM can return an indication that it believes the user's task is complete based on the state of the DOM and the action history up to this point.
2. The user stopped the task's execution. The user can stop the LLM's execution at any time, without waiting for it to complete.
3. There was an error. autosurf's safety-first architecture causes it to automatically halt execution in the event of an unexpected response.
4. autosurf executes the action using the [chrome.debugger API](https://developer.chrome.com/docs/extensions/reference/debugger/).
5. The action is added to the action history and autosurf cycles back to step 1 and parses the updated DOM. All prior actions are sent to the LLM as part of the prompt used to determine the next action. autosurf can currently complete a maximum of 50 actions for a single task, though in practice most tasks require fewer than 10 actions.
3. There was an error. ZkSurfer's safety-first architecture causes it to automatically halt execution in the event of an unexpected response.
4. ZkSurfer executes the action using the [chrome.debugger API](https://developer.chrome.com/docs/extensions/reference/debugger/).
5. The action is added to the action history and ZkSurfer cycles back to step 1 and parses the updated DOM. All prior actions are sent to the LLM as part of the prompt used to determine the next action. ZkSurfer can currently complete a maximum of 50 actions for a single task, though in practice most tasks require fewer than 10 actions.


## Tech Stack
Expand Down

0 comments on commit 631c7ce

Please sign in to comment.