Skip to content

SaveBrowserSessionProfile

Source: src/AWS/BedrockAgentCore/SaveBrowserSessionProfile.ts

Persists a browser session’s state to a reusable browser profile.

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

// init
const saveBrowserSessionProfile = yield* AgentCore.SaveBrowserSessionProfile(browser);
return {
fetch: Effect.gen(function* () {
// runtime
yield* saveBrowserSessionProfile({
sessionId,
profileIdentifier,
});
return HttpServerResponse.json({ saved: true });
}),
};