Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b0c55a8
feat(tools): add use_browser tool to Strands tools repository
jimbrub Jun 16, 2025
cd481da
test(use_browser): add more unit testing for use_browser tool
jimbrub Jun 16, 2025
24c8f69
feat(tools): add retry and multi-tab support to use_browser tool
jimbrub Jun 18, 2025
a6338ce
feat: add more retry logic and environment variables
jimbrub Jun 20, 2025
e188713
fix(use_browser): fix screenshot error and using Playwright specific …
jimbrub Jun 23, 2025
b679d34
fix(use_browser): fix logs and fix how actions are being called, now …
jimbrub Jun 23, 2025
11c2281
fix(use_browser): fix merge conflicts in README file
jimbrub Jun 23, 2025
65aeb9e
Delete src/strands_tools/use_computer.py
jimbrub Jun 23, 2025
dd8988c
test(use_browser): add more unit testing for use_browser tool
jimbrub Jun 16, 2025
4b9961c
Update use_browser.py
jimbrub Jun 23, 2025
139e201
test(use_browser): add more unit testing for use_browser tool
jimbrub Jun 16, 2025
c3793ba
fix(use_browser): fix merge conflicts in README file
jimbrub Jun 23, 2025
cef17cd
feat(use_browser): Added BrowserApiMethods class which has all the br…
jimbrub Jun 24, 2025
a2b871d
feat: Updating readme and pyproject.toml
jimbrub Jun 27, 2025
d0e981f
feat: Adding use_browser tool
jimbrub Jun 27, 2025
c8be34b
fix: fixing README file
jimbrub Jun 27, 2025
fa928d4
fix: fixing dependencies for testing
jimbrub Jun 27, 2025
3896e3a
fix: cleaning logs and updating README file
jimbrub Jun 27, 2025
73bcc90
fix: fixing log statements to pass all checks
jimbrub Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ Strands Agents Tools provides a powerful set of tools for your agents to use. It
- 🧠 **Advanced Reasoning** - Tools for complex thinking and reasoning capabilities
- 🐝 **Swarm Intelligence** - Coordinate multiple AI agents for parallel problem solving with shared memory
- 🔄 **Multiple tools in Parallel** - Call multiple other tools at the same time in parallel with Batch Tool

- 🔍 **Browser Tool** - Tool giving an agent access to perform automated actions on a browser (chromium)

## 📦 Installation

### Quick Install
Expand Down Expand Up @@ -121,6 +122,7 @@ Below is a comprehensive table of all available tools, how to use them with an a
| use_llm | `agent.tool.use_llm(prompt="Analyze this data", system_prompt="You are a data analyst")` | Create nested AI loops with customized system prompts for specialized tasks |
| workflow | `agent.tool.workflow(action="create", name="data_pipeline", steps=[{"tool": "file_read"}, {"tool": "python_repl"}])` | Define, execute, and manage multi-step automated workflows |
| batch| `agent.tool.batch(invocations=[{"name": "current_time", "arguments": {"timezone": "Europe/London"}}, {"name": "stop", "arguments": {}}])` | Call multiple other tools in parallel. |
| use_browser | `agent.tool.use_browser(action="navigate", url="https://www.example.com") ` | Web scraping, automated testing, form filling, web automation tasks |

\* *These tools do not work on windows*

Expand Down Expand Up @@ -301,6 +303,32 @@ result = agent.tool.batch(
)
```

### Use Browser
```python
from strands import Agent
from strands_tools import use_browser

agent = Agent(tools=[use_browser])

# Simple navigation
result = agent.tool.use_browser(action="navigate", url="https://example.com")

# Sequential actions for form filling
result = agent.tool.use_browser(actions=[
{"action": "navigate", "args": {"url": "https://example.com/login"}},
{"action": "type", "args": {"selector": "#username", "text": "[email protected]"}},
{"action": "click", "args": {"selector": "#submit"}}
])

# Web scraping with content extraction
result = agent.tool.use_browser(actions=[
{"action": "navigate", "args": {"url": "https://example.com/data"}},
{"action": "get_text", "args": {"selector": ".content"}},
{"action": "click", "args": {"selector": ".next-page"}},
{"action": "get_html", "args": {"selector": "main"}}
])
```

## 🌍 Environment Variables Configuration

Agents Tools provides extensive customization through environment variables. This allows you to configure tool behavior without modifying code, making it ideal for different environments (development, testing, production).
Expand Down Expand Up @@ -443,6 +471,20 @@ The Mem0 Memory Tool supports three different backend configurations:
| FILE_READ_USE_GIT_DEFAULT | Default setting for using git in time machine mode | true |
| FILE_READ_NUM_REVISIONS_DEFAULT | Default number of revisions to show in time machine mode | 5 |

#### Use Browser Tool

| Environment Variable | Description | Default |
|----------------------|-------------|---------|
| STRANDS_DEFAULT_WAIT_TIME | Default setting for wait time with actions | 1 |
| STRANDS_BROWSER_MAX_RETRIES | Default number of retries to perform when an action fails | 3 |
| STRANDS_BROWSER_RETRY_DELAY | Default retry delay time for retry mechanisms | 1 |
| STRANDS_BROWSER_SCREENSHOTS_DIR | Default directory where screenshots will be saved | screenshots |
| STRANDS_BROWSER_USER_DATA_DIR | Default directory where data for reloading a browser instance is stored | ~/.browser_automation |
| STRANDS_BROWSER_HEADLESS | Default headless setting for launching browsers | false |
| STRANDS_BROWSER_WIDTH | Default width of the browser | 1280 |
| STRANDS_BROWSER_HEIGHT | Default height of the browser | 800 |


## Contributing ❤️

We welcome contributions! See our [Contributing Guide](CONTRIBUTING.md) for details on:
Expand Down
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ dev = [
"responses>=0.6.1,<1.0.0",
"mem0ai>=0.1.104,<1.0.0",
"opensearch-py>=2.8.0,<3.0.0",
"nest-asyncio>=1.5.0,<2.0.0",
"playwright>=1.42.0,<2.0.0",
]
docs = [
"sphinx>=5.0.0,<6.0.0",
Expand Down Expand Up @@ -112,7 +114,10 @@ extra-dependencies = [
"pytest>=8.0.0,<9.0.0",
"pytest-cov>=4.1.0,<5.0.0",
"pytest-xdist>=3.0.0,<4.0.0",
"responses>=0.6.1,<1.0.0"
"responses>=0.6.1,<1.0.0",
"pytest_asyncio>=0.23.0,<1.0.0",
"nest-asyncio>=1.5.0,<2.0.0",
"playwright>=1.42.0,<2.0.0"
]
extra-args = [
"-n",
Expand All @@ -134,7 +139,6 @@ run-cov = [
cov-combine = []
cov-report = []


[tool.hatch.envs.default.scripts]
list = [
"echo 'Scripts commands available for default env:'; hatch env show --json | jq --raw-output '.default.scripts | keys[]'"
Expand Down
Loading