LlmAgent constructor
LlmAgent({
- required String name,
- String description = '',
- List<
BaseAgent> ? subAgents, - Object? beforeAgentCallback,
- Object? afterAgentCallback,
- Object model = '',
- Object instruction = '',
- Object globalInstruction = '',
- Object? staticInstruction,
- List<
Object> ? tools, - GenerateContentConfig? generateContentConfig,
- bool disallowTransferToParent = false,
- bool disallowTransferToPeers = false,
- String includeContents = 'default',
- Object? inputSchema,
- Object? outputSchema,
- String? outputKey,
- Object? planner,
- Object? codeExecutor,
- Object? beforeModelCallback,
- Object? afterModelCallback,
- Object? onModelErrorCallback,
- Object? beforeToolCallback,
- Object? afterToolCallback,
- Object? onToolErrorCallback,
Creates an LLM agent.
Implementation
LlmAgent({
required super.name,
super.description,
super.subAgents,
super.beforeAgentCallback,
super.afterAgentCallback,
this.model = '',
this.instruction = '',
this.globalInstruction = '',
this.staticInstruction,
List<Object>? tools,
this.generateContentConfig,
this.disallowTransferToParent = false,
this.disallowTransferToPeers = false,
this.includeContents = 'default',
this.inputSchema,
this.outputSchema,
this.outputKey,
this.planner,
this.codeExecutor,
this.beforeModelCallback,
this.afterModelCallback,
this.onModelErrorCallback,
this.beforeToolCallback,
this.afterToolCallback,
this.onToolErrorCallback,
}) : tools = tools ?? <Object>[] {
_validateGenerateContentConfig(generateContentConfig);
_warnOnThinkingConfigPrecedence();
}