CodingAgent class

A single agent that keeps the whole conversation, tool calls included.

Every request runs one tool-calling loop over the full history, so later requests can build on the files the model already read and the changes it already made.

Constructors

CodingAgent({required Genkit ai, required ModelRef model, required String systemPrompt, required List<Tool> tools, required int maxTurns})

Properties

ai → Genkit
final
hashCode → int
The hash code for this object.
no setterinherited
maxTurns → int
final
model → ModelRef
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
systemPrompt → String
final
tools → List<Tool>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
reset() → void
Clears the conversation.
send(String prompt, {void onText(String text)?, CancellationToken? cancel}) → Future<String>
Sends prompt and returns the model's final text.
toString() → String
A string representation of this object.
inherited

Operators

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