AgentDefinition class
A single agent definition. Composes 4-axis knowledge bindings with runtime configuration. The bundle stores the definition only — the host runtime is responsible for instantiating it (resolving the referenced profile / skill / fact / philosophy ids and connecting the model + tools).
Constructors
-
AgentDefinition({required String id, required String name, required String role, String? description, List<
String> profileIds = const [], List<String> skillIds = const [], List<String> factSourceIds = const [], List<String> philosophyIds = const [], String? systemPrompt, AgentModelConfig? model, List<String> ? tools, AgentBehaviorConfig? behavior, Map<String, dynamic> metadata = const {}}) -
const
-
AgentDefinition.fromJson(Map<
String, dynamic> json) -
Create from JSON.
factory
Properties
- behavior → AgentBehaviorConfig?
-
Behavioral limits (turn cap / timeout / retry).
final
- description → String?
-
Optional description.
final
-
factSourceIds
→ List<
String> -
Fact source ids this agent can query.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
Unique identifier.
final
-
metadata
→ Map<
String, dynamic> -
Free-form metadata for host-specific extension.
final
- model → AgentModelConfig?
-
Model configuration (provider / model / sampling). Optional —
host may apply defaults when omitted.
final
- name → String
-
Human-readable name.
final
-
philosophyIds
→ List<
String> -
Philosophy ids this agent follows.
final
-
profileIds
→ List<
String> -
Profile ids this agent inherits.
final
- role → String
-
Role label (e.g. "UI Designer", "DSL Auditor").
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
skillIds
→ List<
String> -
Skill ids this agent can perform.
final
- systemPrompt → String?
-
Additional system prompt fragment appended after profile content.
final
-
tools
→ List<
String> ? -
Tool names this agent is permitted to invoke.
null= host default.final
Methods
-
copyWith(
{String? id, String? name, String? role, String? description, List< String> ? profileIds, List<String> ? skillIds, List<String> ? factSourceIds, List<String> ? philosophyIds, String? systemPrompt, AgentModelConfig? model, List<String> ? tools, AgentBehaviorConfig? behavior, Map<String, dynamic> ? metadata}) → AgentDefinition - Create a copy with modifications.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Convert to JSON.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited