Logo
Interfaces

BaseWorkflowAgent

Defined in: packages/workflow/src/agent/base.ts:18

Base interface for workflow agents

Properties

name

readonly name: string

Defined in: packages/workflow/src/agent/base.ts:19


systemPrompt

readonly systemPrompt: string

Defined in: packages/workflow/src/agent/base.ts:20


description

readonly description: string

Defined in: packages/workflow/src/agent/base.ts:21


tools

readonly tools: BaseToolWithCall[]

Defined in: packages/workflow/src/agent/base.ts:22


llm

readonly llm: LLM

Defined in: packages/workflow/src/agent/base.ts:23


canHandoffTo

readonly canHandoffTo: string[]

Defined in: packages/workflow/src/agent/base.ts:24

Methods

takeStep()

takeStep(ctx, llmInput, tools): Promise<AgentOutput>

Defined in: packages/workflow/src/agent/base.ts:30

Take a single step with the agent Using memory directly to get messages instead of requiring them to be passed in

Parameters

ctx

HandlerContext<AgentWorkflowContext>

llmInput

ChatMessage[]

tools

BaseToolWithCall[]

Returns

Promise<AgentOutput>


handleToolCallResults()

handleToolCallResults(ctx, results): Promise<void>

Defined in: packages/workflow/src/agent/base.ts:39

Handle results from tool calls

Parameters

ctx

HandlerContext<AgentWorkflowContext>

results

AgentToolCallResult[]

Returns

Promise<void>


finalize()

finalize(ctx, output, memory): Promise<AgentOutput>

Defined in: packages/workflow/src/agent/base.ts:47

Finalize the agent's output

Parameters

ctx

HandlerContext<AgentWorkflowContext>

output

AgentOutput

memory

BaseMemory

Returns

Promise<AgentOutput>

On this page