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

#taskSet

private #taskSet: Set<TaskStep<AI, Store, AdditionalMessageOptions>>

Source

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


[toStringTag]

[toStringTag]: string = "AgentWorker"

Source

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


taskHandler

abstract taskHandler: TaskHandler<AI, Store, AdditionalMessageOptions>

Source

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

Source

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