LlmAgent constructor

LlmAgent({
  1. required String name,
  2. String description = '',
  3. List<BaseAgent>? subAgents,
  4. Object? beforeAgentCallback,
  5. Object? afterAgentCallback,
  6. Object model = '',
  7. Object instruction = '',
  8. Object globalInstruction = '',
  9. Object? staticInstruction,
  10. List<Object>? tools,
  11. GenerateContentConfig? generateContentConfig,
  12. bool disallowTransferToParent = false,
  13. bool disallowTransferToPeers = false,
  14. String includeContents = 'default',
  15. Object? inputSchema,
  16. Object? outputSchema,
  17. String? outputKey,
  18. Object? planner,
  19. Object? codeExecutor,
  20. Object? beforeModelCallback,
  21. Object? afterModelCallback,
  22. Object? onModelErrorCallback,
  23. Object? beforeToolCallback,
  24. Object? afterToolCallback,
  25. 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();
}