Return the string type key uniquely identifying multi or single action agents.
Return the string type key uniquely identifying this class of agent.
Construct a scratchpad to let the agent continue its thought process
Name of tool to use to terminate the chain.
Prefix to append the LLM call with.
Prefix to append the observation with.
Decide what to do given some input.
Steps the LLM has taken so far, along with observations from each.
User inputs.
OptionalcallbackManager: anyCallback manager to use for this call.
Action specifying what tool to use.
Prepare the agent for output, if needed
Return response when agent has been stopped due to max iterations
OptionalcallbackManager: anyStaticcreateCreate prompt in the style of the zero shot agent.
List of tools the agent will have access to, used to format the prompt.
Optionalargs: ZeroShotCreatePromptArgsArguments to create the prompt with.
Interface for creating a prompt for the ZeroShotAgent.
OptionalinputVariables?: string[]List of input variables the final prompt will expect.
Optionalprefix?: stringString to put before the list of tools.
Optionalsuffix?: stringString to put after the list of tools.
StaticdeserializeLoad an agent from a json-like object describing it.
StaticfromCreates a ZeroShotAgent from a Large Language Model and a set of tools.
The Large Language Model to use.
The tools for the agent to use.
Optionalargs: ZeroShotCreatePromptArgs & AgentArgsOptional arguments for creating the agent.
A new instance of ZeroShotAgent.
StaticgetReturns the default output parser for the ZeroShotAgent.
Optionalfields: OutputParserArgsOptional arguments for the output parser.
An instance of ZeroShotAgentOutputParser.
Staticlc_StaticvalidateValidates the tools for the ZeroShotAgent. Throws an error if any tool does not have a description.
List of tools to validate.
Agent for the MRKL chain.
Example