The pluggable backend the agent-client core runs over. Implementations
exist for the in-process server agent (driving the agent action directly)
and for the HTTP remoteAgent (driving stream/run calls).
This is a public extension point: third-party transports must extend
(not implement) it, so they inherit the default close body and the
mutable stateManagement field.
A turn is always run over runTurn. Server-managed agents keep the
client's custom state live through streamed customPatch chunks and omit
state from the final output, so the core consumes the stream even for a
non-streaming send().
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stateManagement ↔ AgentStateManagement?
-
Declares server- vs client-managed state
(AgentStateManagement.server | AgentStateManagement.client);
auto-detected when left
null.getter/setter pair
Methods
-
abort(
String snapshotId, {Map< String, dynamic> ? context}) → Future<SnapshotStatus?> -
Aborts a running snapshot. Requires a server store. Returns the prior
status, or
null. -
close(
) → FutureOr< void> - Releases any resources owned by this transport. The default is a no-op; transports that own resources (e.g. an HTTP client) override it.
-
getSnapshot(
{String? snapshotId, String? sessionId, Map< String, dynamic> ? context, bool metadataOnly = false}) → Future<SessionSnapshot?> - Reads a snapshot. Requires a server store.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
runTurn(
AgentInput input, AgentInit init, {CancellationToken? cancel, Map< String, dynamic> ? context}) → TurnStream - Runs a single turn, returning the streamed chunks plus a future for the final, non-throwing AgentOutput.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited