Home / File/ agent_types.py — langchain Source File

agent_types.py — langchain Source File

Architecture documentation for agent_types.py, a python file in the langchain codebase. 3 imports, 0 dependents.

File python 3 imports 1 classes

Entity Profile

Dependency Diagram

graph LR
  c9851f66_da95_8dd8_3f80_1a7454b3408b["agent_types.py"]
  7ec08df6_88bd_07ab_d50f_0d4c4e429b7e["enum"]
  c9851f66_da95_8dd8_3f80_1a7454b3408b --> 7ec08df6_88bd_07ab_d50f_0d4c4e429b7e
  2485b66a_3839_d0b6_ad9c_a4ff40457dc6["langchain_core._api"]
  c9851f66_da95_8dd8_3f80_1a7454b3408b --> 2485b66a_3839_d0b6_ad9c_a4ff40457dc6
  a1cf359b_dc20_be00_cf73_e72d60eab3d2["langchain_classic._api.deprecation"]
  c9851f66_da95_8dd8_3f80_1a7454b3408b --> a1cf359b_dc20_be00_cf73_e72d60eab3d2
  style c9851f66_da95_8dd8_3f80_1a7454b3408b fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"""Module definitions of agent types together with corresponding agents."""

from enum import Enum

from langchain_core._api import deprecated

from langchain_classic._api.deprecation import AGENT_DEPRECATION_WARNING


@deprecated(
    "0.1.0",
    message=AGENT_DEPRECATION_WARNING,
    removal="1.0",
)
class AgentType(str, Enum):
    """An enum for agent types."""

    ZERO_SHOT_REACT_DESCRIPTION = "zero-shot-react-description"
    """A zero shot agent that does a reasoning step before acting."""

    REACT_DOCSTORE = "react-docstore"
    """A zero shot agent that does a reasoning step before acting.

    This agent has access to a document store that allows it to look up
    relevant information to answering the question.
    """

    SELF_ASK_WITH_SEARCH = "self-ask-with-search"
    """An agent that breaks down a complex question into a series of simpler questions.

    This agent uses a search tool to look up answers to the simpler questions
    in order to answer the original complex question.
    """
    CONVERSATIONAL_REACT_DESCRIPTION = "conversational-react-description"
    CHAT_ZERO_SHOT_REACT_DESCRIPTION = "chat-zero-shot-react-description"
    """A zero shot agent that does a reasoning step before acting.

    This agent is designed to be used in conjunction
    """

    CHAT_CONVERSATIONAL_REACT_DESCRIPTION = "chat-conversational-react-description"

    STRUCTURED_CHAT_ZERO_SHOT_REACT_DESCRIPTION = (
        "structured-chat-zero-shot-react-description"
    )
    """An zero-shot react agent optimized for chat models.

    This agent is capable of invoking tools that have multiple inputs.
    """

    OPENAI_FUNCTIONS = "openai-functions"
    """An agent optimized for using open AI functions."""

    OPENAI_MULTI_FUNCTIONS = "openai-multi-functions"

Classes

Dependencies

  • enum
  • langchain_classic._api.deprecation
  • langchain_core._api

Frequently Asked Questions

What does agent_types.py do?
agent_types.py is a source file in the langchain codebase, written in python.
What does agent_types.py depend on?
agent_types.py imports 3 module(s): enum, langchain_classic._api.deprecation, langchain_core._api.
Where is agent_types.py in the architecture?
agent_types.py is located at libs/langchain/langchain_classic/agents/agent_types.py (directory: libs/langchain/langchain_classic/agents).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free