ScriptedAgent class final

An AgentConnection that plays a script in the event shapes of ag-ui-adk, for tests without a model.

The n-th run plays turns[n]; a run beyond the script ends with a RUN_ERROR. Events arrive one at a time, asynchronously, so await pumpEventQueue() or pumpAndSettle plays a whole run.

Implemented types

Constructors

ScriptedAgent(List<AgentTurn> turns)

Properties

hashCode → int
The hash code for this object.
no setterinherited
requests → List<Map<String, Object?>>
The body of every run so far, oldest first.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
turns → List<AgentTurn>
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(Map<String, Object?> input) → Stream<Map<String, Object?>>
Posts input, the body of one AG-UI run, and streams the events of the run as decoded JSON.
override
toString() → String
A string representation of this object.
inherited

Operators

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