Class BaseSingleActionAgentAbstract

Abstract base class for single action agents in LangChain. Extends the BaseAgent class and provides additional functionality specific to single action agents.

Hierarchy

Constructors

  • Parameters

    • Optional kwargs: SerializedFields
    • Rest ..._args: never[]

    Returns BaseSingleActionAgent

Properties

ToolType: StructuredTool<ZodObject<any, any, any, any, {}>>

Accessors

  • get allowedTools(): undefined | string[]
  • Returns undefined | string[]

  • get inputKeys(): string[]
  • Returns string[]

  • get returnValues(): string[]
  • Returns string[]

Methods

  • 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.

    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

    Returns Promise<AgentFinish>

  • Returns Serialized

Generated using TypeDoc