instructions
string | (() => string) | (() => Promise<string>)
required
Instructions for the AI agent. Can be a string or a function that returns a string.
Optional array of tools the agent can use.
Optional array of objects the agent can interact with.
Optional record of exit handlers.
Optional abort signal to cancel execution.
Optional hooks for customizing behavior (onBeforeTool, onAfterTool, onTrace, etc.).
temperature
number | (() => number) | (() => Promise<number>)
Optional temperature for the AI model. Defaults to 0.7.
model
string | string[] | (() => string | string[]) | (() => Promise<string | string[]>)
Optional model name(s) to use. Can be a string, array of strings, or a function that returns either.
Optional array of knowledge bases to use.
Optional maximum number of iterations (loops). Defaults to 10.