Skip to content

ToolUseBehavior

type ToolUseBehavior =
| ToolUseBehaviorFlags
| {
stopAtToolNames: string[];
}
| ToolToFinalOutputFunction;

The behavior of the agent when a tool is called.

ToolUseBehaviorFlags

{ stopAtToolNames: string[]; }

stopAtToolNames: string[];

List of tool names that will stop the agent from running further. The final output will be the output of the first tool in the list that was called.

ToolToFinalOutputFunction