Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

WorkflowTool

Takes a workflow and turns it into a Tool.

This workflow receives a fresh session. This means that it is not aware of previous messages or the contributions made by other nodes to the state.

After its execution, a Workflow returns an object with the results of its output nodes.

Full Specification

id: string
nodes: 
	- Node
	- ...
output: WorkflowOutput # optional
input_prompt: string
evals: 
	- Eval
	- ...

id

The ID. If absent, one will be provided.

nodes

The nodes within the Workflow. All nodes needed to generate the outputs are guaranteed to run.

output (optional)

The IDs of the nodes that will end up in the output provided by this workflow.

input_prompt

Determines the template for the message that will be used to trigger this workflow execution as a tool. The fields required will be generated by the LLM of the node that decides to call this tool.

evals

The names of the evaluations to be ran for this workflow