BaseWorkflowAgent
Defined in: packages/workflow/src/agent/base.ts:17
Base interface for workflow agents
Properties
name
readonly
name:string
Defined in: packages/workflow/src/agent/base.ts:18
systemPrompt
readonly
systemPrompt:string
Defined in: packages/workflow/src/agent/base.ts:19
description
readonly
description:string
Defined in: packages/workflow/src/agent/base.ts:20
tools
readonly
tools:BaseToolWithCall
[]
Defined in: packages/workflow/src/agent/base.ts:21
llm
readonly
llm:LLM
Defined in: packages/workflow/src/agent/base.ts:22
canHandoffTo
readonly
canHandoffTo:string
[]
Defined in: packages/workflow/src/agent/base.ts:23
Methods
takeStep()
takeStep(
ctx
,state
,llmInput
,tools
):Promise
<AgentOutput
>
Defined in: packages/workflow/src/agent/base.ts:29
Take a single step with the agent Using memory directly to get messages instead of requiring them to be passed in
Parameters
ctx
WorkflowContext
state
llmInput
ChatMessage
[]
tools
BaseToolWithCall
[]
Returns
Promise
<AgentOutput
>
handleToolCallResults()
handleToolCallResults(
state
,results
):Promise
<void
>
Defined in: packages/workflow/src/agent/base.ts:39
Handle results from tool calls
Parameters
state
results
Returns
Promise
<void
>
finalize()
finalize(
state
,output
):Promise
<AgentOutput
>
Defined in: packages/workflow/src/agent/base.ts:47
Finalize the agent's output
Parameters
state
output
Returns
Promise
<AgentOutput
>