Skip to content

BaseWorkflowAgent

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

Base interface for workflow agents

readonly name: string

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


readonly systemPrompt: string

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


readonly description: string

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


readonly tools: BaseToolWithCall[]

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


readonly llm: LLM

Defined in: .build/typescript/packages/workflow/src/agent/base.ts:25


readonly canHandoffTo: string[]

Defined in: .build/typescript/packages/workflow/src/agent/base.ts:26

getStructuredOutput(responseFormat, response): Promise<JSONObject>

Defined in: .build/typescript/packages/workflow/src/agent/base.ts:31

Take the final response and convert it to a structured output

ZodSchema

ChatMessage

Promise<JSONObject>


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

Defined in: .build/typescript/packages/workflow/src/agent/base.ts:40

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

WorkflowContext

AgentWorkflowState

ChatMessage[]

BaseToolWithCall[]

Promise<AgentOutput>


handleToolCallResults(state, results): Promise<void>

Defined in: .build/typescript/packages/workflow/src/agent/base.ts:50

Handle results from tool calls

AgentWorkflowState

AgentToolCallResult[]

Promise<void>


finalize(state, output): Promise<AgentOutput>

Defined in: .build/typescript/packages/workflow/src/agent/base.ts:58

Finalize the agent’s output

AgentWorkflowState

AgentOutput

Promise<AgentOutput>