AgentListing class final
A class's agent list read once, for one run of the agent, in the shape AG-UI sends it. A new run reads the list again.
Constructors
- AgentListing.of(AgentSurface surface)
-
Reads
surface's agent list, through the copy in its generated AgentSurface.agentSchema when it has one, and names its items.factory
Properties
-
context
→ List<
Map< String, Object?> > -
The
contextof AG-UI'sRunAgentInput: one entry for every.sees.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
seen
→ Map<
String, Object?> -
The value of every
.seesby its name, as JSON.latefinal -
toolNames
→ Iterable<
String> -
The names of the tools this listing lists.
no setter
-
tools
→ List<
Map< String, Object?> > -
The
toolsof AG-UI'sRunAgentInput: the methods listed when this listing was read.no setter
Methods
-
call(
String tool, Map< String, Object?> arguments, {bool approved = false}) → Future<Object?> -
Calls the method behind
toolwith the agent's JSONargumentsand returns its result as JSON. -
description(
String tool) → String -
The doc comment of
tool, as the agent got it. Throws a StateError for a tool this listing does not list. -
lists(
String tool) → bool -
needsApproval(
String tool) → bool -
Whether a call of
toolwaits for the user's approval, by the agent list as it is now. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parameters(
String tool) → Map< String, Object?> ? -
The JSON Schema of the arguments of
tool, or null for a tool this listing does not list. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited