AutoGPT
                                
                                 AutoGPT copied to clipboard
                                
                                    AutoGPT copied to clipboard
                            
                            
                            
                        Improve browse_website by using a hidden browser instance
Background
Currently, the browse_website command creates a browser instance on top of all windows and then closes it when it's done. In order to prevent the user from being interrupted from other tasks on their computer, we could start a hidden browser instance when the browse_website command is run for the first time and leave it open for the duration of the AutoGPT session.
Changes
The web_selenium.py file was modified to implement the functionality described above. This creates a hidden browser instance when the browse_website command is run for the first time, and it is left open for the duration of the AutoGPT session.
Documentation
Test Plan
After instructing AutoGPT to browse various webpages, the functionality seems to work fine.
PR Quality Checklist
- [x] My pull request is atomic and focuses on a single change.
- [x] I have thoroughly tested my changes with multiple different prompts.
- [x] I have considered potential risks and mitigations for my changes.
- [x] I have documented my changes clearly and comprehensively.
- [x] I have not snuck in any "extra" small tweaks changes
@BillSchumacher @nponeccop a review would be appreciated, thanks!
I tried running it and got the following error:

Also, I think it would be prudent to make the hidden browser optional.
@jacobtohahn There are conflicts now
@yudikubota Interesting, when I ran it it worked with no errors. I'll look into that. Making this optional is a good idea. How would you suggest I go about doing that?
@nponeccop Thanks, will resolve
@jacobtohahn PR https://github.com/Significant-Gravitas/Auto-GPT/pull/1670 proposes the --no-gui argument. We could merge both.
@jacobtohahn There are conflicts now
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Is this PR still relevant after the fixes of the past few days? Like #1473
This is a mass message from the AutoGPT core team. Our apologies for the ongoing delay in processing PRs. This is because we are re-architecting the AutoGPT core!
For more details (and for infor on joining our Discord), please refer to: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting
Is this PR still relevant after the fixes of the past few days? Like #1473
probably not... (at least AFAIK)
Support for using a hidden browser was added in #1473. We don't keep the browser open, but I don't see the added value of that overall, since there are plenty of cases in which the browser is not used very much, and keeping it open would just be a waste of resources there.
We might reconsider in the future, but for now I'm closing this PR. Thanks for submitting though!