Skip to content

WebSurferAgent

fastagency.runtimes.autogen.agents.websurfer.WebSurferAgent #

WebSurferAgent(
    *args: Any,
    name: str,
    llm_config: dict[str, Any],
    summarizer_llm_config: dict[str, Any],
    executor: Union[
        ConversableAgent, list[ConversableAgent]
    ],
    system_message: str = "You are a web surfer",
    bing_api_key: Optional[str] = None,
    **kwargs: Any
)

Bases: AssistantAgent

Initialize the WebSurferAgent.

PARAMETER DESCRIPTION
*args

The positional arguments.

TYPE: Any DEFAULT: ()

name

The name of the agent.

TYPE: str

llm_config

The LLM configuration.

TYPE: dict[str, Any]

summarizer_llm_config

The summarizer LLM configuration.

TYPE: dict[str, Any]

executor

The executor agent(s).

TYPE: Union[ConversableAgent, list[ConversableAgent]]

system_message

The system message.

TYPE: str DEFAULT: 'You are a web surfer'

bing_api_key

The Bing API key

TYPE: Optional[str] DEFAULT: None

**kwargs

The keyword arguments.

TYPE: Any DEFAULT: {}

Source code in fastagency/runtimes/autogen/agents/websurfer.py
def __init__(
    self,
    *args: Any,
    name: str,
    llm_config: dict[str, Any],
    summarizer_llm_config: dict[str, Any],
    executor: Union[ConversableAgent, list[ConversableAgent]],
    system_message: str = "You are a web surfer",
    bing_api_key: Optional[str] = None,
    **kwargs: Any,
):
    """Initialize the WebSurferAgent.

    Args:
        *args (Any): The positional arguments.
        name (str): The name of the agent.
        llm_config (dict[str, Any]): The LLM configuration.
        summarizer_llm_config (dict[str, Any]): The summarizer LLM configuration.
        executor (Union[ConversableAgent, list[ConversableAgent]]): The executor agent(s).
        system_message (str): The system message.
        bing_api_key (Optional[str]): The Bing API key
        **kwargs (Any): The keyword arguments.
    """
    super().__init__(
        *args,
        name=name,
        system_message=system_message,
        llm_config=llm_config,
        **kwargs,
    )
    self.web_surfer_tool = WebSurferTool(
        name_prefix="Web_Surfer",
        llm_config=llm_config,
        summarizer_llm_config=summarizer_llm_config,
        bing_api_key=bing_api_key,
    )
    self.web_surfer_tool.register(caller=self, executor=executor)

web_surfer_tool instance-attribute #

web_surfer_tool = WebSurferTool(
    name_prefix="Web_Surfer",
    llm_config=llm_config,
    summarizer_llm_config=summarizer_llm_config,
    bing_api_key=bing_api_key,
)