How to handle errors raised by the agent's output parser.
Defaults to False, which raises the error.
If true, the error will be sent back to the LLM as an observation.
If a string, the string itself will be sent to the LLM as an observation.
If a callable function, the function will be called with the exception
as an argument, and the result of that function will be passed to the agent
as an observation.
OptionalhandleOptionalmaxOptionalmemoryMethod that checks if the agent execution should continue based on the number of iterations.
The current number of iterations.
A boolean indicating whether the agent execution should continue.
Return the string type key uniquely identifying this class of chain.
Protected_Optionaloptions: anyOptionalrunManager: anyOptionalconfig: anyInvoke the chain with the provided input and returns the output.
Input values for the chain run.
Optionaloptions: anyPromise that resolves with the output of the chain run.
Return a json-like object representing this chain.
StaticdeserializeLoad a chain from a json-like object describing it.
StaticfromStaticlc_
A chain managing an agent using tools.
Example