Skip to Content
ReferenceAgents.getDefaultGenerateOptions()

Agent.getDefaultGenerateOptions()

Agents can be configured with default generation options for controlling model behavior, output formatting and tool and workflow calls. The .getDefaultGenerateOptions() method retrieves these defaults, resolving them if they are functions. These options apply to all generate()calls unless overridden and are useful for inspecting an agent’s unknown defaults.

Usage example

await agent.getDefaultGenerateOptions();

Parameters

options?:

{ runtimeContext?: RuntimeContext }
= {}
Optional configuration object containing runtime context.

Returns

defaultOptions:

AgentGenerateOptions | Promise<AgentGenerateOptions>
The default generation options configured for the agent, either as a direct object or a promise that resolves to the options.

Extended usage example

await agent.getDefaultGenerateOptions({ runtimeContext: new RuntimeContext() });

Options parameters

runtimeContext?:

RuntimeContext
= new RuntimeContext()
Runtime context for dependency injection and contextual information.