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 AgentSurface.agentCapabilities and names its items with the generated AgentSurface.agentSchema.
factory

Properties

context → List<Map<String, Object?>>
The context of AG-UI's RunAgentInput: one entry for every .sees.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
tools → List<Map<String, Object?>>
The tools of AG-UI's RunAgentInput: 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 tool with the agent's JSON arguments and 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 tool waits 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
toString() → String
A string representation of this object.
inherited

Operators

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