Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a web surfer agent that can search and browse the web. #1093

Merged
merged 16 commits into from
Jan 22, 2024

Conversation

afourney
Copy link
Member

Why are these changes needed?

At present, AutoGen agents need to write code, or be set up with specific function-calling routines to gather information from the web. Inspired by OpenAI's WebGPT work, this PR adds a stateful agent that can command a (simulated) web browser. Add a WebSurferAgent to any conversation to instantly and seamlessly add web content and browsing abilities to your workflows.

This simulated web browser uses Bing web search and renders all webpages as Markdown. It supports a stateful scrollable viewport (to save you context tokens), as well as actions on that viewport (e.g., page up, page down, find on page). Given that this is largely driven by the python requests library and BeautifulSoup, JavaScript and other modern web content are not supported directly. In the future, this simulated browser can be replaced with a real headless browser (e.g., powered by Selenium).

Related issue number

Supersedes #888
Addresses: #287, #132 etc.

Checks

…s. WebSurfer will be added in a subsequent commit.
@afourney afourney self-assigned this Dec 29, 2023
@afourney afourney changed the title Initial commit of WebSurfer. Adds the browser_utils, and related test… Add a web surfer agent that can search and browse the web. Dec 29, 2023
@codecov-commenter
Copy link

codecov-commenter commented Dec 29, 2023

Codecov Report

Attention: 124 lines in your changes are missing coverage. Please review.

Comparison is base (ca56782) 34.57% compared to head (7604a5a) 45.18%.
Report is 1 commits behind head on main.

Files Patch % Lines
autogen/browser_utils.py 65.42% 56 Missing and 9 partials ⚠️
autogen/agentchat/contrib/web_surfer.py 54.26% 44 Missing and 15 partials ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1093       +/-   ##
===========================================
+ Coverage   34.57%   45.18%   +10.61%     
===========================================
  Files          38       40        +2     
  Lines        4587     4904      +317     
  Branches     1060     1185      +125     
===========================================
+ Hits         1586     2216      +630     
+ Misses       2875     2504      -371     
- Partials      126      184       +58     
Flag Coverage Δ
unittests 45.12% <60.88%> (+10.59%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sonichi sonichi enabled auto-merge January 22, 2024 03:42
@sonichi sonichi added this pull request to the merge queue Jan 22, 2024
Merged via the queue into main with commit 708eb4d Jan 22, 2024
103 of 112 checks passed
@sonichi sonichi deleted the web_surfer_agent branch January 22, 2024 03:46
quantum-ciphers pushed a commit to quantum-ciphers/autogen that referenced this pull request Jan 26, 2024
…#1093)

* Initial commit of WebSurfer. Adds the browser_utils, and related tests. WebSurfer will be added in a subsequent commit.

* Added the web surfer agent, and related tests.

* Added a notebook to show how WebSurferAgent works.

* Fixed a typo.

* Updated test_web_surfer for compatibility with microsoft#1110.

* Updated skip_oai logic.

* Fixed code formatting.

* More pre-commit fixes.

* Added block to contrib-openai.yml

* Added block to contrib-openai.yml

* Added hook for BING_API_KEY

* Temporarily commented out other tests, per request.

* Fixed indentation (maybe?)

* Restoring contrib-openai.yml
corleroux pushed a commit to corleroux/autogen that referenced this pull request Jan 30, 2024
…#1093)

* Initial commit of WebSurfer. Adds the browser_utils, and related tests. WebSurfer will be added in a subsequent commit.

* Added the web surfer agent, and related tests.

* Added a notebook to show how WebSurferAgent works.

* Fixed a typo.

* Updated test_web_surfer for compatibility with microsoft#1110.

* Updated skip_oai logic.

* Fixed code formatting.

* More pre-commit fixes.

* Added block to contrib-openai.yml

* Added block to contrib-openai.yml

* Added hook for BING_API_KEY

* Temporarily commented out other tests, per request.

* Fixed indentation (maybe?)

* Restoring contrib-openai.yml
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
* support string alg in tune

* add test, enforce string feasible, support lexico in set_search_priorities in CFO

* fix bug

* fix bug

* fix bug

* fix bug

* fix bugs

* fix yiran

---------

Co-authored-by: “skzhang1” <“[email protected]”>
whiskyboy pushed a commit to whiskyboy/autogen that referenced this pull request Apr 17, 2024
…#1093)

* Initial commit of WebSurfer. Adds the browser_utils, and related tests. WebSurfer will be added in a subsequent commit.

* Added the web surfer agent, and related tests.

* Added a notebook to show how WebSurferAgent works.

* Fixed a typo.

* Updated test_web_surfer for compatibility with microsoft#1110.

* Updated skip_oai logic.

* Fixed code formatting.

* More pre-commit fixes.

* Added block to contrib-openai.yml

* Added block to contrib-openai.yml

* Added hook for BING_API_KEY

* Temporarily commented out other tests, per request.

* Fixed indentation (maybe?)

* Restoring contrib-openai.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants