A Selenium-based tool integration for smolagents, allowing web automation capabilities.
poetry add smolagents-seleniumfrom smolagents import CodeAgent, HfApiModel
from smolagents_selenium import SeleniumTool
# Initialize the tool and agent
selenium_tool = SeleniumTool()
agent = CodeAgent(
tools=[selenium_tool],
model=HfApiModel(),
add_base_tools=True
)
# Run the agent
agent.run("Navigate to https://example.com and get the page content")- Clone the repository
- Install dependencies:
poetry install - Run tests:
poetry run pytest