Web Browser Tools
WebBrowser Tools enable an Agent to open a URL in a web browser.
Example
1from kern.agent import Agent2from kern.models.google import Gemini3from kern.tools.hackernews import HackerNewsTools4from kern.tools.webbrowser import WebBrowserTools56agent = Agent(7 model=Gemini("gemini-2.0-flash"),8 tools=[WebBrowserTools(), HackerNewsTools()],9 instructions=[10 "Find related articles using HackerNews",11 "Use web browser to open the site",12 ],13 markdown=True,14)15agent.print_response("Find an article explaining MCP and open it in the web browser.")Toolkit Params
| Parameter | Type | Default | Description |
|---|---|---|---|
enable_open_page | bool | True | Enables functionality to open URLs in browser |
all | bool | False | Enables all functionality when set to True |
Toolkit Functions
| Function | Description |
|---|---|
open_page | Opens a URL in a web browser |