Skip to main content

Agent.getDefaultStreamOptions()

Agents can be configured with default streaming options for memory usage, output format, and iteration steps. The .getDefaultStreamOptions() method returns these defaults, resolving them if they are functions. These options apply to all stream() calls unless overridden and are useful for inspecting an agent’s unknown defaults.

Usage example​

await agent.getDefaultStreamOptions();

Parameters​

options?:

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

Returns​

defaultOptions:

AgentExecutionOptions<Output> | Promise<AgentExecutionOptions<Output>>
The default vNext streaming options configured for the agent, either as a direct object or a promise that resolves to the options.

Extended usage example​

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

Options parameters​

runtimeContext?:

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

On this page