Agent class

An autonomous agent built from a Persona with full role capabilities.

Inheritance
Annotations
  • @JsonSerializable.new(includeIfNull: false, explicitToJson: true)

Constructors

Agent({required String expertise, required String identity, required String name, List<Activity>? activities, List<Checklist>? checklists, TConfig? config, List<Instruction>? instructions, TMetaData? metaData, List<Template>? templates, List<Tool>? tools, List<Workflow>? workflows})
const
Agent.fromJson(Map<String, dynamic> json)
factory
Agent.fromPersona(Persona persona, {String? name, TMetaData? metaData, TConfig? config, String? expertise, List<Activity>? activities, List<Checklist>? checklists, List<Instruction>? instructions, List<Template>? templates, List<Tool>? tools, List<Workflow>? workflows, String? identity})
Agent.fromRole(Role role, {required String identity, String? name, TMetaData? metaData, TConfig? config, String? expertise, List<Activity>? activities, List<Checklist>? checklists, List<Instruction>? instructions, List<Template>? templates, List<Tool>? tools, List<Workflow>? workflows})

Properties

activities List<Activity>?
finalinherited
checklists List<Checklist>?
finalinherited
config TConfig?
finalinherited
dartBuilder String Function(TWriteable writeable)?
Returns a function that builds a Dart source code string.
finalinherited
expertise String
finalinherited
fileName String
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
identity String
finalinherited
instructions List<Instruction>?
finalinherited
jsonKey String
no setterinherited
mdFactory → TMdFactory<TWriteable>
Returns a function that builds a Markdown string from a JSON map.
no setterinherited
metaData TMetaData?
finalinherited
name String
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
templates List<Template>?
finalinherited
tools List<Tool>?
finalinherited
workflows List<Workflow>?
finalinherited
xmlBuilder String Function(TWriteable writeable, bool includeMeta)?
Returns a function that builds an XML string from a JSON map.
finalinherited
xmlKey String
no setterinherited
yamlBuilder String Function(TWriteable writeable, bool includeMetaData)?
Returns a function that builds a YAML string from a JSON map.
finalinherited
yamlKey String
no setterinherited

Methods

copyWith({String? name, TMetaData? metaData, TConfig? config, String? expertise, List<Activity>? activities, List<Checklist>? checklists, List<Instruction>? instructions, List<Template>? templates, List<Tool>? tools, List<Workflow>? workflows, String? identity}) Agent
override
mdBody() String?
inherited
mdFrontMatter() Map<String, dynamic>
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDart() String
Converts this object to a Dart source code string.
inherited
toJson() Map<String, dynamic>
Converts the object to a Firestore-compatible map.
override
toMd({TMdFactory<TWriteable>? mdFactory, bool includeMetaData = true}) String
Converts this object to a Markdown string.
inherited
toString() String
A string representation of this object.
inherited
toXml({bool includeMetaData = true}) String
Converts this object to an XML string.
inherited
toYaml({bool includeMetaData = true}) String
Converts this object to a YAML string.
inherited
validate<T>() → TurboResponse<T>?
Validates the object's data before writing to Firestore.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited