Skip to content

Overview / AgentManager

AgentManager

Manager of Langchain Agent. This class manages the Agent that uses the LLM. It takes care of formatting the prompt and filtering the tools before feeding them to the Agent. It also instantiates the Langchain Agent.

Constructors

new AgentManager()

new AgentManager(): AgentManager

Returns

AgentManager

Methods

executeAgent()

executeAgent(stray): Promise<AgentFastReply>

Parameters

ParameterType
strayStrayCat

Returns

Promise<AgentFastReply>


executeFormAgent()

executeFormAgent(stray): Promise<undefined | AgentFastReply>

Parameters

ParameterType
strayStrayCat

Returns

Promise<undefined | AgentFastReply>


executeMemoryChain()

executeMemoryChain(input, stray): Promise<string>

Parameters

ParameterType
inputContextInput
strayStrayCat

Returns

Promise<string>


executeProceduresChain()

executeProceduresChain(agentInput, chatHistory, stray): Promise<AgentFastReply>

Parameters

ParameterType
agentInputContextInput
chatHistorystring
strayStrayCat

Returns

Promise<AgentFastReply>


executeTool()

executeTool(input, stray): Promise<undefined | AgentFastReply>

Parameters

ParameterType
inputContextInput
strayStrayCat

Returns

Promise<undefined | AgentFastReply>


getDeclarativeMemoriesPrompt()

getDeclarativeMemoriesPrompt(docs): string

Parameters

ParameterType
docsMemoryDocument[]

Returns

string


getEpisodicMemoriesPrompt()

getEpisodicMemoriesPrompt(docs): string

Parameters

ParameterType
docsMemoryDocument[]

Returns

string


getLangchainChatHistory()

getLangchainChatHistory(history): Promise<BaseMessage[]>

Parameters

ParameterType
historyMemoryMessage[]

Returns

Promise<BaseMessage[]>


stringifyChatHistory()

stringifyChatHistory(history): string

Parameters

ParameterType
historyMemoryMessage[]

Returns

string

Released under the GPL-3.0 License.