Skip to main content
Version: 2.0.2

agent_helper

AgentHelperInterface Objects

class AgentHelperInterface(ABC)

AgentHelperInterface The AgentHelperInterface is used to provide access to the agent's state

add_variable

@abstractmethod
def add_variable(name: str, type_: type) -> None

Add a variable to the agent's state

Arguments:


  • name str - The name of the variable
  • type type - The type of the variable

get_variable

@abstractmethod
def get_variable(name: str) -> Any

Get the value of a variable

Arguments:


  • name str - The name of the variable

Returns:


  • Any - The value of the variable

set_variable

@abstractmethod
def set_variable(name: str, value: Any) -> None

Set the value of a variable

Arguments:


  • name str - The name of the variable
  • value Any - The value of the variable

get_address

@abstractmethod
def get_address(environment_name: str) -> str | None

Get the address of an agent by its environment name

Arguments:


  • environment_name str - The name of the environment

Returns:


str | None: The address of the agent in the environment

get_addresses

@abstractmethod
def get_addresses() -> dict[str, str]

Get the addresses of the agent in all environments

Returns

dict[str, str]: A dictionary with the environment names as keys and the addresses as values

get_settings

@abstractmethod
def get_settings() -> dict[str, Any]

Get the settings of the agent

Returns

dict[str, Any]: The settings of the agent

get_environment

@abstractmethod
def get_environment(name: str) -> EnvironmentHelperInterface | None

Get an environment by its alias

Arguments:


  • name str - The alias of the environment

Returns:


EnvironmentHelperInterface | None: The environment with the given alias

get_environments

@abstractmethod
def get_environments() -> list[EnvironmentHelperInterface]

Get all environments

Returns

list[EnvironmentHelperInterface]: A list with all environments the agent is in