AgentRuntime class
Constructors
-
AgentRuntime({required AiProvider provider, required AgentConfig config, required GlobalKey<
State< rootKey, })StatefulWidget> >
Properties
- config → AgentConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
final
- provider → AiProvider
-
final
-
rootKey
→ GlobalKey<
State< StatefulWidget> > -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildScreenStateText(
{required String screenName, required List< String> availableScreens, required String elementsText, List<InteractiveElement> elements = const <InteractiveElement>[], bool includeTags = true, String? preface}) → String -
cancel(
) → void - Request cancellation of the current task. The execution loop will exit cleanly at the next step boundary.
-
dispose(
) → void - Release the semantics handle. Call when the runtime is no longer needed.
-
execute(
String instruction, {List< Map< ? chatHistory}) → Future<String, String> >ExecutionResult> -
executeTool(
String name, Map< String, dynamic> args) → Future<String> -
getApprovalScope(
) → AppActionApprovalScope - Get current approval scope (for testing/debugging).
-
getApprovalSource(
) → AppActionApprovalSource - Get current approval source (for testing/debugging).
-
getConfig(
) → AgentConfig -
getIsRunning(
) → bool -
getScreenContext(
) → ScreenContext -
getTools(
) → List< ToolDefinition> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resetAppActionApproval(
[String reason = 'reset']) → void - Clear workflow approval when a new user task starts.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited