Skip to main content

Class: abstract AgentWorker<AI, Store, AdditionalMessageOptions, AdditionalChatOptions>

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

AdditionalChatOptions extends object = object

Constructors

new AgentWorker()

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

Returns

AgentWorker<AI, Store, AdditionalMessageOptions, AdditionalChatOptions>

Properties

[toStringTag]

[toStringTag]: string

Defined in

packages/core/agent/dist/index.d.ts:70


taskHandler

abstract taskHandler: TaskHandler<AI, Store, AdditionalMessageOptions, AdditionalChatOptions>

Defined in

packages/core/agent/dist/index.d.ts:68

Methods

createTask()

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

Parameters

query: MessageContent

context: AgentTaskContext<AI, Store, AdditionalMessageOptions, AdditionalChatOptions>

Returns

ReadableStream<TaskStepOutput<AI, Store, AdditionalMessageOptions, AdditionalChatOptions>>

Defined in

packages/core/agent/dist/index.d.ts:69