AdkWebServer class
Configurable wrapper that starts and stops the ADK dev web server.
Constructors
-
AdkWebServer({required String agentsDir, String appName = '', int port = 8000, String host = '127.0.0.1', List<
String> allowOrigins = const <String>[], String? sessionServiceUri, String? artifactServiceUri, String? memoryServiceUri, bool useLocalStorage = true, String? urlPrefix, bool autoCreateSession = false, bool enableWebUi = true, String? logoText, String? logoImageUrl}) -
Creates a web server launcher for
agentsDir.
Properties
- agentsDir → String
-
Root directory containing one or more app folders.
final
-
allowOrigins
→ List<
String> -
CORS allow-list entries.
final
- appName → String
-
Preferred app folder name when agentsDir contains multiple apps.
final
- artifactServiceUri → String?
-
Optional artifact service URI.
final
- autoCreateSession → bool
-
Whether to create missing sessions automatically on
/run.final - enableWebUi → bool
-
Whether to serve the Dev UI in addition to API routes.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- host → String
-
Host address to bind.
final
- logoImageUrl → String?
-
Optional image URL for the Dev UI logo.
final
- logoText → String?
-
Optional custom header text for the Dev UI.
final
- memoryServiceUri → String?
-
Optional memory service URI.
final
- port → int
-
TCP port to bind.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionServiceUri → String?
-
Optional session service URI.
final
- urlPrefix → String?
-
Optional URL path prefix, for example
/adk.final - useLocalStorage → bool
-
Whether to persist local
.adkstate when service URIs are unset.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
start(
) → Future< HttpServer> - Starts the server and returns the bound HttpServer.
-
stop(
) → Future< void> - Stops the running server and releases runtime resources.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited