LlmAgentConfig class
LLM agent-specific configuration fields.
- Inheritance
-
- Object
- BaseAgentConfig
- LlmAgentConfig
Constructors
-
LlmAgentConfig({String agentClass = 'LlmAgent', required String name, String description = '', List<
AgentRefConfig> ? subAgents, List<CodeConfig> ? beforeAgentCallbacks, List<CodeConfig> ? afterAgentCallbacks, Map<String, Object?> ? extras, String? model, CodeConfig? modelCode, required String instruction, Object? staticInstruction, bool? disallowTransferToParent, bool? disallowTransferToPeers, String? mode, CodeConfig? inputSchema, CodeConfig? outputSchema, String? outputKey, String includeContents = 'default', List<ToolConfig> ? tools, List<CodeConfig> ? beforeModelCallbacks, List<CodeConfig> ? afterModelCallbacks, List<CodeConfig> ? beforeToolCallbacks, List<CodeConfig> ? afterToolCallbacks, Map<String, Object?> ? generateContentConfig}) - Creates an LLM agent configuration.
-
LlmAgentConfig.fromJson(Map<
String, Object?> json) -
Creates an LLM agent config from JSON.
factory
Properties
-
afterAgentCallbacks
→ List<
CodeConfig> -
Callbacks executed after
runAsync.finalinherited -
afterModelCallbacks
→ List<
CodeConfig> -
Callbacks after model invocation.
final
-
afterToolCallbacks
→ List<
CodeConfig> -
Callbacks after tool invocation.
final
- agentClass → String
-
Agent class identifier.
finalinherited
-
beforeAgentCallbacks
→ List<
CodeConfig> -
Callbacks executed before
runAsync.finalinherited -
beforeModelCallbacks
→ List<
CodeConfig> -
Callbacks before model invocation.
final
-
beforeToolCallbacks
→ List<
CodeConfig> -
Callbacks before tool invocation.
final
- description → String
-
Agent description text.
finalinherited
- disallowTransferToParent → bool?
-
Whether transfer to parent is disallowed.
final
- disallowTransferToPeers → bool?
-
Whether transfer to peer agents is disallowed.
final
-
extras
→ Map<
String, Object?> -
Unknown or extension fields preserved from source config.
finalinherited
-
generateContentConfig
→ Map<
String, Object?> ? -
Optional model generate-content config.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- includeContents → String
-
Content inclusion mode (
defaultornone).final - inputSchema → CodeConfig?
-
Optional input schema callback.
final
- instruction → String
-
Core agent instruction.
final
- mode → String?
-
Delegation mode (
chat,task, orsingle_turn).final - model → String?
-
Static model name.
final
- modelCode → CodeConfig?
-
Dynamic model resolver callback.
final
- name → String
-
Agent name.
finalinherited
- outputKey → String?
-
Optional output key for state persistence.
final
- outputSchema → CodeConfig?
-
Optional output schema callback.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- staticInstruction → Object?
-
Optional static instruction provider.
final
-
subAgents
→ List<
AgentRefConfig> -
Child agent references.
finalinherited
-
tools
→ List<
ToolConfig> -
Tool configuration list.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> -
Serializes this LLM config to JSON.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited