Skip to content

ListBrowserSessions

Source: src/AWS/BedrockAgentCore/ListBrowserSessions.ts

Lists the browser’s sessions.

Bind a BrowserCustom inside a function runtime to call the AgentCore data-plane API against it. Provide AgentCore.ListBrowserSessionsHttp on the Function effect to implement the binding.

// init
const listBrowserSessions = yield* AgentCore.ListBrowserSessions(browser);
return {
fetch: Effect.gen(function* () {
// runtime
const result = yield* listBrowserSessions({});
return HttpServerResponse.json({ count: result.items?.length ?? 0 });
}),
};