startAdkWebServer function
Future<HttpServer>
startAdkWebServer({
- 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,
Starts an AdkWebServer with one call.
Returns the bound HttpServer.
Implementation
Future<HttpServer> startAdkWebServer({
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,
}) async {
final AdkWebServer server = AdkWebServer(
agentsDir: agentsDir,
appName: appName,
port: port,
host: host,
allowOrigins: allowOrigins,
sessionServiceUri: sessionServiceUri,
artifactServiceUri: artifactServiceUri,
memoryServiceUri: memoryServiceUri,
useLocalStorage: useLocalStorage,
urlPrefix: urlPrefix,
autoCreateSession: autoCreateSession,
enableWebUi: enableWebUi,
logoText: logoText,
logoImageUrl: logoImageUrl,
);
return server.start();
}