Agent for the MRKL chain.

⚠️ Deprecated ⚠️

Use the createStructuredChatAgent method instead.

This feature is deprecated and will be removed in the future.

It is not recommended for use.

Hierarchy (view full)

  • Agent
    • ChatConversationalAgent

Constructors

Properties

ToolType: ToolInterface
llmChain: LLMChain<string, LLMType>
outputParser: undefined | AgentActionOutputParser

Accessors

Methods

  • Constructs the agent scratchpad based on the agent steps. It returns an array of base messages representing the thoughts of the agent.

    Parameters

    • steps: AgentStep[]

      The agent steps to construct the scratchpad from.

    Returns Promise<BaseMessage[]>

    An array of base messages representing the thoughts of the agent.

  • Decide what to do given some input.

    Parameters

    • steps: AgentStep[]

      Steps the LLM has taken so far, along with observations from each.

    • inputs: ChainValues

      User inputs.

    • Optional callbackManager: CallbackManager

      Callback manager to use for this call.

    Returns Promise<AgentAction | AgentFinish>

    Action specifying what tool to use.

  • Prepare the agent for output, if needed

    Parameters

    • _returnValues: Record<string, any>
    • _steps: AgentStep[]

    Returns Promise<Record<string, any>>

  • Return response when agent has been stopped due to max iterations

    Parameters

    • earlyStoppingMethod: StoppingMethod
    • steps: AgentStep[]
    • inputs: ChainValues
    • Optional callbackManager: CallbackManager

    Returns Promise<AgentFinish>

Generated using TypeDoc