Skip to content

StopBrowserSession

Source: src/AWS/BedrockAgentCore/StopBrowserSession.ts

Terminates an active browser session.

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

// init
const stopBrowserSession = yield* AgentCore.StopBrowserSession(browser);
return {
fetch: Effect.gen(function* () {
// runtime
yield* stopBrowserSession({ sessionId });
return HttpServerResponse.json({ stopped: true });
}),
};