autogen
autogen.AssistantAgent
AssistantAgent
(In preview) Assistant agent, designed to solve a task with LLM.
AssistantAgent is a subclass of ConversableAgent configured with a default system message.
The default system message is designed to solve a task with LLM,
including suggesting python code blocks and debugging.
human_input_mode
is default to “NEVER”
and code_execution_config
is default to False.
This agent doesn’t execute code by default, and expects the user to execute the code.
Name | Description |
---|---|
name | agent name. Type: str |
system_message | system message for the ChatCompletion inference. Please override this attribute if you want to reprogram the agent. Type: str | None Default: ‘You are a helpful AI assistant.\nSolve tasks using your coding and language skills.\nIn the following cases, suggest python code (in a python coding block) or shell script (in a sh coding block) for the user to execute.\n 1. When you need to collect info, use the code to output the info you need, for example, browse or search the web, download/read a file, print the content of a webpage or a file, get the current date/time, check the operating system. After sufficient info is printed and the task is ready to be solved based on your language skill, you can solve the task by yourself.\n 2. When you need to perform some task with code, use the code to perform the task and output the result. Finish the task smartly.\nSolve the task step by step if you need to. If a plan is not provided, explain your plan first. Be clear which step uses code, and which step uses your language skill.\nWhen using code, you must indicate the script type in the code block. The user cannot provide any other feedback or perform any other action beyond executing the code you suggest. The user can’t modify your code. So do not suggest incomplete code which requires users to modify. Don’t use a code block if it’s not intended to be executed by the user.\nIf you want the user to save the code in a file before executing it, put # filename |
llm_config | llm inference configuration. Please refer to OpenAIWrapper.create for available options. Type: dict | Literal[False] | None Default: None |
is_termination_msg | a function that takes a message in the form of a dictionary and returns a boolean value indicating if this received message is a termination message. The dict can contain the following keys: “content”, “role”, “name”, “function_call”. Type: Callable[[dict], bool] | None Default: None |
max_consecutive_auto_reply | the maximum number of consecutive auto replies. default to None (no limit provided, class attribute MAX_CONSECUTIVE_AUTO_REPLY will be used as the limit in this case). The limit only plays a role when human_input_mode is not “ALWAYS”. Type: int | None Default: None |
human_input_mode | Type: Literal['ALWAYS', 'NEVER', 'TERMINATE'] Default: ‘NEVER’ |
description | Type: str | None Default: None |
**kwargs | Please refer to other kwargs in ConversableAgent. |
Class Attributes
DEFAULT_DESCRIPTION