Class: ReActAgent
Hierarchy
-
AgentRunner
<LLM
,ReACTAgentStore
>↳
ReActAgent
Constructors
constructor
• new ReActAgent(params
): ReActAgent
Parameters
Name | Type |
---|---|
params | ReACTAgentParamsWithTools | ReACTAgentParamsWithToolRetriever |
Returns
Overrides
AgentRunner<LLM, ReACTAgentStore>.constructor
Defined in
packages/core/src/agent/react.ts:335
Properties
#chatHistory
• Private
#chatHistory: ChatMessage
<object
>[]
Inherited from
AgentRunner.#chatHistory
Defined in
packages/core/src/agent/base.ts:292
#llm
• Private
Readonly
#llm: LLM
<object
, object
>
Inherited from
AgentRunner.#llm
Defined in
packages/core/src/agent/base.ts:287
#runner
• Private
Readonly
#runner: AgentWorker
<LLM
<object
, object
>, ReACTAgentStore
, object
>
Inherited from
AgentRunner.#runner
Defined in
packages/core/src/agent/base.ts:293
#systemPrompt
• Private
Readonly
#systemPrompt: null
| MessageContent
= null
Inherited from
AgentRunner.#systemPrompt
Defined in
packages/core/src/agent/base.ts:291
#tools
• Private
Readonly
#tools: BaseToolWithCall
[] | (query
: MessageContent
) => Promise
<BaseToolWithCall
[]>
Inherited from
AgentRunner.#tools
Defined in
packages/core/src/agent/base.ts:288
taskHandler
▪ Static
taskHandler: TaskHandler
<LLM
<object
, object
>, ReACTAgentStore
>
Defined in
packages/core/src/agent/react.ts:356
Accessors
chatHistory
• get
chatHistory(): ChatMessage
<AdditionalMessageOptions
>[]
Returns
ChatMessage
<AdditionalMessageOptions
>[]
Inherited from
AgentRunner.chatHistory
Defined in
packages/core/src/agent/base.ts:319
llm
• get
llm(): AI
Returns
AI
Inherited from
AgentRunner.llm
Defined in
packages/core/src/agent/base.ts:315
Methods
chat
▸ chat(params
): Promise
<AgentChatResponse
<object
>>
Parameters
Name | Type |
---|---|
params | ChatEngineParamsNonStreaming |
Returns
Promise
<AgentChatResponse
<object
>>
Inherited from
AgentRunner.chat
Defined in
packages/core/src/agent/base.ts:375
▸ chat(params
): Promise
<ReadableStream
<AgentStreamChatResponse
<object
>>>
Parameters
Name | Type |
---|---|
params | ChatEngineParamsStreaming |
Returns
Promise
<ReadableStream
<AgentStreamChatResponse
<object
>>>
Inherited from
AgentRunner.chat
Defined in
packages/core/src/agent/base.ts:378
createStore
▸ createStore(): Object
Returns
Object
Name | Type |
---|---|
reasons | never [] |
Overrides
AgentRunner.createStore
Defined in
packages/core/src/agent/react.ts:350
createTask
▸ createTask(message
, stream?
): Promise
<ReadableStream
<TaskStepOutput
<LLM
<object
, object
>, ReACTAgentStore
, object
>>>
Parameters
Name | Type | Default value |
---|---|---|
message | MessageContent | undefined |
stream | boolean | false |
Returns
Promise
<ReadableStream
<TaskStepOutput
<LLM
<object
, object
>, ReACTAgentStore
, object
>>>
Inherited from
AgentRunner.createTask
Defined in
packages/core/src/agent/base.ts:347
getTools
▸ getTools(query
): BaseToolWithCall
[] | Promise
<BaseToolWithCall
[]>
Parameters
Name | Type |
---|---|
query | MessageContent |
Returns
BaseToolWithCall
[] | Promise
<BaseToolWithCall
[]>
Inherited from
AgentRunner.getTools
Defined in
packages/core/src/agent/base.ts:327
reset
▸ reset(): void
Returns
void