diff --git a/autogen/agentchat/contrib/captainagent.py b/autogen/agentchat/contrib/captainagent.py index 7a9a15e4c6..0611ce94ae 100644 --- a/autogen/agentchat/contrib/captainagent.py +++ b/autogen/agentchat/contrib/captainagent.py @@ -138,6 +138,7 @@ def __init__( human_input_mode: Optional[str] = "NEVER", code_execution_config: Optional[Union[Dict, Literal[False]]] = False, nested_config: Optional[Dict] = None, + agent_config_save_path: Optional[str] = None, description: Optional[str] = DEFAULT_DESCRIPTION, **kwargs, ): @@ -154,6 +155,9 @@ def __init__( max_consecutive_auto_reply (int): 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". + nested_config (dict): the configuration for the nested chat instantiated by CaptainAgent. + A full list of keys and their functionalities can be found in [docs](https://ag2ai.github.io/ag2/docs/topics/captainagent/configurations). + agent_config_save_path (str): the path to save the generated or retrieved agent configuration. **kwargs (dict): Please refer to other kwargs in [ConversableAgent](https://github.com/ag2ai/ag2/blob/main/autogen/agentchat/conversable_agent.py#L74). """ @@ -178,6 +182,7 @@ def __init__( name="CaptainAgent", system_message=system_message, llm_config=llm_config, + agent_config_save_path=agent_config_save_path, ) self.assistant.update_tool_signature(self.AUTOBUILD_TOOL, is_remove=False) @@ -185,6 +190,7 @@ def __init__( name="Expert_summoner", code_execution_config=code_execution_config, nested_config=nested_config, + is_termination_msg=lambda x: x.get("content", "") and "terminate" in x.get("content", "").lower(), human_input_mode="NEVER", ) @@ -201,7 +207,6 @@ def __init__( } ], trigger=UserProxyAgent, - # reply_func_from_nested_chats=None, position=0, )