Skip to main content

Class: abstract AgentWorker<AI, Store, AdditionalMessageOptions>

Worker will schedule tasks and handle the task execution

Extended by

Type Parameters

AI extends LLM

Store extends object = object

AdditionalMessageOptions extends object = AI extends LLM<object, infer AdditionalMessageOptions> ? AdditionalMessageOptions : never

Constructors

new AgentWorker()

new AgentWorker<AI, Store, AdditionalMessageOptions>(): AgentWorker<AI, Store, AdditionalMessageOptions>

Returns

AgentWorker<AI, Store, AdditionalMessageOptions>

Properties

[toStringTag]

[toStringTag]: string = "AgentWorker"

Defined in

packages/llamaindex/src/agent/base.ts:195


taskHandler

abstract taskHandler: TaskHandler<AI, Store, AdditionalMessageOptions>

Defined in

packages/llamaindex/src/agent/base.ts:160

Methods

createTask()

createTask(query, context): ReadableStream<TaskStepOutput<AI, Store, AdditionalMessageOptions>>

Parameters

query: MessageContent

context: AgentTaskContext<AI, Store, AdditionalMessageOptions>

Returns

ReadableStream<TaskStepOutput<AI, Store, AdditionalMessageOptions>>

Defined in

packages/llamaindex/src/agent/base.ts:162