2025/07/16 - Amazon Bedrock AgentCore Data Plane Fronting Layer - 26 new api methods
Changes Initial release of Amazon Bedrock AgentCore SDK including Runtime, Built-In Tools, Memory, Gateway and Identity.
Retrieves information about a specific event in a memory store.
To use this operation, you must have the genesismemory:GetEvent permission.
See also: AWS API Documentation
Request Syntax
client.get_event( memoryId='string', sessionId='string', actorId='string', eventId='string' )
string
[REQUIRED]
The identifier of the memory store containing the event.
string
[REQUIRED]
The identifier of the session containing the event.
string
[REQUIRED]
The identifier of the actor associated with the event.
string
[REQUIRED]
The identifier of the event to retrieve.
dict
Response Syntax
{ 'event': { 'memoryId': 'string', 'actorId': 'string', 'sessionId': 'string', 'eventId': 'string', 'eventTimestamp': datetime(2015, 1, 1), 'payload': [ { 'conversational': { 'content': { 'text': 'string' }, 'role': 'ASSISTANT'|'USER'|'TOOL'|'OTHER' }, 'blob': {...}|[...]|123|123.4|'string'|True|None }, ], 'branch': { 'rootEventId': 'string', 'name': 'string' } } }
Response Structure
(dict) --
event (dict) --
The requested event information.
memoryId (string) --
The identifier of the memory store containing the event.
actorId (string) --
The identifier of the actor associated with the event.
sessionId (string) --
The identifier of the session containing the event.
eventId (string) --
The unique identifier of the event.
eventTimestamp (datetime) --
The timestamp when the event occurred.
payload (list) --
The content payload of the event.
(dict) --
Contains the payload content for an event.
conversational (dict) --
The conversational content of the payload.
content (dict) --
The content of the conversation message.
text (string) --
The text content of the memory item.
role (string) --
The role of the participant in the conversation (for example, "user" or "assistant").
blob (:ref:`document<document>`) --
The binary content of the payload.
branch (dict) --
The branch information for the event.
rootEventId (string) --
The identifier of the root event for this branch.
name (string) --
The name of the branch.
Lists sessions in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the genesismemory:ListSessions permission.
See also: AWS API Documentation
Request Syntax
client.list_sessions( memoryId='string', actorId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the memory store for which to list sessions.
string
[REQUIRED]
The identifier of the actor for which to list sessions. If specified, only sessions involving this actor are returned.
integer
The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
dict
Response Syntax
{ 'sessionSummaries': [ { 'sessionId': 'string', 'actorId': 'string', 'createdAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
sessionSummaries (list) --
The list of session summaries that match the specified criteria.
(dict) --
Contains summary information about a session in a memory store.
sessionId (string) --
The unique identifier of the session.
actorId (string) --
The identifier of the actor associated with the session.
createdAt (datetime) --
The timestamp when the session was created.
nextToken (string) --
The token to use in a subsequent request to get the next set of results. This value is null when there are no more results to return.
Obtains an Workload access token for agentic workloads not acting on behalf of user.
See also: AWS API Documentation
Request Syntax
client.get_workload_access_token( workloadName='string' )
string
[REQUIRED]
Unique identifier for the registered agent
dict
Response Syntax
{ 'workloadAccessToken': 'string' }
Response Structure
(dict) --
workloadAccessToken (string) --
Opaque token representing both agent and user identity
Updates a browser stream. To use this operation, you must have permissions to perform the bedrock:UpdateBrowserStream action.
See also: AWS API Documentation
Request Syntax
client.update_browser_stream( browserIdentifier='string', sessionId='string', streamUpdate={ 'automationStreamUpdate': { 'streamStatus': 'ENABLED'|'DISABLED' } }, clientToken='string' )
string
[REQUIRED]
The identifier of the browser.
string
[REQUIRED]
The identifier of the browser session.
dict
[REQUIRED]
The update to apply to the browser stream.
automationStreamUpdate (dict) --
The update to an automation stream.
streamStatus (string) --
The status of the automation stream.
string
A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, Amazon Bedrock ignores the request, but does not return an error.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'browserIdentifier': 'string', 'sessionId': 'string', 'streams': { 'automationStream': { 'streamEndpoint': 'string', 'streamStatus': 'ENABLED'|'DISABLED' }, 'liveViewStream': { 'streamEndpoint': 'string' } }, 'updatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) --
browserIdentifier (string) --
The identifier of the browser.
sessionId (string) --
The identifier of the browser session.
streams (dict) --
The collection of streams associated with a browser session in Amazon Bedrock. These streams provide different ways to interact with and observe the browser session, including programmatic control and visual representation of the browser content.
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.
updatedAt (datetime) --
The time at which the browser stream was updated.
Searches for and retrieves memory records from a memory store based on specified search criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the genesismemory:RetrieveMemoryRecords permission.
See also: AWS API Documentation
Request Syntax
client.retrieve_memory_records( memoryId='string', namespace='string', searchCriteria={ 'searchQuery': 'string', 'memoryStrategyId': 'string', 'topK': 123 }, nextToken='string', maxResults=123 )
string
[REQUIRED]
The identifier of the memory store from which to retrieve memory records.
string
[REQUIRED]
The namespace to filter memory records by. If specified, only memory records in this namespace are searched.
dict
[REQUIRED]
The search criteria to use for finding relevant memory records. This includes the search query, memory strategy ID, and other search parameters.
searchQuery (string) -- [REQUIRED]
The search query to use for finding relevant memory records.
memoryStrategyId (string) --
The memory strategy identifier to filter memory records by.
topK (integer) --
The maximum number of top-scoring memory records to return. This value is used for semantic search ranking.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
integer
The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.
dict
Response Syntax
{ 'memoryRecordSummaries': [ { 'memoryRecordId': 'string', 'content': { 'text': 'string' }, 'memoryStrategyId': 'string', 'namespaces': [ 'string', ], 'createdAt': datetime(2015, 1, 1), 'score': 123.0 }, ], 'nextToken': 'string' }
Response Structure
(dict) --
memoryRecordSummaries (list) --
The list of memory record summaries that match the search criteria, ordered by relevance.
(dict) --
Contains summary information about a memory record.
memoryRecordId (string) --
The unique identifier of the memory record.
content (dict) --
The content of the memory record.
text (string) --
The text content of the memory record.
memoryStrategyId (string) --
The identifier of the memory strategy associated with this record.
namespaces (list) --
The namespaces associated with this memory record.
(string) --
createdAt (datetime) --
The timestamp when the memory record was created.
score (float) --
The relevance score of the memory record when returned as part of a search result. Higher values indicate greater relevance to the search query.
nextToken (string) --
The token to use in a subsequent request to get the next set of results. This value is null when there are no more results to return.
Retrieves a list of code interpreter sessions in Amazon Bedrock that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
You can filter the results by code interpreter identifier and session status. The operation supports pagination to handle large result sets efficiently.
We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.
The following operations are related to ListCodeInterpreterSessions:
See also: AWS API Documentation
Request Syntax
client.list_code_interpreter_sessions( codeInterpreterIdentifier='string', maxResults=123, nextToken='string', status='READY'|'TERMINATED' )
string
[REQUIRED]
The unique identifier of the code interpreter to list sessions for. If specified, only sessions for this code interpreter are returned. If not specified, sessions for all code interpreters are returned.
integer
The maximum number of results to return in a single call. The default value is 10. Valid values range from 1 to 100. To retrieve the remaining results, make another call with the returned nextToken value.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. If not specified, Amazon Bedrock returns the first page of results.
string
The status of the code interpreter sessions to list. Valid values include ACTIVE, STOPPING, and STOPPED. If not specified, sessions with any status are returned.
dict
Response Syntax
{ 'items': [ { 'codeInterpreterIdentifier': 'string', 'sessionId': 'string', 'name': 'string', 'status': 'READY'|'TERMINATED', 'createdAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
items (list) --
The list of code interpreter sessions that match the specified criteria.
(dict) --
A condensed representation of a code interpreter session in Amazon Bedrock. This structure contains key information about a code interpreter session, including identifiers, status, and timestamps, without the full details of the session configuration.
codeInterpreterIdentifier (string) --
The unique identifier of the code interpreter associated with the session. This identifier specifies which code interpreter environment is used for the session.
sessionId (string) --
The unique identifier of the code interpreter session. This identifier is used in operations that interact with the session.
name (string) --
The name of the code interpreter session. This name helps identify and manage the session.
status (string) --
The current status of the code interpreter session. Possible values include ACTIVE, STOPPING, and STOPPED.
createdAt (datetime) --
The timestamp when the code interpreter session was created. This value is in ISO 8601 format.
lastUpdatedAt (datetime) --
The timestamp when the code interpreter session was last updated. This value is in ISO 8601 format.
nextToken (string) --
The token to use in a subsequent ListCodeInterpreterSessions request to get the next set of results.
Obtains an Workload access token for agentic workloads acting on behalf of user with JWT token
See also: AWS API Documentation
Request Syntax
client.get_workload_access_token_for_jwt( workloadName='string', userToken='string' )
string
[REQUIRED]
Unique identifier for the registered agent
string
[REQUIRED]
OAuth2 token issued by the user's identity provider
dict
Response Syntax
{ 'workloadAccessToken': 'string' }
Response Structure
(dict) --
workloadAccessToken (string) --
Opaque token representing both agent and user identity
Terminates an active code interpreter session in Amazon Bedrock. This operation stops the session, releases associated resources, and makes the session unavailable for further use.
To stop a code interpreter session, you must specify both the code interpreter identifier and the session ID. Once stopped, a session cannot be restarted; you must create a new session using StartCodeInterpreterSession.
The following operations are related to StopCodeInterpreterSession:
See also: AWS API Documentation
Request Syntax
client.stop_code_interpreter_session( codeInterpreterIdentifier='string', sessionId='string', clientToken='string' )
string
[REQUIRED]
The unique identifier of the code interpreter associated with the session.
string
[REQUIRED]
The unique identifier of the code interpreter session to stop.
string
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 ignores the request, but does not return an error.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'codeInterpreterIdentifier': 'string', 'sessionId': 'string', 'lastUpdatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) --
codeInterpreterIdentifier (string) --
The identifier of the code interpreter.
sessionId (string) --
The identifier of the code interpreter session.
lastUpdatedAt (datetime) --
The timestamp when the code interpreter session was last updated.
Creates an event in a memory store. Events represent interactions or activities that occur within a session and are associated with specific actors.
To use this operation, you must have the genesismemory:CreateEvent permission.
This operation is subject to request rate limiting.
See also: AWS API Documentation
Request Syntax
client.create_event( memoryId='string', actorId='string', sessionId='string', eventTimestamp=datetime(2015, 1, 1), payload=[ { 'conversational': { 'content': { 'text': 'string' }, 'role': 'ASSISTANT'|'USER'|'TOOL'|'OTHER' }, 'blob': {...}|[...]|123|123.4|'string'|True|None }, ], branch={ 'rootEventId': 'string', 'name': 'string' }, clientToken='string' )
string
[REQUIRED]
The identifier of the memory store in which to create the event.
string
[REQUIRED]
The identifier of the actor associated with this event. An actor represents an entity that participates in sessions and generates events.
string
The identifier of the session in which this event occurs. A session represents a sequence of related events.
datetime
[REQUIRED]
The timestamp when the event occurred. If not specified, the current time is used.
list
[REQUIRED]
The content payload of the event. This can include conversational data or binary content.
(dict) --
Contains the payload content for an event.
conversational (dict) --
The conversational content of the payload.
content (dict) -- [REQUIRED]
The content of the conversation message.
text (string) --
The text content of the memory item.
role (string) -- [REQUIRED]
The role of the participant in the conversation (for example, "user" or "assistant").
blob (:ref:`document<document>`) --
The binary content of the payload.
dict
The branch information for this event. Branches allow for organizing events into different conversation threads or paths.
rootEventId (string) --
The identifier of the root event for this branch.
name (string) -- [REQUIRED]
The name of the branch.
string
A unique, case-sensitive identifier to ensure that the operation completes no more than one time. If this token matches a previous request, AgentCore ignores the request, but does not return an error.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'event': { 'memoryId': 'string', 'actorId': 'string', 'sessionId': 'string', 'eventId': 'string', 'eventTimestamp': datetime(2015, 1, 1), 'payload': [ { 'conversational': { 'content': { 'text': 'string' }, 'role': 'ASSISTANT'|'USER'|'TOOL'|'OTHER' }, 'blob': {...}|[...]|123|123.4|'string'|True|None }, ], 'branch': { 'rootEventId': 'string', 'name': 'string' } } }
Response Structure
(dict) --
event (dict) --
The event that was created.
memoryId (string) --
The identifier of the memory store containing the event.
actorId (string) --
The identifier of the actor associated with the event.
sessionId (string) --
The identifier of the session containing the event.
eventId (string) --
The unique identifier of the event.
eventTimestamp (datetime) --
The timestamp when the event occurred.
payload (list) --
The content payload of the event.
(dict) --
Contains the payload content for an event.
conversational (dict) --
The conversational content of the payload.
content (dict) --
The content of the conversation message.
text (string) --
The text content of the memory item.
role (string) --
The role of the participant in the conversation (for example, "user" or "assistant").
blob (:ref:`document<document>`) --
The binary content of the payload.
branch (dict) --
The branch information for the event.
rootEventId (string) --
The identifier of the root event for this branch.
name (string) --
The name of the branch.
Executes code within an active code interpreter session in Amazon Bedrock. This operation processes the provided code, runs it in a secure environment, and returns the execution results including output, errors, and generated visualizations.
To execute code, you must specify the code interpreter identifier, session ID, and the code to run in the arguments parameter. The operation returns a stream containing the execution results, which can include text output, error messages, and data visualizations.
This operation is subject to request rate limiting based on your account's service quotas.
The following operations are related to InvokeCodeInterpreter:
See also: AWS API Documentation
Request Syntax
client.invoke_code_interpreter( codeInterpreterIdentifier='string', sessionId='string', name='executeCode'|'executeCommand'|'readFiles'|'listFiles'|'removeFiles'|'writeFiles'|'startCommandExecution'|'getTask'|'stopTask', arguments={ 'code': 'string', 'language': 'python'|'javascript'|'typescript', 'clearContext': True|False, 'command': 'string', 'path': 'string', 'paths': [ 'string', ], 'content': [ { 'path': 'string', 'text': 'string', 'blob': b'bytes' }, ], 'directoryPath': 'string', 'taskId': 'string' } )
string
[REQUIRED]
The unique identifier of the code interpreter associated with the session. This must match the identifier used when creating the session with StartCodeInterpreterSession.
string
The unique identifier of the code interpreter session to use. This must be an active session created with StartCodeInterpreterSession. If the session has expired or been stopped, the request will fail.
string
[REQUIRED]
The name of the code interpreter to invoke.
dict
The arguments for the code interpreter. This includes the code to execute and any additional parameters such as the programming language, whether to clear the execution context, and other execution options. The structure of this parameter depends on the specific code interpreter being used.
code (string) --
The code to execute in a code interpreter session. This is the source code in the specified programming language that will be executed by the code interpreter.
language (string) --
The programming language of the code to execute. This tells the code interpreter which language runtime to use for execution. Common values include 'python', 'javascript', and 'r'.
clearContext (boolean) --
Whether to clear the context for the tool.
command (string) --
The command to execute with the tool.
path (string) --
The path for the tool operation.
paths (list) --
The paths for the tool operation.
(string) --
content (list) --
The content for the tool operation.
(dict) --
A block of input content.
path (string) -- [REQUIRED]
The path to the input content.
text (string) --
The text input content.
blob (bytes) --
The binary input content.
directoryPath (string) --
The directory path for the tool operation.
taskId (string) --
The identifier of the task for the tool operation.
dict
The response of this operation contains an :class:`.EventStream` member. When iterated the :class:`.EventStream` will yield events based on the structure below, where only one of the top level keys will be present for any given event.
Response Syntax
{ 'sessionId': 'string', 'stream': EventStream({ 'result': { 'content': [ { 'type': 'text'|'image'|'resource'|'resource_link', 'text': 'string', 'data': b'bytes', 'mimeType': 'string', 'uri': 'string', 'name': 'string', 'description': 'string', 'size': 123, 'resource': { 'type': 'text'|'blob', 'uri': 'string', 'mimeType': 'string', 'text': 'string', 'blob': b'bytes' } }, ], 'structuredContent': { 'taskId': 'string', 'taskStatus': 'submitted'|'working'|'completed'|'canceled'|'failed', 'stdout': 'string', 'stderr': 'string', 'exitCode': 123, 'executionTime': 123.0 }, 'isError': True|False }, 'accessDeniedException': { 'message': 'string' }, 'conflictException': { 'message': 'string' }, 'internalServerException': { 'message': 'string' }, 'resourceNotFoundException': { 'message': 'string' }, 'serviceQuotaExceededException': { 'message': 'string' }, 'throttlingException': { 'message': 'string' }, 'validationException': { 'message': 'string', 'reason': 'CannotParse'|'FieldValidationFailed'|'IdempotentParameterMismatchException'|'EventInOtherSession'|'ResourceConflict', 'fieldList': [ { 'name': 'string', 'message': 'string' }, ] } }) }
Response Structure
(dict) --
sessionId (string) --
The identifier of the code interpreter session.
stream (:class:`.EventStream`) --
The stream containing the results of the code execution. This includes output, errors, and execution status.
result (dict) --
The output produced by executing code in a code interpreter session in Amazon Bedrock. This structure contains the results of code execution, including textual output, structured data, and error information. Agents use these results to generate responses that incorporate computation, data analysis, and visualization.
content (list) --
The textual content of the execution result. This includes standard output from the code execution, such as print statements, console output, and text representations of results.
(dict) --
A block of content in a response.
type (string) --
The type of content in the block.
text (string) --
The text content of the block.
data (bytes) --
The binary data content of the block.
mimeType (string) --
The MIME type of the content.
uri (string) --
The URI of the content.
name (string) --
The name of the content block.
description (string) --
The description of the content block.
size (integer) --
The size of the content in bytes.
resource (dict) --
The resource associated with the content block.
type (string) --
The type of resource content.
uri (string) --
The URI of the resource content.
mimeType (string) --
The MIME type of the resource content.
text (string) --
The text resource content.
blob (bytes) --
The binary resource content.
structuredContent (dict) --
The structured content of the execution result. This includes additional metadata about the execution, such as execution time, memory usage, and structured representations of output data. The format depends on the specific code interpreter and execution context.
taskId (string) --
The identifier of the task that produced the result.
taskStatus (string) --
The status of the task that produced the result.
stdout (string) --
The standard output from the tool execution.
stderr (string) --
The standard error output from the tool execution.
exitCode (integer) --
The exit code from the tool execution.
executionTime (float) --
The execution time of the tool operation in milliseconds.
isError (boolean) --
Indicates whether the result represents an error. If true, the content contains error messages or exception information. If false, the content contains successful execution results.
accessDeniedException (dict) --
The exception that occurs when you do not have sufficient permissions to perform an action. Verify that your IAM policy includes the necessary permissions for the operation you are trying to perform.
message (string) --
conflictException (dict) --
The exception that occurs when the request conflicts with the current state of the resource. This can happen when trying to modify a resource that is currently being modified by another request, or when trying to create a resource that already exists.
message (string) --
internalServerException (dict) --
The exception that occurs when the service encounters an unexpected internal error. This is a temporary condition that will resolve itself with retries. We recommend implementing exponential backoff retry logic in your application.
message (string) --
resourceNotFoundException (dict) --
The exception that occurs when the specified resource does not exist. This can happen when using an invalid identifier or when trying to access a resource that has been deleted.
message (string) --
serviceQuotaExceededException (dict) --
The exception that occurs when the request would cause a service quota to be exceeded. Review your service quotas and either reduce your request rate or request a quota increase.
message (string) --
throttlingException (dict) --
The exception that occurs when the request was denied due to request throttling. This happens when you exceed the allowed request rate for an operation. Reduce the frequency of requests or implement exponential backoff retry logic in your application.
message (string) --
validationException (dict) --
The exception that occurs when the input fails to satisfy the constraints specified by the service. Check the error message for details about which input parameter is invalid and correct your request.
message (string) --
reason (string) --
fieldList (list) --
(dict) --
Stores information about a field passed inside a request that resulted in an exception.
name (string) --
The name of the field.
message (string) --
A message describing why this field failed validation.
Retrieves a specific memory record from a memory store.
To use this operation, you must have the genesismemory:GetMemoryRecord permission.
See also: AWS API Documentation
Request Syntax
client.get_memory_record( memoryId='string', memoryRecordId='string' )
string
[REQUIRED]
The identifier of the memory store containing the memory record.
string
[REQUIRED]
The identifier of the memory record to retrieve.
dict
Response Syntax
{ 'memoryRecord': { 'memoryRecordId': 'string', 'content': { 'text': 'string' }, 'memoryStrategyId': 'string', 'namespaces': [ 'string', ], 'createdAt': datetime(2015, 1, 1) } }
Response Structure
(dict) --
memoryRecord (dict) --
The requested memory record.
memoryRecordId (string) --
The unique identifier of the memory record.
content (dict) --
The content of the memory record.
text (string) --
The text content of the memory record.
memoryStrategyId (string) --
The identifier of the memory strategy associated with this record.
namespaces (list) --
The namespaces associated with this memory record. Namespaces help organize and categorize memory records.
(string) --
createdAt (datetime) --
The timestamp when the memory record was created.
Reaturns the Oauth2Token of the provided resource
See also: AWS API Documentation
Request Syntax
client.get_resource_oauth2_token( workloadIdentityToken='string', userId='string', resourceCredentialProviderName='string', scopes=[ 'string', ], oauth2Flow='USER_FEDERATION'|'M2M', resourceOauth2ReturnUrl='string', forceAuthentication=True|False, customParameters={ 'string': 'string' } )
string
[REQUIRED]
The identity token of the workload you want to retrive the Oauth2 Token of.
string
The user ID of the user you're retrieving the token on behalf of.
string
[REQUIRED]
Reference to the credential provider
list
[REQUIRED]
The OAuth scopes requested
(string) --
string
[REQUIRED]
The type of flow to be performed
string
Callback url to redirect after token retrieval completes. Should be one of the provideded urls during WorkloadIdentity creation
boolean
If true, always initiate a new 3LO flow
dict
Gives the ability to send extra/custom parameters to the resource credentials provider during the authorization process. Standard OAuth2 flow parameters will not be overriden.
(string) --
(string) --
dict
Response Syntax
{ 'authorizationUrl': 'string', 'accessToken': 'string' }
Response Structure
(dict) --
authorizationUrl (string) --
The URL for the authorization process, provided if the Access token requires user Authorization.
accessToken (string) --
OAuth2 token ready for use
Lists events in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the genesismemory:ListEvents permission.
See also: AWS API Documentation
Request Syntax
client.list_events( memoryId='string', sessionId='string', actorId='string', includePayloads=True|False, filter={ 'branch': { 'name': 'string', 'includeParentBranches': True|False } }, maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the memory store for which to list events.
string
[REQUIRED]
The identifier of the session for which to list events. If specified, only events from this session are returned.
string
[REQUIRED]
The identifier of the actor for which to list events. If specified, only events from this actor are returned.
boolean
Specifies whether to include event payloads in the response. Set to true to include payloads, or false to exclude them.
dict
Filter criteria to apply when listing events.
branch (dict) --
The branch filter criteria to apply when listing events.
name (string) -- [REQUIRED]
The name of the branch to filter by.
includeParentBranches (boolean) --
Specifies whether to include parent branches in the results. Set to true to include parent branches, or false to exclude them.
integer
The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
dict
Response Syntax
{ 'events': [ { 'memoryId': 'string', 'actorId': 'string', 'sessionId': 'string', 'eventId': 'string', 'eventTimestamp': datetime(2015, 1, 1), 'payload': [ { 'conversational': { 'content': { 'text': 'string' }, 'role': 'ASSISTANT'|'USER'|'TOOL'|'OTHER' }, 'blob': {...}|[...]|123|123.4|'string'|True|None }, ], 'branch': { 'rootEventId': 'string', 'name': 'string' } }, ], 'nextToken': 'string' }
Response Structure
(dict) --
events (list) --
The list of events that match the specified criteria.
(dict) --
Contains information about an event in a memory store.
memoryId (string) --
The identifier of the memory store containing the event.
actorId (string) --
The identifier of the actor associated with the event.
sessionId (string) --
The identifier of the session containing the event.
eventId (string) --
The unique identifier of the event.
eventTimestamp (datetime) --
The timestamp when the event occurred.
payload (list) --
The content payload of the event.
(dict) --
Contains the payload content for an event.
conversational (dict) --
The conversational content of the payload.
content (dict) --
The content of the conversation message.
text (string) --
The text content of the memory item.
role (string) --
The role of the participant in the conversation (for example, "user" or "assistant").
blob (:ref:`document<document>`) --
The binary content of the payload.
branch (dict) --
The branch information for the event.
rootEventId (string) --
The identifier of the root event for this branch.
name (string) --
The name of the branch.
nextToken (string) --
The token to use in a subsequent request to get the next set of results. This value is null when there are no more results to return.
Lists memory records in a memory store based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the genesismemory:ListMemoryRecords permission.
See also: AWS API Documentation
Request Syntax
client.list_memory_records( memoryId='string', namespace='string', memoryStrategyId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the memory store for which to list memory records.
string
[REQUIRED]
The namespace to filter memory records by. If specified, only memory records in this namespace are returned.
string
The memory strategy identifier to filter memory records by. If specified, only memory records with this strategy ID are returned.
integer
The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
dict
Response Syntax
{ 'memoryRecordSummaries': [ { 'memoryRecordId': 'string', 'content': { 'text': 'string' }, 'memoryStrategyId': 'string', 'namespaces': [ 'string', ], 'createdAt': datetime(2015, 1, 1), 'score': 123.0 }, ], 'nextToken': 'string' }
Response Structure
(dict) --
memoryRecordSummaries (list) --
The list of memory record summaries that match the specified criteria.
(dict) --
Contains summary information about a memory record.
memoryRecordId (string) --
The unique identifier of the memory record.
content (dict) --
The content of the memory record.
text (string) --
The text content of the memory record.
memoryStrategyId (string) --
The identifier of the memory strategy associated with this record.
namespaces (list) --
The namespaces associated with this memory record.
(string) --
createdAt (datetime) --
The timestamp when the memory record was created.
score (float) --
The relevance score of the memory record when returned as part of a search result. Higher values indicate greater relevance to the search query.
nextToken (string) --
The token to use in a subsequent request to get the next set of results. This value is null when there are no more results to return.
Retrieves detailed information about a specific code interpreter session in Amazon Bedrock. This operation returns the session's configuration, current status, and metadata.
To get a code interpreter session, you must specify both the code interpreter identifier and the session ID. The response includes information about the session's timeout settings and current status.
The following operations are related to GetCodeInterpreterSession:
See also: AWS API Documentation
Request Syntax
client.get_code_interpreter_session( codeInterpreterIdentifier='string', sessionId='string' )
string
[REQUIRED]
The unique identifier of the code interpreter associated with the session.
string
[REQUIRED]
The unique identifier of the code interpreter session to retrieve.
dict
Response Syntax
{ 'codeInterpreterIdentifier': 'string', 'sessionId': 'string', 'name': 'string', 'createdAt': datetime(2015, 1, 1), 'sessionTimeoutSeconds': 123, 'status': 'READY'|'TERMINATED' }
Response Structure
(dict) --
codeInterpreterIdentifier (string) --
The identifier of the code interpreter.
sessionId (string) --
The identifier of the code interpreter session.
name (string) --
The name of the code interpreter session.
createdAt (datetime) --
The time at which the code interpreter session was created.
sessionTimeoutSeconds (integer) --
The timeout period for the code interpreter session in seconds.
status (string) --
The current status of the code interpreter session. Possible values include ACTIVE, STOPPING, and STOPPED.
Retrieves detailed information about a specific browser session in Amazon Bedrock. 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' )
string
[REQUIRED]
The unique identifier of the browser associated with the session.
string
[REQUIRED]
The unique identifier of the browser session to retrieve.
dict
Response Syntax
{ 'browserIdentifier': 'string', 'sessionId': 'string', 'name': 'string', 'createdAt': datetime(2015, 1, 1), 'viewPort': { 'width': 123, 'height': 123 }, '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.
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.
Deletes an event from a memory store. When you delete an event, it is permanently removed.
To use this operation, you must have the genesismemory:DeleteEvent permission.
See also: AWS API Documentation
Request Syntax
client.delete_event( memoryId='string', sessionId='string', eventId='string', actorId='string' )
string
[REQUIRED]
The identifier of the memory store from which to delete the event.
string
[REQUIRED]
The identifier of the session containing the event to delete.
string
[REQUIRED]
The identifier of the event to delete.
string
[REQUIRED]
The identifier of the actor associated with the event to delete.
dict
Response Syntax
{ 'eventId': 'string' }
Response Structure
(dict) --
eventId (string) --
The identifier of the event that was deleted.
Retrieves an API Key associated with an API Key Credential Provider
See also: AWS API Documentation
Request Syntax
client.get_resource_api_key( workloadIdentityToken='string', resourceCredentialProviderName='string' )
string
[REQUIRED]
The identity token of the workload you want to get the API Key of.
string
[REQUIRED]
The credential provider name of the resource you are retrieving the API Key of.
dict
Response Syntax
{ 'apiKey': 'string' }
Response Structure
(dict) --
apiKey (string) --
The API Key associated with the resource requested.
Obtains an Workload access token for agentic workloads acting on behalf of user with User Id.
See also: AWS API Documentation
Request Syntax
client.get_workload_access_token_for_user_id( workloadName='string', userId='string' )
string
[REQUIRED]
The name of the worklaod you want to get the access token of.
string
[REQUIRED]
The user id of the user you are retrieving the access token for.
dict
Response Syntax
{ 'workloadAccessToken': 'string' }
Response Structure
(dict) --
workloadAccessToken (string) --
The workload access token of the named workload.
Creates and initializes a browser session in Amazon Bedrock. 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( browserIdentifier='string', name='string', sessionTimeoutSeconds=123, viewPort={ 'width': 123, 'height': 123 }, clientToken='string' )
string
[REQUIRED]
The unique identifier of the browser to use for this session. This identifier specifies which browser environment to initialize for the session.
string
The name of the browser session. This name helps you identify and manage the session. The name does not need to be unique.
integer
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).
dict
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 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.
string
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 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.
dict
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.
Creates and initializes a code interpreter session in Amazon Bedrock. The session enables agents to execute code as part of their response generation, supporting programming languages such as Python for data analysis, visualization, and computation tasks.
To create a session, you must specify a code interpreter identifier and a name. The session remains active until it times out or you explicitly stop it using the StopCodeInterpreterSession operation.
The following operations are related to StartCodeInterpreterSession:
See also: AWS API Documentation
Request Syntax
client.start_code_interpreter_session( codeInterpreterIdentifier='string', name='string', sessionTimeoutSeconds=123, clientToken='string' )
string
[REQUIRED]
The unique identifier of the code interpreter to use for this session. This identifier specifies which code interpreter environment to initialize for the session.
string
The name of the code interpreter session. This name helps you identify and manage the session. The name does not need to be unique.
integer
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).
string
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 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.
dict
Response Syntax
{ 'codeInterpreterIdentifier': 'string', 'sessionId': 'string', 'createdAt': datetime(2015, 1, 1) }
Response Structure
(dict) --
codeInterpreterIdentifier (string) --
The identifier of the code interpreter.
sessionId (string) --
The unique identifier of the created code interpreter session.
createdAt (datetime) --
The time at which the code interpreter session was created.
Terminates an active browser session in Amazon Bedrock. This operation stops the session, releases associated resources, and makes the session unavailable for further use.
To stop a browser session, you must specify both the browser identifier and the session ID. Once stopped, a session cannot be restarted; you must create a new session using StartBrowserSession.
The following operations are related to StopBrowserSession:
See also: AWS API Documentation
Request Syntax
client.stop_browser_session( browserIdentifier='string', sessionId='string', clientToken='string' )
string
[REQUIRED]
The unique identifier of the browser associated with the session.
string
[REQUIRED]
The unique identifier of the browser session to stop.
string
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 ignores the request, but does not return an error.
This field is autopopulated if not provided.
dict
Response Syntax
{ 'browserIdentifier': 'string', 'sessionId': 'string', 'lastUpdatedAt': datetime(2015, 1, 1) }
Response Structure
(dict) --
browserIdentifier (string) --
The identifier of the browser.
sessionId (string) --
The identifier of the browser session.
lastUpdatedAt (datetime) --
The time at which the browser session was last updated.
Lists all actors in a memory store. We recommend using pagination to ensure that the operation returns quickly and successfully.
To use this operation, you must have the genesismemory:ListActors permission.
See also: AWS API Documentation
Request Syntax
client.list_actors( memoryId='string', maxResults=123, nextToken='string' )
string
[REQUIRED]
The identifier of the memory store for which to list actors.
integer
The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results.
dict
Response Syntax
{ 'actorSummaries': [ { 'actorId': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
actorSummaries (list) --
The list of actor summaries.
(dict) --
Contains summary information about an actor in a memory store.
actorId (string) --
The unique identifier of the actor.
nextToken (string) --
The token to use in a subsequent request to get the next set of results. This value is null when there are no more results to return.
Retrieves a list of browser sessions in Amazon Bedrock that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
You can filter the results by browser identifier and session status. The operation supports pagination to handle large result sets efficiently.
We recommend using pagination to ensure that the operation returns quickly and successfully when retrieving large numbers of sessions.
The following operations are related to ListBrowserSessions:
See also: AWS API Documentation
Request Syntax
client.list_browser_sessions( browserIdentifier='string', maxResults=123, nextToken='string', status='READY'|'TERMINATED' )
string
[REQUIRED]
The unique identifier of the browser to list sessions for. If specified, only sessions for this browser are returned. If not specified, sessions for all browsers are returned.
integer
The maximum number of results to return in a single call. The default value is 10. Valid values range from 1 to 100. To retrieve the remaining results, make another call with the returned nextToken value.
string
The token for the next set of results. Use the value returned in the previous response in the next request to retrieve the next set of results. If not specified, Amazon Bedrock returns the first page of results.
string
The status of the browser sessions to list. Valid values include ACTIVE, STOPPING, and STOPPED. If not specified, sessions with any status are returned.
dict
Response Syntax
{ 'items': [ { 'browserIdentifier': 'string', 'sessionId': 'string', 'name': 'string', 'status': 'READY'|'TERMINATED', 'createdAt': datetime(2015, 1, 1), 'lastUpdatedAt': datetime(2015, 1, 1) }, ], 'nextToken': 'string' }
Response Structure
(dict) --
items (list) --
The list of browser sessions that match the specified criteria.
(dict) --
A condensed representation of a browser session in Amazon Bedrock. This structure contains key information about a browser session, including identifiers, status, and timestamps, without the full details of the session configuration and streams.
browserIdentifier (string) --
The unique identifier of the browser associated with the session. This identifier specifies which browser environment is used for the session.
sessionId (string) --
The unique identifier of the browser session. This identifier is used in operations that interact with the session.
name (string) --
The name of the browser session. This name helps identify and manage the session.
status (string) --
The current status of the browser session. Possible values include ACTIVE, STOPPING, and STOPPED.
createdAt (datetime) --
The timestamp when the browser session was created. This value is in ISO 8601 format.
lastUpdatedAt (datetime) --
The timestamp when the browser session was last updated. This value is in ISO 8601 format.
nextToken (string) --
The token to use in a subsequent ListBrowserSessions request to get the next set of results.
Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time. The agent processes the request using the configured foundation model and any associated knowledge bases or action groups.
To invoke an agent runtime, you must specify the agent runtime ARN and provide a payload containing your request. You can optionally specify a qualifier to target a specific version or alias of the agent.
This operation supports streaming responses, allowing you to receive partial responses as they become available. We recommend using pagination to ensure that the operation returns quickly and successfully when processing large responses.
See also: AWS API Documentation
Request Syntax
client.invoke_agent_runtime( contentType='string', accept='string', mcpSessionId='string', runtimeSessionId='string', mcpProtocolVersion='string', runtimeUserId='string', traceId='string', traceParent='string', traceState='string', baggage='string', agentRuntimeArn='string', qualifier='string', payload=b'bytes'|file )
string
The MIME type of the input data in the payload. This tells the agent runtime how to interpret the payload data. Common values include application/json for JSON data.
string
The desired MIME type for the response from the agent runtime. This tells the agent runtime what format to use for the response data. Common values include application/json for JSON data.
string
The identifier of the MCP session.
string
The identifier of the runtime session.
This field is autopopulated if not provided.
string
The version of the MCP protocol being used.
string
The identifier of the runtime user.
string
The trace identifier for request tracking.
string
The parent trace information for distributed tracing.
string
The trace state information for distributed tracing.
string
Additional context information for distributed tracing.
string
[REQUIRED]
The Amazon Web Services Resource Name (ARN) of the agent runtime to invoke. The ARN uniquely identifies the agent runtime resource in Amazon Bedrock.
string
The qualifier to use for the agent runtime. This can be a version number or an alias name that points to a specific version. If not specified, Amazon Bedrock uses the default version of the agent runtime.
bytes or seekable file-like object
[REQUIRED]
The input data to send to the agent runtime. The format of this data depends on the specific agent configuration and must match the specified content type. For most agents, this is a JSON object containing the user's request.
dict
Response Syntax
{ 'runtimeSessionId': 'string', 'mcpSessionId': 'string', 'mcpProtocolVersion': 'string', 'traceId': 'string', 'traceParent': 'string', 'traceState': 'string', 'baggage': 'string', 'contentType': 'string', 'response': StreamingBody(), 'statusCode': 123 }
Response Structure
(dict) --
runtimeSessionId (string) --
The identifier of the runtime session.
mcpSessionId (string) --
The identifier of the MCP session.
mcpProtocolVersion (string) --
The version of the MCP protocol being used.
traceId (string) --
The trace identifier for request tracking.
traceParent (string) --
The parent trace information for distributed tracing.
traceState (string) --
The trace state information for distributed tracing.
baggage (string) --
Additional context information for distributed tracing.
contentType (string) --
The MIME type of the response data. This indicates how to interpret the response data. Common values include application/json for JSON data.
response (:class:`.StreamingBody`) --
The response data from the agent runtime. The format of this data depends on the specific agent configuration and the requested accept type. For most agents, this is a JSON object containing the agent's response to the user's request.
statusCode (integer) --
The HTTP status code of the response. A status code of 200 indicates a successful operation. Other status codes indicate various error conditions.
Deletes a memory record from a memory store. When you delete a memory record, it is permanently removed.
To use this operation, you must have the genesismemory:DeleteMemoryRecord permission.
See also: AWS API Documentation
Request Syntax
client.delete_memory_record( memoryId='string', memoryRecordId='string' )
string
[REQUIRED]
The identifier of the memory store from which to delete the memory record.
string
[REQUIRED]
The identifier of the memory record to delete.
dict
Response Syntax
{ 'memoryRecordId': 'string' }
Response Structure
(dict) --
memoryRecordId (string) --
The identifier of the memory record that was deleted.