langchain API Reference¶
langchain._api¶
Helper functions for managing the LangChain API.
This module is only relevant for LangChain developers, not for users.
Warning
This module and its submodules are for internal use only.  Do not use them
in your own code.  We may change the API at any time with no warning.
Classes¶
_api.deprecation.LangChainDeprecationWarning
A class for issuing deprecation warnings for LangChain users.
Functions¶
_api.deprecation.deprecated(since, *[, ...])
Decorator to mark a function, a class, or a property as deprecated.
_api.deprecation.suppress_langchain_deprecation_warning()
Context manager to suppress LangChainDeprecationWarning.
langchain.agents¶
Agent is a class that uses an LLM to choose a sequence of actions to take.
In Chains, a sequence of actions is hardcoded. In Agents,
a language model is used as a reasoning engine to determine which actions
to take and in which order.
Agents select and use Tools and Toolkits for actions.
Class hierarchy:
BaseSingleActionAgent --> LLMSingleActionAgent
                          OpenAIFunctionsAgent
                          XMLAgent
                          Agent --> <name>Agent  # Examples: ZeroShotAgent, ChatAgent
BaseMultiActionAgent  --> OpenAIMultiFunctionsAgent
Main helpers:
AgentType, AgentExecutor, AgentOutputParser, AgentExecutorIterator,
AgentAction, AgentFinish
Classes¶
agents.agent_iterator.AgentExecutorIterator(...)
Iterator for AgentExecutor.
agents.agent_iterator.BaseAgentExecutorIterator()
Base class for AgentExecutorIterator.
agents.agent.Agent
Agent that calls the language model and deciding the action.
agents.agent.AgentExecutor
Agent that is using tools.
agents.agent.AgentOutputParser
Base class for parsing agent output into agent action/finish.