autogen_ext.agents.file_surfer#

class FileSurfer(name: str, model_client: ChatCompletionClient, description: str = 'An agent that can handle local files.')[source]#

Bases: BaseChatAgent

An agent, used by MagenticOne, that acts as a local file previewer. FileSurfer can open and read a variety of common file types, and can navigate the local file hierarchy.

DEFAULT_DESCRIPTION = 'An agent that can handle local files.'#
DEFAULT_SYSTEM_MESSAGES = [SystemMessage(content='\n        You are a helpful AI Assistant.\n        When given a user query, use available functions to help the user with their request.')]#
async on_messages(messages: Sequence[TextMessage | MultiModalMessage | StopMessage | HandoffMessage], cancellation_token: CancellationToken) Response[source]#

Handles incoming messages and returns a response.

async on_reset(cancellation_token: CancellationToken) None[source]#

Resets the agent to its initialization state.

property produced_message_types: List[type[TextMessage | MultiModalMessage | StopMessage | HandoffMessage]]#

The types of messages that the agent produces.