Skip to content

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

Merged
sonichi merged 16 commits into
mainfrom
web_surfer_agent
Jan 22, 2024
Merged

Add a web surfer agent that can search and browse the web.#1093
sonichi merged 16 commits into
mainfrom
web_surfer_agent

Conversation

@afourney

Copy link
Copy Markdown
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

codecov-commenter commented Dec 29, 2023

Copy link
Copy Markdown

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.

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