Toggle Menu
Prev Up Next

# `langchain_experimental.autonomous_agents.autogpt.agent`.AutoGPT

class langchain_experimental.autonomous_agents.autogpt.agent.AutoGPT(ai_name: str, memory: VectorStoreRetriever, chain: LLMChain, output_parser: BaseAutoGPTOutputParser, tools: List[BaseTool], feedback_tool: Optional[HumanInputRun] = None, chat_history_memory: Optional[BaseChatMessageHistory] = None)

  Agent for interacting with AutoGPT.

  Methods

  `__init__`(ai_name, memory, chain, ...[, ...]) |
  `from_llm_and_tools`(ai_name, ai_role, memory, ...) |
  `run`(goals) |

  Parameters

    - ai_name (str) –

    - memory (VectorStoreRetriever) –

    - chain (LLMChain) –

    - output_parser (BaseAutoGPTOutputParser) –

    - tools (List[BaseTool]) –

    - feedback_tool (Optional[HumanInputRun]) –

    - chat_history_memory (Optional[BaseChatMessageHistory]) –

  __init__(ai_name: str, memory: VectorStoreRetriever, chain: LLMChain, output_parser: BaseAutoGPTOutputParser, tools: List[BaseTool], feedback_tool: Optional[HumanInputRun] = None, chat_history_memory: Optional[BaseChatMessageHistory] = None)
    Parameters

      - ai_name (str) –

      - memory (VectorStoreRetriever) –

      - chain (LLMChain) –

      - output_parser (BaseAutoGPTOutputParser) –

      - tools (List[BaseTool]) –

      - feedback_tool (Optional[HumanInputRun]) –

      - chat_history_memory (Optional[BaseChatMessageHistory]) –

  classmethod from_llm_and_tools(ai_name: str, ai_role: str, memory: VectorStoreRetriever, tools: List[BaseTool], llm: BaseChatModel, human_in_the_loop: bool = False, output_parser: Optional[BaseAutoGPTOutputParser] = None, chat_history_memory: Optional[BaseChatMessageHistory] = None) → AutoGPT
    Parameters

      - ai_name (str) –

      - ai_role (str) –

      - memory (VectorStoreRetriever) –

      - tools (List[BaseTool]) –

      - llm (BaseChatModel) –

      - human_in_the_loop (bool) –

      - output_parser (Optional[BaseAutoGPTOutputParser]) –

      - chat_history_memory (Optional[BaseChatMessageHistory]) –

    Return type

      AutoGPT

  run(goals: List[str]) → str
    Parameters

      goals (List[str]) –

    Return type

      str