Amazon Bedrock AgentCore

2026/02/05 - Amazon Bedrock AgentCore - 1 new2 updated api methods

Changes  Support Browser profile persistence (cookies and local storage) across sessions for AgentCore Browser.

SaveBrowserSessionProfile (new) Link ¶

Saves the current state of a browser session as a reusable profile in Amazon Bedrock AgentCore. A browser profile captures persistent browser data such as cookies and local storage from an active session, enabling you to reuse this data in future browser sessions.

To save a browser session profile, you must specify the profile identifier, browser identifier, and session ID. The session must be active when saving the profile. Once saved, the profile can be used with the StartBrowserSession operation to initialize new sessions with the stored browser state.

Browser profiles are useful for scenarios that require persistent authentication, maintaining user preferences across sessions, or continuing tasks that depend on previously stored browser data.

The following operations are related to SaveBrowserSessionProfile:

See also: AWS API Documentation

Request Syntax

client.save_browser_session_profile(
    traceId='string',
    traceParent='string',
    profileIdentifier='string',
    browserIdentifier='string',
    sessionId='string',
    clientToken='string'
)
type traceId:

string

param traceId:

The trace identifier for request tracking.

type traceParent:

string

param traceParent:

The parent trace information for distributed tracing.

type profileIdentifier:

string

param profileIdentifier:

[REQUIRED]

The unique identifier for the browser profile. This identifier is used to reference the profile when starting new browser sessions. The identifier must follow the pattern of an alphanumeric name (up to 48 characters) followed by a hyphen and a 10-character alphanumeric suffix.

type browserIdentifier:

string

param browserIdentifier:

[REQUIRED]

The unique identifier of the browser associated with the session from which to save the profile.

type sessionId:

string

param sessionId:

[REQUIRED]

The unique identifier of the browser session from which to save the profile. The session must be active when saving the profile.

type clientToken:

string

param clientToken:

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock AgentCore ignores the request, but does not return an error.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'profileIdentifier': 'string',
    'browserIdentifier': 'string',
    'sessionId': 'string',
    'lastUpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • profileIdentifier (string) --

      The unique identifier of the saved browser profile.

    • browserIdentifier (string) --

      The unique identifier of the browser associated with the session from which the profile was saved.

    • sessionId (string) --

      The unique identifier of the browser session from which the profile was saved.

    • lastUpdatedAt (datetime) --

      The timestamp when the browser profile was last updated. This value is in ISO 8601 format.

GetBrowserSession (updated) Link ¶
Changes (response)
{'profileConfiguration': {'profileIdentifier': 'string'}}

Retrieves detailed information about a specific browser session in Amazon Bedrock AgentCore. This operation returns the session's configuration, current status, associated streams, and metadata.

To get a browser session, you must specify both the browser identifier and the session ID. The response includes information about the session's viewport configuration, timeout settings, and stream endpoints.

The following operations are related to GetBrowserSession:

See also: AWS API Documentation

Request Syntax

client.get_browser_session(
    browserIdentifier='string',
    sessionId='string'
)
type browserIdentifier:

string

param browserIdentifier:

[REQUIRED]

The unique identifier of the browser associated with the session.

type sessionId:

string

param sessionId:

[REQUIRED]

The unique identifier of the browser session to retrieve.

rtype:

dict

returns:

Response Syntax

{
    'browserIdentifier': 'string',
    'sessionId': 'string',
    'name': 'string',
    'createdAt': datetime(2015, 1, 1),
    'viewPort': {
        'width': 123,
        'height': 123
    },
    'extensions': [
        {
            'location': {
                's3': {
                    'bucket': 'string',
                    'prefix': 'string',
                    'versionId': 'string'
                }
            }
        },
    ],
    'profileConfiguration': {
        'profileIdentifier': 'string'
    },
    'sessionTimeoutSeconds': 123,
    'status': 'READY'|'TERMINATED',
    'streams': {
        'automationStream': {
            'streamEndpoint': 'string',
            'streamStatus': 'ENABLED'|'DISABLED'
        },
        'liveViewStream': {
            'streamEndpoint': 'string'
        }
    },
    'sessionReplayArtifact': 'string',
    'lastUpdatedAt': datetime(2015, 1, 1)
}

Response Structure

  • (dict) --

    • browserIdentifier (string) --

      The identifier of the browser.

    • sessionId (string) --

      The identifier of the browser session.

    • name (string) --

      The name of the browser session.

    • createdAt (datetime) --

      The time at which the browser session was created.

    • viewPort (dict) --

      The configuration that defines the dimensions of a browser viewport in a browser session. The viewport determines the visible area of web content and affects how web pages are rendered and displayed. Proper viewport configuration ensures that web content is displayed correctly for the agent's browsing tasks.

      • width (integer) --

        The width of the viewport in pixels. This value determines the horizontal dimension of the visible area. Valid values range from 800 to 1920 pixels.

      • height (integer) --

        The height of the viewport in pixels. This value determines the vertical dimension of the visible area. Valid values range from 600 to 1080 pixels.

    • extensions (list) --

      The list of browser extensions that are configured in the browser session.

      • (dict) --

        Browser extension configuration.

        • location (dict) --

          The location where the browser extension files are stored. This specifies the source from which the extension will be loaded and installed.

          • s3 (dict) --

            The Amazon S3 location of the resource. Use this when the resource is stored in an Amazon S3 bucket.

            • bucket (string) --

              The name of the Amazon S3 bucket where the resource is stored.

            • prefix (string) --

              The name of the Amazon S3 prefix/key where the resource is stored.

            • versionId (string) --

              The name of the Amazon S3 version ID where the resource is stored (Optional).

    • profileConfiguration (dict) --

      The browser profile configuration associated with this session. Contains the profile identifier that links to persistent browser data such as cookies and local storage.

      • profileIdentifier (string) --

        The unique identifier of the browser profile. This identifier is used to reference the profile when starting new browser sessions or saving session data to the profile.

    • sessionTimeoutSeconds (integer) --

      The timeout period for the browser session in seconds.

    • status (string) --

      The current status of the browser session. Possible values include ACTIVE, STOPPING, and STOPPED.

    • streams (dict) --

      The streams associated with this browser session. These include the automation stream and live view stream.

      • automationStream (dict) --

        The stream that enables programmatic control of the browser. This stream allows agents to perform actions such as navigating to URLs, clicking elements, and filling forms.

        • streamEndpoint (string) --

          The endpoint URL for the automation stream. This URL is used to establish a WebSocket connection to the stream for sending commands and receiving responses.

        • streamStatus (string) --

          The current status of the automation stream. This indicates whether the stream is available for use. Possible values include ACTIVE, CONNECTING, and DISCONNECTED.

      • liveViewStream (dict) --

        The stream that provides a visual representation of the browser content. This stream allows agents to observe the current state of the browser, including rendered web pages and visual elements.

        • streamEndpoint (string) --

          The endpoint URL for the live view stream. This URL is used to establish a connection to receive visual updates from the browser session.

    • sessionReplayArtifact (string) --

      The artifact containing the session replay information.

    • lastUpdatedAt (datetime) --

      The time at which the browser session was last updated.

StartBrowserSession (updated) Link ¶
Changes (request)
{'profileConfiguration': {'profileIdentifier': 'string'}}

Creates and initializes a browser session in Amazon Bedrock AgentCore. The session enables agents to navigate and interact with web content, extract information from websites, and perform web-based tasks as part of their response generation.

To create a session, you must specify a browser identifier and a name. You can also configure the viewport dimensions to control the visible area of web content. The session remains active until it times out or you explicitly stop it using the StopBrowserSession operation.

The following operations are related to StartBrowserSession:

See also: AWS API Documentation

Request Syntax

client.start_browser_session(
    traceId='string',
    traceParent='string',
    browserIdentifier='string',
    name='string',
    sessionTimeoutSeconds=123,
    viewPort={
        'width': 123,
        'height': 123
    },
    extensions=[
        {
            'location': {
                's3': {
                    'bucket': 'string',
                    'prefix': 'string',
                    'versionId': 'string'
                }
            }
        },
    ],
    profileConfiguration={
        'profileIdentifier': 'string'
    },
    clientToken='string'
)
type traceId:

string

param traceId:

The trace identifier for request tracking.

type traceParent:

string

param traceParent:

The parent trace information for distributed tracing.

type browserIdentifier:

string

param browserIdentifier:

[REQUIRED]

The unique identifier of the browser to use for this session. This identifier specifies which browser environment to initialize for the session.

type name:

string

param name:

The name of the browser session. This name helps you identify and manage the session. The name does not need to be unique.

type sessionTimeoutSeconds:

integer

param sessionTimeoutSeconds:

The time in seconds after which the session automatically terminates if there is no activity. The default value is 3600 seconds (1 hour). The minimum allowed value is 60 seconds, and the maximum allowed value is 28800 seconds (8 hours).

type viewPort:

dict

param viewPort:

The dimensions of the browser viewport for this session. This determines the visible area of the web content and affects how web pages are rendered. If not specified, Amazon Bedrock AgentCore uses a default viewport size.

  • width (integer) -- [REQUIRED]

    The width of the viewport in pixels. This value determines the horizontal dimension of the visible area. Valid values range from 800 to 1920 pixels.

  • height (integer) -- [REQUIRED]

    The height of the viewport in pixels. This value determines the vertical dimension of the visible area. Valid values range from 600 to 1080 pixels.

type extensions:

list

param extensions:

A list of browser extensions to load into the browser session.

  • (dict) --

    Browser extension configuration.

    • location (dict) -- [REQUIRED]

      The location where the browser extension files are stored. This specifies the source from which the extension will be loaded and installed.

      • s3 (dict) --

        The Amazon S3 location of the resource. Use this when the resource is stored in an Amazon S3 bucket.

        • bucket (string) -- [REQUIRED]

          The name of the Amazon S3 bucket where the resource is stored.

        • prefix (string) -- [REQUIRED]

          The name of the Amazon S3 prefix/key where the resource is stored.

        • versionId (string) --

          The name of the Amazon S3 version ID where the resource is stored (Optional).

type profileConfiguration:

dict

param profileConfiguration:

The browser profile configuration to use for this session. A browser profile contains persistent data such as cookies and local storage that can be reused across multiple browser sessions. If specified, the session initializes with the profile's stored data, enabling continuity for tasks that require authentication or personalized settings.

  • profileIdentifier (string) -- [REQUIRED]

    The unique identifier of the browser profile. This identifier is used to reference the profile when starting new browser sessions or saving session data to the profile.

type clientToken:

string

param clientToken:

A unique, case-sensitive identifier to ensure that the API request completes no more than one time. If this token matches a previous request, Amazon Bedrock AgentCore ignores the request, but does not return an error. This parameter helps prevent the creation of duplicate sessions if there are temporary network issues.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'browserIdentifier': 'string',
    'sessionId': 'string',
    'createdAt': datetime(2015, 1, 1),
    'streams': {
        'automationStream': {
            'streamEndpoint': 'string',
            'streamStatus': 'ENABLED'|'DISABLED'
        },
        'liveViewStream': {
            'streamEndpoint': 'string'
        }
    }
}

Response Structure

  • (dict) --

    • browserIdentifier (string) --

      The identifier of the browser.

    • sessionId (string) --

      The unique identifier of the created browser session.

    • createdAt (datetime) --

      The timestamp when the browser session was created.

    • streams (dict) --

      The streams associated with this browser session. These include the automation stream and live view stream.

      • automationStream (dict) --

        The stream that enables programmatic control of the browser. This stream allows agents to perform actions such as navigating to URLs, clicking elements, and filling forms.

        • streamEndpoint (string) --

          The endpoint URL for the automation stream. This URL is used to establish a WebSocket connection to the stream for sending commands and receiving responses.

        • streamStatus (string) --

          The current status of the automation stream. This indicates whether the stream is available for use. Possible values include ACTIVE, CONNECTING, and DISCONNECTED.

      • liveViewStream (dict) --

        The stream that provides a visual representation of the browser content. This stream allows agents to observe the current state of the browser, including rendered web pages and visual elements.

        • streamEndpoint (string) --

          The endpoint URL for the live view stream. This URL is used to establish a connection to receive visual updates from the browser session.