trading_agent.tools.browser_tabs_tool
¶
The browser_tabs tool: lists, switches between and closes tabs.
Typical usage example:
tool = BrowserTabsTool(session)
BrowserTabsArguments
¶
Bases: BaseModel
The arguments of browser_tabs.
Attributes:
| Name | Type | Description |
|---|---|---|
action |
Literal['list', 'switch', 'close']
|
"list" to see the tabs, "switch" to make one current, "close" to close one. |
tab |
int | None
|
The tab's number from the list, for "switch" and "close". |
BrowserTabsTool
¶
Bases: BrowserTool
Manages tabs.
Source code in src/trading_agent/tools/browser_tool.py
run
async
¶
Runs the tab action.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
arguments
|
BrowserTabsArguments
|
The action and tab number. |
required |
Returns:
| Type | Description |
|---|---|
ToolResult
|
The tabs after the action, or an error. |