Skip to content

trading_agent.tools.bash_tool

The shallow base class of the four bash tools, which share one desk's terminal.

Typical usage example:

class BashRunTool(BashTool): ...

BashTool

BashTool(session)

Bases: Tool

A tool that works on the desk's sandboxed terminal.

Creates the tool.

Parameters:

Name Type Description Default
session BashSession

The desk's terminal.

required
Source code in src/trading_agent/tools/bash_tool.py
def __init__(self, session: bash_session_module.BashSession):
    """Creates the tool.

    Args:
        session (bash_session_module.BashSession): The desk's terminal.
    """
    self._session = session