SDK for PHP 3.x

Client: Aws\BedrockAgentCore\BedrockAgentCoreClient
Service ID: bedrock-agentcore
Version: 2024-02-28

This page describes the parameters and results for the operations of the Amazon Bedrock AgentCore Data Plane Fronting Layer (2024-02-28), and shows how to use the Aws\BedrockAgentCore\BedrockAgentCoreClient object to call the described operations. This documentation is specific to the 2024-02-28 API version of the service.

Operation Summary

Each of the following operations can be created from a client using $client->getCommand('CommandName'), where "CommandName" is the name of one of the following operations. Note: a command is a value that encapsulates an operation and the parameters used to create an HTTP request.

You can also create and send a command immediately using the magic methods available on a client object: $client->commandName(/* parameters */). You can send the command asynchronously (returning a promise) by appending the word "Async" to the operation name: $client->commandNameAsync(/* parameters */).

CreateEvent ( array $params = [] )
Creates an event in a memory store.
DeleteEvent ( array $params = [] )
Deletes an event from a memory store.
DeleteMemoryRecord ( array $params = [] )
Deletes a memory record from a memory store.
GetBrowserSession ( array $params = [] )
Retrieves detailed information about a specific browser session in Amazon Bedrock.
GetCodeInterpreterSession ( array $params = [] )
Retrieves detailed information about a specific code interpreter session in Amazon Bedrock.
GetEvent ( array $params = [] )
Retrieves information about a specific event in a memory store.
GetMemoryRecord ( array $params = [] )
Retrieves a specific memory record from a memory store.
GetResourceApiKey ( array $params = [] )
Retrieves an API Key associated with an API Key Credential Provider
GetResourceOauth2Token ( array $params = [] )
Reaturns the Oauth2Token of the provided resource
GetWorkloadAccessToken ( array $params = [] )
Obtains an Workload access token for agentic workloads not acting on behalf of user.
GetWorkloadAccessTokenForJWT ( array $params = [] )
Obtains an Workload access token for agentic workloads acting on behalf of user with JWT token
GetWorkloadAccessTokenForUserId ( array $params = [] )
Obtains an Workload access token for agentic workloads acting on behalf of user with User Id.
InvokeAgentRuntime ( array $params = [] )
Sends a request to an agent runtime in Amazon Bedrock and receives responses in real-time.
InvokeCodeInterpreter ( array $params = [] )
Executes code within an active code interpreter session in Amazon Bedrock.
ListActors ( array $params = [] )
Lists all actors in a memory store.
ListBrowserSessions ( array $params = [] )
Retrieves a list of browser sessions in Amazon Bedrock that match the specified criteria.
ListCodeInterpreterSessions ( array $params = [] )
Retrieves a list of code interpreter sessions in Amazon Bedrock that match the specified criteria.
ListEvents ( array $params = [] )
Lists events in a memory store based on specified criteria.
ListMemoryRecords ( array $params = [] )
Lists memory records in a memory store based on specified criteria.
ListSessions ( array $params = [] )
Lists sessions in a memory store based on specified criteria.
RetrieveMemoryRecords ( array $params = [] )
Searches for and retrieves memory records from a memory store based on specified search criteria.
StartBrowserSession ( array $params = [] )
Creates and initializes a browser session in Amazon Bedrock.
StartCodeInterpreterSession ( array $params = [] )
Creates and initializes a code interpreter session in Amazon Bedrock.
StopBrowserSession ( array $params = [] )
Terminates an active browser session in Amazon Bedrock.
StopCodeInterpreterSession ( array $params = [] )
Terminates an active code interpreter session in Amazon Bedrock.
UpdateBrowserStream ( array $params = [] )
Updates a browser stream.

Paginators

Paginators handle automatically iterating over paginated API results. Paginators are associated with specific API operations, and they accept the parameters that the corresponding API operation accepts. You can get a paginator from a client class using getPaginator($paginatorName, $operationParameters). This client supports the following paginators:

ListActors
ListEvents
ListMemoryRecords
ListSessions
RetrieveMemoryRecords

Operations

CreateEvent

$result = $client->createEvent([/* ... */]);
$promise = $client->createEventAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->createEvent([
    'actorId' => '<string>', // REQUIRED
    'branch' => [
        'name' => '<string>', // REQUIRED
        'rootEventId' => '<string>',
    ],
    'clientToken' => '<string>',
    'eventTimestamp' => <integer || string || DateTime>, // REQUIRED
    'memoryId' => '<string>', // REQUIRED
    'payload' => [ // REQUIRED
        [
            'blob' => [
            ],
            'conversational' => [
                'content' => [ // REQUIRED
                    'text' => '<string>',
                ],
                'role' => 'ASSISTANT|USER|TOOL|OTHER', // REQUIRED
            ],
        ],
        // ...
    ],
    'sessionId' => '<string>',
]);

Parameter Details

Members
actorId
Required: Yes
Type: string

The identifier of the actor associated with this event. An actor represents an entity that participates in sessions and generates events.

branch
Type: Branch structure

The branch information for this event. Branches allow for organizing events into different conversation threads or paths.

clientToken
Type: 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.

eventTimestamp
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the event occurred. If not specified, the current time is used.

memoryId
Required: Yes
Type: string

The identifier of the memory store in which to create the event.

payload
Required: Yes
Type: Array of PayloadType structures

The content payload of the event. This can include conversational data or binary content.

sessionId
Type: string

The identifier of the session in which this event occurs. A session represents a sequence of related events.

Result Syntax

[
    'event' => [
        'actorId' => '<string>',
        'branch' => [
            'name' => '<string>',
            'rootEventId' => '<string>',
        ],
        'eventId' => '<string>',
        'eventTimestamp' => <DateTime>,
        'memoryId' => '<string>',
        'payload' => [
            [
                'blob' => [
                ],
                'conversational' => [
                    'content' => [
                        'text' => '<string>',
                    ],
                    'role' => 'ASSISTANT|USER|TOOL|OTHER',
                ],
            ],
            // ...
        ],
        'sessionId' => '<string>',
    ],
]

Result Details

Members
event
Required: Yes
Type: Event structure

The event that was created.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ValidationException:

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.

InvalidInputException:

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

ResourceNotFoundException:

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.

ThrottledException:

The request was denied due to request throttling. Reduce the frequency of requests and try again.

ServiceException:

The service encountered an internal error. Try your request again later.

DeleteEvent

$result = $client->deleteEvent([/* ... */]);
$promise = $client->deleteEventAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteEvent([
    'actorId' => '<string>', // REQUIRED
    'eventId' => '<string>', // REQUIRED
    'memoryId' => '<string>', // REQUIRED
    'sessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
actorId
Required: Yes
Type: string

The identifier of the actor associated with the event to delete.

eventId
Required: Yes
Type: string

The identifier of the event to delete.

memoryId
Required: Yes
Type: string

The identifier of the memory store from which to delete the event.

sessionId
Required: Yes
Type: string

The identifier of the session containing the event to delete.

Result Syntax

[
    'eventId' => '<string>',
]

Result Details

Members
eventId
Required: Yes
Type: string

The identifier of the event that was deleted.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ValidationException:

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.

InvalidInputException:

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

ResourceNotFoundException:

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.

ThrottledException:

The request was denied due to request throttling. Reduce the frequency of requests and try again.

ServiceException:

The service encountered an internal error. Try your request again later.

DeleteMemoryRecord

$result = $client->deleteMemoryRecord([/* ... */]);
$promise = $client->deleteMemoryRecordAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->deleteMemoryRecord([
    'memoryId' => '<string>', // REQUIRED
    'memoryRecordId' => '<string>', // REQUIRED
]);

Parameter Details

Members
memoryId
Required: Yes
Type: string

The identifier of the memory store from which to delete the memory record.

memoryRecordId
Required: Yes
Type: string

The identifier of the memory record to delete.

Result Syntax

[
    'memoryRecordId' => '<string>',
]

Result Details

Members
memoryRecordId
Required: Yes
Type: string

The identifier of the memory record that was deleted.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ValidationException:

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.

InvalidInputException:

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

ResourceNotFoundException:

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.

ThrottledException:

The request was denied due to request throttling. Reduce the frequency of requests and try again.

ServiceException:

The service encountered an internal error. Try your request again later.

GetBrowserSession

$result = $client->getBrowserSession([/* ... */]);
$promise = $client->getBrowserSessionAsync([/* ... */]);

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:

Parameter Syntax

$result = $client->getBrowserSession([
    'browserIdentifier' => '<string>', // REQUIRED
    'sessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
browserIdentifier
Required: Yes
Type: string

The unique identifier of the browser associated with the session.

sessionId
Required: Yes
Type: string

The unique identifier of the browser session to retrieve.

Result Syntax

[
    'browserIdentifier' => '<string>',
    'createdAt' => <DateTime>,
    'lastUpdatedAt' => <DateTime>,
    'name' => '<string>',
    'sessionId' => '<string>',
    'sessionReplayArtifact' => '<string>',
    'sessionTimeoutSeconds' => <integer>,
    'status' => 'READY|TERMINATED',
    'streams' => [
        'automationStream' => [
            'streamEndpoint' => '<string>',
            'streamStatus' => 'ENABLED|DISABLED',
        ],
        'liveViewStream' => [
            'streamEndpoint' => '<string>',
        ],
    ],
    'viewPort' => [
        'height' => <integer>,
        'width' => <integer>,
    ],
]

Result Details

Members
browserIdentifier
Required: Yes
Type: string

The identifier of the browser.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the browser session was created.

lastUpdatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the browser session was last updated.

name
Type: string

The name of the browser session.

sessionId
Required: Yes
Type: string

The identifier of the browser session.

sessionReplayArtifact
Type: string

The artifact containing the session replay information.

sessionTimeoutSeconds
Type: int

The timeout period for the browser session in seconds.

status
Type: string

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

streams
Type: BrowserSessionStream structure

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

viewPort
Type: ViewPort structure

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.

Errors

AccessDeniedException:

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.

ValidationException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

GetCodeInterpreterSession

$result = $client->getCodeInterpreterSession([/* ... */]);
$promise = $client->getCodeInterpreterSessionAsync([/* ... */]);

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:

Parameter Syntax

$result = $client->getCodeInterpreterSession([
    'codeInterpreterIdentifier' => '<string>', // REQUIRED
    'sessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
codeInterpreterIdentifier
Required: Yes
Type: string

The unique identifier of the code interpreter associated with the session.

sessionId
Required: Yes
Type: string

The unique identifier of the code interpreter session to retrieve.

Result Syntax

[
    'codeInterpreterIdentifier' => '<string>',
    'createdAt' => <DateTime>,
    'name' => '<string>',
    'sessionId' => '<string>',
    'sessionTimeoutSeconds' => <integer>,
    'status' => 'READY|TERMINATED',
]

Result Details

Members
codeInterpreterIdentifier
Required: Yes
Type: string

The identifier of the code interpreter.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the code interpreter session was created.

name
Type: string

The name of the code interpreter session.

sessionId
Required: Yes
Type: string

The identifier of the code interpreter session.

sessionTimeoutSeconds
Type: int

The timeout period for the code interpreter session in seconds.

status
Type: string

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

Errors

AccessDeniedException:

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.

ValidationException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

GetEvent

$result = $client->getEvent([/* ... */]);
$promise = $client->getEventAsync([/* ... */]);

Retrieves information about a specific event in a memory store.

To use this operation, you must have the genesismemory:GetEvent permission.

Parameter Syntax

$result = $client->getEvent([
    'actorId' => '<string>', // REQUIRED
    'eventId' => '<string>', // REQUIRED
    'memoryId' => '<string>', // REQUIRED
    'sessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
actorId
Required: Yes
Type: string

The identifier of the actor associated with the event.

eventId
Required: Yes
Type: string

The identifier of the event to retrieve.

memoryId
Required: Yes
Type: string

The identifier of the memory store containing the event.

sessionId
Required: Yes
Type: string

The identifier of the session containing the event.

Result Syntax

[
    'event' => [
        'actorId' => '<string>',
        'branch' => [
            'name' => '<string>',
            'rootEventId' => '<string>',
        ],
        'eventId' => '<string>',
        'eventTimestamp' => <DateTime>,
        'memoryId' => '<string>',
        'payload' => [
            [
                'blob' => [
                ],
                'conversational' => [
                    'content' => [
                        'text' => '<string>',
                    ],
                    'role' => 'ASSISTANT|USER|TOOL|OTHER',
                ],
            ],
            // ...
        ],
        'sessionId' => '<string>',
    ],
]

Result Details

Members
event
Required: Yes
Type: Event structure

The requested event information.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ValidationException:

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.

InvalidInputException:

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

ResourceNotFoundException:

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.

ThrottledException:

The request was denied due to request throttling. Reduce the frequency of requests and try again.

ServiceException:

The service encountered an internal error. Try your request again later.

GetMemoryRecord

$result = $client->getMemoryRecord([/* ... */]);
$promise = $client->getMemoryRecordAsync([/* ... */]);

Retrieves a specific memory record from a memory store.

To use this operation, you must have the genesismemory:GetMemoryRecord permission.

Parameter Syntax

$result = $client->getMemoryRecord([
    'memoryId' => '<string>', // REQUIRED
    'memoryRecordId' => '<string>', // REQUIRED
]);

Parameter Details

Members
memoryId
Required: Yes
Type: string

The identifier of the memory store containing the memory record.

memoryRecordId
Required: Yes
Type: string

The identifier of the memory record to retrieve.

Result Syntax

[
    'memoryRecord' => [
        'content' => [
            'text' => '<string>',
        ],
        'createdAt' => <DateTime>,
        'memoryRecordId' => '<string>',
        'memoryStrategyId' => '<string>',
        'namespaces' => ['<string>', ...],
    ],
]

Result Details

Members
memoryRecord
Required: Yes
Type: MemoryRecord structure

The requested memory record.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ValidationException:

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.

InvalidInputException:

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

ResourceNotFoundException:

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.

ThrottledException:

The request was denied due to request throttling. Reduce the frequency of requests and try again.

ServiceException:

The service encountered an internal error. Try your request again later.

GetResourceApiKey

$result = $client->getResourceApiKey([/* ... */]);
$promise = $client->getResourceApiKeyAsync([/* ... */]);

Retrieves an API Key associated with an API Key Credential Provider

Parameter Syntax

$result = $client->getResourceApiKey([
    'resourceCredentialProviderName' => '<string>', // REQUIRED
    'workloadIdentityToken' => '<string>', // REQUIRED
]);

Parameter Details

Members
resourceCredentialProviderName
Required: Yes
Type: string

The credential provider name of the resource you are retrieving the API Key of.

workloadIdentityToken
Required: Yes
Type: string

The identity token of the workload you want to get the API Key of.

Result Syntax

[
    'apiKey' => '<string>',
]

Result Details

Members
apiKey
Required: Yes
Type: string

The API Key associated with the resource requested.

Errors

UnauthorizedException:

This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access

ValidationException:

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.

AccessDeniedException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

GetResourceOauth2Token

$result = $client->getResourceOauth2Token([/* ... */]);
$promise = $client->getResourceOauth2TokenAsync([/* ... */]);

Reaturns the Oauth2Token of the provided resource

Parameter Syntax

$result = $client->getResourceOauth2Token([
    'customParameters' => ['<string>', ...],
    'forceAuthentication' => true || false,
    'oauth2Flow' => 'USER_FEDERATION|M2M', // REQUIRED
    'resourceCredentialProviderName' => '<string>', // REQUIRED
    'resourceOauth2ReturnUrl' => '<string>',
    'scopes' => ['<string>', ...], // REQUIRED
    'userId' => '<string>',
    'workloadIdentityToken' => '<string>', // REQUIRED
]);

Parameter Details

Members
customParameters
Type: Associative array of custom strings keys (CustomRequestKeyType) to strings

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.

forceAuthentication
Type: boolean

If true, always initiate a new 3LO flow

oauth2Flow
Required: Yes
Type: string

The type of flow to be performed

resourceCredentialProviderName
Required: Yes
Type: string

Reference to the credential provider

resourceOauth2ReturnUrl
Type: string

Callback url to redirect after token retrieval completes. Should be one of the provideded urls during WorkloadIdentity creation

scopes
Required: Yes
Type: Array of strings

The OAuth scopes requested

userId
Type: string

The user ID of the user you're retrieving the token on behalf of.

workloadIdentityToken
Required: Yes
Type: string

The identity token of the workload you want to retrive the Oauth2 Token of.

Result Syntax

[
    'accessToken' => '<string>',
    'authorizationUrl' => '<string>',
]

Result Details

Members
accessToken
Type: string

OAuth2 token ready for use

authorizationUrl
Type: string

The URL for the authorization process, provided if the Access token requires user Authorization.

Errors

UnauthorizedException:

This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access

ValidationException:

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.

AccessDeniedException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

GetWorkloadAccessToken

$result = $client->getWorkloadAccessToken([/* ... */]);
$promise = $client->getWorkloadAccessTokenAsync([/* ... */]);

Obtains an Workload access token for agentic workloads not acting on behalf of user.

Parameter Syntax

$result = $client->getWorkloadAccessToken([
    'workloadName' => '<string>', // REQUIRED
]);

Parameter Details

Members
workloadName
Required: Yes
Type: string

Unique identifier for the registered agent

Result Syntax

[
    'workloadAccessToken' => '<string>',
]

Result Details

Members
workloadAccessToken
Required: Yes
Type: string

Opaque token representing both agent and user identity

Errors

UnauthorizedException:

This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access

ValidationException:

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.

AccessDeniedException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

GetWorkloadAccessTokenForJWT

$result = $client->getWorkloadAccessTokenForJWT([/* ... */]);
$promise = $client->getWorkloadAccessTokenForJWTAsync([/* ... */]);

Obtains an Workload access token for agentic workloads acting on behalf of user with JWT token

Parameter Syntax

$result = $client->getWorkloadAccessTokenForJWT([
    'userToken' => '<string>', // REQUIRED
    'workloadName' => '<string>', // REQUIRED
]);

Parameter Details

Members
userToken
Required: Yes
Type: string

OAuth2 token issued by the user's identity provider

workloadName
Required: Yes
Type: string

Unique identifier for the registered agent

Result Syntax

[
    'workloadAccessToken' => '<string>',
]

Result Details

Members
workloadAccessToken
Required: Yes
Type: string

Opaque token representing both agent and user identity

Errors

UnauthorizedException:

This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access

ValidationException:

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.

AccessDeniedException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

GetWorkloadAccessTokenForUserId

$result = $client->getWorkloadAccessTokenForUserId([/* ... */]);
$promise = $client->getWorkloadAccessTokenForUserIdAsync([/* ... */]);

Obtains an Workload access token for agentic workloads acting on behalf of user with User Id.

Parameter Syntax

$result = $client->getWorkloadAccessTokenForUserId([
    'userId' => '<string>', // REQUIRED
    'workloadName' => '<string>', // REQUIRED
]);

Parameter Details

Members
userId
Required: Yes
Type: string

The user id of the user you are retrieving the access token for.

workloadName
Required: Yes
Type: string

The name of the worklaod you want to get the access token of.

Result Syntax

[
    'workloadAccessToken' => '<string>',
]

Result Details

Members
workloadAccessToken
Required: Yes
Type: string

The workload access token of the named workload.

Errors

UnauthorizedException:

This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access

ValidationException:

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.

AccessDeniedException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

InvokeAgentRuntime

$result = $client->invokeAgentRuntime([/* ... */]);
$promise = $client->invokeAgentRuntimeAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->invokeAgentRuntime([
    'accept' => '<string>',
    'agentRuntimeArn' => '<string>', // REQUIRED
    'baggage' => '<string>',
    'contentType' => '<string>',
    'mcpProtocolVersion' => '<string>',
    'mcpSessionId' => '<string>',
    'payload' => <string || resource || Psr\Http\Message\StreamInterface>, // REQUIRED
    'qualifier' => '<string>',
    'runtimeSessionId' => '<string>',
    'runtimeUserId' => '<string>',
    'traceId' => '<string>',
    'traceParent' => '<string>',
    'traceState' => '<string>',
]);

Parameter Details

Members
accept
Type: 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.

agentRuntimeArn
Required: Yes
Type: string

The Amazon Web Services Resource Name (ARN) of the agent runtime to invoke. The ARN uniquely identifies the agent runtime resource in Amazon Bedrock.

baggage
Type: string

Additional context information for distributed tracing.

contentType
Type: 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.

mcpProtocolVersion
Type: string

The version of the MCP protocol being used.

mcpSessionId
Type: string

The identifier of the MCP session.

payload
Required: Yes
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

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.

qualifier
Type: 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.

runtimeSessionId
Type: string

The identifier of the runtime session.

runtimeUserId
Type: string

The identifier of the runtime user.

traceId
Type: string

The trace identifier for request tracking.

traceParent
Type: string

The parent trace information for distributed tracing.

traceState
Type: string

The trace state information for distributed tracing.

Result Syntax

[
    'baggage' => '<string>',
    'contentType' => '<string>',
    'mcpProtocolVersion' => '<string>',
    'mcpSessionId' => '<string>',
    'response' => <string || resource || Psr\Http\Message\StreamInterface>,
    'runtimeSessionId' => '<string>',
    'statusCode' => <integer>,
    'traceId' => '<string>',
    'traceParent' => '<string>',
    'traceState' => '<string>',
]

Result Details

Members
baggage
Type: string

Additional context information for distributed tracing.

contentType
Required: Yes
Type: string

The MIME type of the response data. This indicates how to interpret the response data. Common values include application/json for JSON data.

mcpProtocolVersion
Type: string

The version of the MCP protocol being used.

mcpSessionId
Type: string

The identifier of the MCP session.

response
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

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.

runtimeSessionId
Type: string

The identifier of the runtime session.

statusCode
Type: int

The HTTP status code of the response. A status code of 200 indicates a successful operation. Other status codes indicate various error conditions.

traceId
Type: string

The trace identifier for request tracking.

traceParent
Type: string

The parent trace information for distributed tracing.

traceState
Type: string

The trace state information for distributed tracing.

Errors

ServiceQuotaExceededException:

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.

ValidationException:

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.

AccessDeniedException:

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.

RuntimeClientError:

The exception that occurs when there is an error in the runtime client. This can happen due to network issues, invalid configuration, or other client-side problems. Check the error message for specific details about the error.

ThrottlingException:

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.

ResourceNotFoundException:

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.

InternalServerException:

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.

InvokeCodeInterpreter

$result = $client->invokeCodeInterpreter([/* ... */]);
$promise = $client->invokeCodeInterpreterAsync([/* ... */]);

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:

Parameter Syntax

$result = $client->invokeCodeInterpreter([
    'arguments' => [
        'clearContext' => true || false,
        'code' => '<string>',
        'command' => '<string>',
        'content' => [
            [
                'blob' => <string || resource || Psr\Http\Message\StreamInterface>,
                'path' => '<string>', // REQUIRED
                'text' => '<string>',
            ],
            // ...
        ],
        'directoryPath' => '<string>',
        'language' => 'python|javascript|typescript',
        'path' => '<string>',
        'paths' => ['<string>', ...],
        'taskId' => '<string>',
    ],
    'codeInterpreterIdentifier' => '<string>', // REQUIRED
    'name' => 'executeCode|executeCommand|readFiles|listFiles|removeFiles|writeFiles|startCommandExecution|getTask|stopTask', // REQUIRED
    'sessionId' => '<string>',
]);

Parameter Details

Members
arguments
Type: ToolArguments structure

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.

codeInterpreterIdentifier
Required: Yes
Type: string

The unique identifier of the code interpreter associated with the session. This must match the identifier used when creating the session with StartCodeInterpreterSession.

name
Required: Yes
Type: string

The name of the code interpreter to invoke.

sessionId
Type: 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.

Result Syntax

[
    'sessionId' => '<string>',
    'stream' => [ // EventParsingIterator
        'accessDeniedException' => [
            'message' => '<string>',
        ],
        'conflictException' => [
            'message' => '<string>',
        ],
        'internalServerException' => [
            'message' => '<string>',
        ],
        'resourceNotFoundException' => [
            'message' => '<string>',
        ],
        'result' => [
            'content' => [
                [
                    'data' => <string || resource || Psr\Http\Message\StreamInterface>,
                    'description' => '<string>',
                    'mimeType' => '<string>',
                    'name' => '<string>',
                    'resource' => [
                        'blob' => <string || resource || Psr\Http\Message\StreamInterface>,
                        'mimeType' => '<string>',
                        'text' => '<string>',
                        'type' => 'text|blob',
                        'uri' => '<string>',
                    ],
                    'size' => <integer>,
                    'text' => '<string>',
                    'type' => 'text|image|resource|resource_link',
                    'uri' => '<string>',
                ],
                // ...
            ],
            'isError' => true || false,
            'structuredContent' => [
                'executionTime' => <float>,
                'exitCode' => <integer>,
                'stderr' => '<string>',
                'stdout' => '<string>',
                'taskId' => '<string>',
                'taskStatus' => 'submitted|working|completed|canceled|failed',
            ],
        ],
        'serviceQuotaExceededException' => [
            'message' => '<string>',
        ],
        'throttlingException' => [
            'message' => '<string>',
        ],
        'validationException' => [
            'fieldList' => [
                [
                    'message' => '<string>',
                    'name' => '<string>',
                ],
                // ...
            ],
            'message' => '<string>',
            'reason' => 'CannotParse|FieldValidationFailed|IdempotentParameterMismatchException|EventInOtherSession|ResourceConflict',
        ],
    ],
]

Result Details

Members
sessionId
Type: string

The identifier of the code interpreter session.

stream

The stream containing the results of the code execution. This includes output, errors, and execution status.

Using an EventParsingIterator

To use an EventParsingIterator, you will need to loop over the events it will generate and check the top-level field to determine which type of event it is.

foreach($result['stream'] as $event) {
    if (isset($event['accessDeniedException'])) {
        // Handle the 'accessDeniedException' event.
    } else if (isset($event['conflictException'])) {
        // Handle the 'conflictException' event.
    } else if (isset($event['internalServerException'])) {
        // Handle the 'internalServerException' event.
    } else if (isset($event['resourceNotFoundException'])) {
        // Handle the 'resourceNotFoundException' event.
    } else if (isset($event['result'])) {
        // Handle the 'result' event.
    } else if (isset($event['serviceQuotaExceededException'])) {
        // Handle the 'serviceQuotaExceededException' event.
    } else if (isset($event['throttlingException'])) {
        // Handle the 'throttlingException' event.
    } else if (isset($event['validationException'])) {
        // Handle the 'validationException' event.
    }
}

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ConflictException:

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.

ValidationException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

ListActors

$result = $client->listActors([/* ... */]);
$promise = $client->listActorsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listActors([
    'maxResults' => <integer>,
    'memoryId' => '<string>', // REQUIRED
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.

memoryId
Required: Yes
Type: string

The identifier of the memory store for which to list actors.

nextToken
Type: 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.

Result Syntax

[
    'actorSummaries' => [
        [
            'actorId' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
actorSummaries
Required: Yes
Type: Array of ActorSummary structures

The list of actor summaries.

nextToken
Type: 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.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ValidationException:

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.

InvalidInputException:

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

ResourceNotFoundException:

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.

ThrottledException:

The request was denied due to request throttling. Reduce the frequency of requests and try again.

ServiceException:

The service encountered an internal error. Try your request again later.

ListBrowserSessions

$result = $client->listBrowserSessions([/* ... */]);
$promise = $client->listBrowserSessionsAsync([/* ... */]);

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:

Parameter Syntax

$result = $client->listBrowserSessions([
    'browserIdentifier' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'status' => 'READY|TERMINATED',
]);

Parameter Details

Members
browserIdentifier
Required: Yes
Type: string

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.

maxResults
Type: int

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.

nextToken
Type: 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.

status
Type: 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.

Result Syntax

[
    'items' => [
        [
            'browserIdentifier' => '<string>',
            'createdAt' => <DateTime>,
            'lastUpdatedAt' => <DateTime>,
            'name' => '<string>',
            'sessionId' => '<string>',
            'status' => 'READY|TERMINATED',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of BrowserSessionSummary structures

The list of browser sessions that match the specified criteria.

nextToken
Type: string

The token to use in a subsequent ListBrowserSessions request to get the next set of results.

Errors

AccessDeniedException:

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.

ValidationException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

ListCodeInterpreterSessions

$result = $client->listCodeInterpreterSessions([/* ... */]);
$promise = $client->listCodeInterpreterSessionsAsync([/* ... */]);

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:

Parameter Syntax

$result = $client->listCodeInterpreterSessions([
    'codeInterpreterIdentifier' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'nextToken' => '<string>',
    'status' => 'READY|TERMINATED',
]);

Parameter Details

Members
codeInterpreterIdentifier
Required: Yes
Type: string

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.

maxResults
Type: int

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.

nextToken
Type: 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.

status
Type: 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.

Result Syntax

[
    'items' => [
        [
            'codeInterpreterIdentifier' => '<string>',
            'createdAt' => <DateTime>,
            'lastUpdatedAt' => <DateTime>,
            'name' => '<string>',
            'sessionId' => '<string>',
            'status' => 'READY|TERMINATED',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
items
Required: Yes
Type: Array of CodeInterpreterSessionSummary structures

The list of code interpreter sessions that match the specified criteria.

nextToken
Type: string

The token to use in a subsequent ListCodeInterpreterSessions request to get the next set of results.

Errors

AccessDeniedException:

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.

ValidationException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

ListEvents

$result = $client->listEvents([/* ... */]);
$promise = $client->listEventsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listEvents([
    'actorId' => '<string>', // REQUIRED
    'filter' => [
        'branch' => [
            'includeParentBranches' => true || false,
            'name' => '<string>', // REQUIRED
        ],
    ],
    'includePayloads' => true || false,
    'maxResults' => <integer>,
    'memoryId' => '<string>', // REQUIRED
    'nextToken' => '<string>',
    'sessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
actorId
Required: Yes
Type: string

The identifier of the actor for which to list events. If specified, only events from this actor are returned.

filter
Type: FilterInput structure

Filter criteria to apply when listing events.

includePayloads
Type: boolean

Specifies whether to include event payloads in the response. Set to true to include payloads, or false to exclude them.

maxResults
Type: int

The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.

memoryId
Required: Yes
Type: string

The identifier of the memory store for which to list events.

nextToken
Type: 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.

sessionId
Required: Yes
Type: string

The identifier of the session for which to list events. If specified, only events from this session are returned.

Result Syntax

[
    'events' => [
        [
            'actorId' => '<string>',
            'branch' => [
                'name' => '<string>',
                'rootEventId' => '<string>',
            ],
            'eventId' => '<string>',
            'eventTimestamp' => <DateTime>,
            'memoryId' => '<string>',
            'payload' => [
                [
                    'blob' => [
                    ],
                    'conversational' => [
                        'content' => [
                            'text' => '<string>',
                        ],
                        'role' => 'ASSISTANT|USER|TOOL|OTHER',
                    ],
                ],
                // ...
            ],
            'sessionId' => '<string>',
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
events
Required: Yes
Type: Array of Event structures

The list of events that match the specified criteria.

nextToken
Type: 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.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ValidationException:

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.

InvalidInputException:

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

ResourceNotFoundException:

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.

ThrottledException:

The request was denied due to request throttling. Reduce the frequency of requests and try again.

ServiceException:

The service encountered an internal error. Try your request again later.

ListMemoryRecords

$result = $client->listMemoryRecords([/* ... */]);
$promise = $client->listMemoryRecordsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listMemoryRecords([
    'maxResults' => <integer>,
    'memoryId' => '<string>', // REQUIRED
    'memoryStrategyId' => '<string>',
    'namespace' => '<string>', // REQUIRED
    'nextToken' => '<string>',
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.

memoryId
Required: Yes
Type: string

The identifier of the memory store for which to list memory records.

memoryStrategyId
Type: string

The memory strategy identifier to filter memory records by. If specified, only memory records with this strategy ID are returned.

namespace
Required: Yes
Type: string

The namespace to filter memory records by. If specified, only memory records in this namespace are returned.

nextToken
Type: 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.

Result Syntax

[
    'memoryRecordSummaries' => [
        [
            'content' => [
                'text' => '<string>',
            ],
            'createdAt' => <DateTime>,
            'memoryRecordId' => '<string>',
            'memoryStrategyId' => '<string>',
            'namespaces' => ['<string>', ...],
            'score' => <float>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
memoryRecordSummaries
Required: Yes
Type: Array of MemoryRecordSummary structures

The list of memory record summaries that match the specified criteria.

nextToken
Type: 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.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ValidationException:

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.

InvalidInputException:

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

ResourceNotFoundException:

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.

ThrottledException:

The request was denied due to request throttling. Reduce the frequency of requests and try again.

ServiceException:

The service encountered an internal error. Try your request again later.

ListSessions

$result = $client->listSessions([/* ... */]);
$promise = $client->listSessionsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->listSessions([
    'actorId' => '<string>', // REQUIRED
    'maxResults' => <integer>,
    'memoryId' => '<string>', // REQUIRED
    'nextToken' => '<string>',
]);

Parameter Details

Members
actorId
Required: Yes
Type: string

The identifier of the actor for which to list sessions. If specified, only sessions involving this actor are returned.

maxResults
Type: int

The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.

memoryId
Required: Yes
Type: string

The identifier of the memory store for which to list sessions.

nextToken
Type: 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.

Result Syntax

[
    'nextToken' => '<string>',
    'sessionSummaries' => [
        [
            'actorId' => '<string>',
            'createdAt' => <DateTime>,
            'sessionId' => '<string>',
        ],
        // ...
    ],
]

Result Details

Members
nextToken
Type: 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.

sessionSummaries
Required: Yes
Type: Array of SessionSummary structures

The list of session summaries that match the specified criteria.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ValidationException:

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.

InvalidInputException:

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

ResourceNotFoundException:

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.

ThrottledException:

The request was denied due to request throttling. Reduce the frequency of requests and try again.

ServiceException:

The service encountered an internal error. Try your request again later.

RetrieveMemoryRecords

$result = $client->retrieveMemoryRecords([/* ... */]);
$promise = $client->retrieveMemoryRecordsAsync([/* ... */]);

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.

Parameter Syntax

$result = $client->retrieveMemoryRecords([
    'maxResults' => <integer>,
    'memoryId' => '<string>', // REQUIRED
    'namespace' => '<string>', // REQUIRED
    'nextToken' => '<string>',
    'searchCriteria' => [ // REQUIRED
        'memoryStrategyId' => '<string>',
        'searchQuery' => '<string>', // REQUIRED
        'topK' => <integer>,
    ],
]);

Parameter Details

Members
maxResults
Type: int

The maximum number of results to return in a single call. Minimum value of 1, maximum value of 100. Default is 20.

memoryId
Required: Yes
Type: string

The identifier of the memory store from which to retrieve memory records.

namespace
Required: Yes
Type: string

The namespace to filter memory records by. If specified, only memory records in this namespace are searched.

nextToken
Type: 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.

searchCriteria
Required: Yes
Type: SearchCriteria structure

The search criteria to use for finding relevant memory records. This includes the search query, memory strategy ID, and other search parameters.

Result Syntax

[
    'memoryRecordSummaries' => [
        [
            'content' => [
                'text' => '<string>',
            ],
            'createdAt' => <DateTime>,
            'memoryRecordId' => '<string>',
            'memoryStrategyId' => '<string>',
            'namespaces' => ['<string>', ...],
            'score' => <float>,
        ],
        // ...
    ],
    'nextToken' => '<string>',
]

Result Details

Members
memoryRecordSummaries
Required: Yes
Type: Array of MemoryRecordSummary structures

The list of memory record summaries that match the search criteria, ordered by relevance.

nextToken
Type: 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.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ValidationException:

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.

InvalidInputException:

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

ResourceNotFoundException:

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.

ThrottledException:

The request was denied due to request throttling. Reduce the frequency of requests and try again.

ServiceException:

The service encountered an internal error. Try your request again later.

StartBrowserSession

$result = $client->startBrowserSession([/* ... */]);
$promise = $client->startBrowserSessionAsync([/* ... */]);

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:

Parameter Syntax

$result = $client->startBrowserSession([
    'browserIdentifier' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'name' => '<string>',
    'sessionTimeoutSeconds' => <integer>,
    'viewPort' => [
        'height' => <integer>, // REQUIRED
        'width' => <integer>, // REQUIRED
    ],
]);

Parameter Details

Members
browserIdentifier
Required: Yes
Type: string

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

clientToken
Type: 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.

name
Type: string

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

sessionTimeoutSeconds
Type: int

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).

viewPort
Type: ViewPort structure

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.

Result Syntax

[
    'browserIdentifier' => '<string>',
    'createdAt' => <DateTime>,
    'sessionId' => '<string>',
    'streams' => [
        'automationStream' => [
            'streamEndpoint' => '<string>',
            'streamStatus' => 'ENABLED|DISABLED',
        ],
        'liveViewStream' => [
            'streamEndpoint' => '<string>',
        ],
    ],
]

Result Details

Members
browserIdentifier
Required: Yes
Type: string

The identifier of the browser.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the browser session was created.

sessionId
Required: Yes
Type: string

The unique identifier of the created browser session.

streams
Type: BrowserSessionStream structure

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

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ConflictException:

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.

ValidationException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

StartCodeInterpreterSession

$result = $client->startCodeInterpreterSession([/* ... */]);
$promise = $client->startCodeInterpreterSessionAsync([/* ... */]);

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:

Parameter Syntax

$result = $client->startCodeInterpreterSession([
    'clientToken' => '<string>',
    'codeInterpreterIdentifier' => '<string>', // REQUIRED
    'name' => '<string>',
    'sessionTimeoutSeconds' => <integer>,
]);

Parameter Details

Members
clientToken
Type: 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.

codeInterpreterIdentifier
Required: Yes
Type: string

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

name
Type: 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.

sessionTimeoutSeconds
Type: int

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).

Result Syntax

[
    'codeInterpreterIdentifier' => '<string>',
    'createdAt' => <DateTime>,
    'sessionId' => '<string>',
]

Result Details

Members
codeInterpreterIdentifier
Required: Yes
Type: string

The identifier of the code interpreter.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the code interpreter session was created.

sessionId
Required: Yes
Type: string

The unique identifier of the created code interpreter session.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ConflictException:

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.

ValidationException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

StopBrowserSession

$result = $client->stopBrowserSession([/* ... */]);
$promise = $client->stopBrowserSessionAsync([/* ... */]);

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:

Parameter Syntax

$result = $client->stopBrowserSession([
    'browserIdentifier' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'sessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
browserIdentifier
Required: Yes
Type: string

The unique identifier of the browser associated with the session.

clientToken
Type: 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.

sessionId
Required: Yes
Type: string

The unique identifier of the browser session to stop.

Result Syntax

[
    'browserIdentifier' => '<string>',
    'lastUpdatedAt' => <DateTime>,
    'sessionId' => '<string>',
]

Result Details

Members
browserIdentifier
Required: Yes
Type: string

The identifier of the browser.

lastUpdatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the browser session was last updated.

sessionId
Required: Yes
Type: string

The identifier of the browser session.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ConflictException:

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.

ValidationException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

StopCodeInterpreterSession

$result = $client->stopCodeInterpreterSession([/* ... */]);
$promise = $client->stopCodeInterpreterSessionAsync([/* ... */]);

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:

Parameter Syntax

$result = $client->stopCodeInterpreterSession([
    'clientToken' => '<string>',
    'codeInterpreterIdentifier' => '<string>', // REQUIRED
    'sessionId' => '<string>', // REQUIRED
]);

Parameter Details

Members
clientToken
Type: 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.

codeInterpreterIdentifier
Required: Yes
Type: string

The unique identifier of the code interpreter associated with the session.

sessionId
Required: Yes
Type: string

The unique identifier of the code interpreter session to stop.

Result Syntax

[
    'codeInterpreterIdentifier' => '<string>',
    'lastUpdatedAt' => <DateTime>,
    'sessionId' => '<string>',
]

Result Details

Members
codeInterpreterIdentifier
Required: Yes
Type: string

The identifier of the code interpreter.

lastUpdatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the code interpreter session was last updated.

sessionId
Required: Yes
Type: string

The identifier of the code interpreter session.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ConflictException:

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.

ValidationException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

UpdateBrowserStream

$result = $client->updateBrowserStream([/* ... */]);
$promise = $client->updateBrowserStreamAsync([/* ... */]);

Updates a browser stream. To use this operation, you must have permissions to perform the bedrock:UpdateBrowserStream action.

Parameter Syntax

$result = $client->updateBrowserStream([
    'browserIdentifier' => '<string>', // REQUIRED
    'clientToken' => '<string>',
    'sessionId' => '<string>', // REQUIRED
    'streamUpdate' => [ // REQUIRED
        'automationStreamUpdate' => [
            'streamStatus' => 'ENABLED|DISABLED',
        ],
    ],
]);

Parameter Details

Members
browserIdentifier
Required: Yes
Type: string

The identifier of the browser.

clientToken
Type: 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.

sessionId
Required: Yes
Type: string

The identifier of the browser session.

streamUpdate
Required: Yes
Type: StreamUpdate structure

The update to apply to the browser stream.

Result Syntax

[
    'browserIdentifier' => '<string>',
    'sessionId' => '<string>',
    'streams' => [
        'automationStream' => [
            'streamEndpoint' => '<string>',
            'streamStatus' => 'ENABLED|DISABLED',
        ],
        'liveViewStream' => [
            'streamEndpoint' => '<string>',
        ],
    ],
    'updatedAt' => <DateTime>,
]

Result Details

Members
browserIdentifier
Required: Yes
Type: string

The identifier of the browser.

sessionId
Required: Yes
Type: string

The identifier of the browser session.

streams
Required: Yes
Type: BrowserSessionStream structure

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.

updatedAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The time at which the browser stream was updated.

Errors

ServiceQuotaExceededException:

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.

AccessDeniedException:

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.

ConflictException:

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.

ValidationException:

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.

ResourceNotFoundException:

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.

ThrottlingException:

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.

InternalServerException:

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.

Shapes

AccessDeniedException

Description

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.

Members
message
Type: string

ActorSummary

Description

Contains summary information about an actor in a memory store.

Members
actorId
Required: Yes
Type: string

The unique identifier of the actor.

AutomationStream

Description

The configuration for a stream that enables programmatic control of a browser session in Amazon Bedrock. This stream provides a bidirectional communication channel for sending commands to the browser and receiving responses, allowing agents to automate web interactions such as navigation, form filling, and element clicking.

Members
streamEndpoint
Required: Yes
Type: 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
Required: Yes
Type: string

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

AutomationStreamUpdate

Description

Contains information about an update to an automation stream.

Members
streamStatus
Type: string

The status of the automation stream.

Branch

Description

Contains information about a branch in a memory store. Branches allow for organizing events into different conversation threads or paths.

Members
name
Required: Yes
Type: string

The name of the branch.

rootEventId
Type: string

The identifier of the root event for this branch.

BranchFilter

Description

Contains filter criteria for branches when listing events.

Members
includeParentBranches
Type: boolean

Specifies whether to include parent branches in the results. Set to true to include parent branches, or false to exclude them.

name
Required: Yes
Type: string

The name of the branch to filter by.

BrowserSessionStream

Description

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.

Members
automationStream
Required: Yes
Type: AutomationStream structure

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.

liveViewStream
Type: LiveViewStream structure

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.

BrowserSessionSummary

Description

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.

Members
browserIdentifier
Required: Yes
Type: string

The unique identifier of the browser associated with the session. This identifier specifies which browser environment is used for the session.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the browser session was created. This value is in ISO 8601 format.

lastUpdatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

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

name
Type: string

The name of the browser session. This name helps identify and manage the session.

sessionId
Required: Yes
Type: string

The unique identifier of the browser session. This identifier is used in operations that interact with the session.

status
Required: Yes
Type: string

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

CodeInterpreterResult

Description

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.

Members
content
Required: Yes
Type: Array of ContentBlock structures

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.

isError
Type: 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.

structuredContent
Type: ToolResultStructuredContent structure

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.

CodeInterpreterSessionSummary

Description

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.

Members
codeInterpreterIdentifier
Required: Yes
Type: string

The unique identifier of the code interpreter associated with the session. This identifier specifies which code interpreter environment is used for the session.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the code interpreter session was created. This value is in ISO 8601 format.

lastUpdatedAt
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the code interpreter session was last updated. This value is in ISO 8601 format.

name
Type: string

The name of the code interpreter session. This name helps identify and manage the session.

sessionId
Required: Yes
Type: string

The unique identifier of the code interpreter session. This identifier is used in operations that interact with the session.

status
Required: Yes
Type: string

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

CodeInterpreterStreamOutput

Description

Contains output from a code interpreter stream.

Members
accessDeniedException
Type: AccessDeniedException structure

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.

conflictException
Type: ConflictException structure

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.

internalServerException
Type: InternalServerException structure

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.

resourceNotFoundException
Type: ResourceNotFoundException structure

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.

result
Type: CodeInterpreterResult structure

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.

serviceQuotaExceededException

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.

throttlingException
Type: ThrottlingException structure

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.

validationException
Type: ValidationException structure

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.

ConflictException

Description

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.

Members
message
Type: string

Content

Description

Contains the content of a memory item.

Members
text
Type: string

The text content of the memory item.

ContentBlock

Description

A block of content in a response.

Members
data
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The binary data content of the block.

description
Type: string

The description of the content block.

mimeType
Type: string

The MIME type of the content.

name
Type: string

The name of the content block.

resource
Type: ResourceContent structure

The resource associated with the content block.

size
Type: long (int|float)

The size of the content in bytes.

text
Type: string

The text content of the block.

type
Required: Yes
Type: string

The type of content in the block.

uri
Type: string

The URI of the content.

Conversational

Description

Contains conversational content for an event payload.

Members
content
Required: Yes
Type: Content structure

The content of the conversation message.

role
Required: Yes
Type: string

The role of the participant in the conversation (for example, "user" or "assistant").

Document

Members

Event

Description

Contains information about an event in a memory store.

Members
actorId
Required: Yes
Type: string

The identifier of the actor associated with the event.

branch
Type: Branch structure

The branch information for the event.

eventId
Required: Yes
Type: string

The unique identifier of the event.

eventTimestamp
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the event occurred.

memoryId
Required: Yes
Type: string

The identifier of the memory store containing the event.

payload
Required: Yes
Type: Array of PayloadType structures

The content payload of the event.

sessionId
Required: Yes
Type: string

The identifier of the session containing the event.

FilterInput

Description

Contains filter criteria for listing events.

Members
branch
Type: BranchFilter structure

The branch filter criteria to apply when listing events.

InputContentBlock

Description

A block of input content.

Members
blob
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The binary input content.

path
Required: Yes
Type: string

The path to the input content.

text
Type: string

The text input content.

InternalServerException

Description

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.

Members
message
Type: string

InvalidInputException

Description

The input fails to satisfy the constraints specified by AgentCore. Check your input values and try again.

Members
message
Required: Yes
Type: string

LiveViewStream

Description

The configuration for a stream that provides a visual representation of a browser session in Amazon Bedrock. This stream enables agents to observe the current state of the browser, including rendered web pages, visual elements, and the results of interactions.

Members
streamEndpoint
Type: 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.

MemoryContent

Description

Contains the content of a memory record.

Members
text
Type: string

The text content of the memory record.

MemoryRecord

Description

Contains information about a memory record in a memory store.

Members
content
Required: Yes
Type: MemoryContent structure

The content of the memory record.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the memory record was created.

memoryRecordId
Required: Yes
Type: string

The unique identifier of the memory record.

memoryStrategyId
Required: Yes
Type: string

The identifier of the memory strategy associated with this record.

namespaces
Required: Yes
Type: Array of strings

The namespaces associated with this memory record. Namespaces help organize and categorize memory records.

MemoryRecordSummary

Description

Contains summary information about a memory record.

Members
content
Required: Yes
Type: MemoryContent structure

The content of the memory record.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the memory record was created.

memoryRecordId
Required: Yes
Type: string

The unique identifier of the memory record.

memoryStrategyId
Required: Yes
Type: string

The identifier of the memory strategy associated with this record.

namespaces
Required: Yes
Type: Array of strings

The namespaces associated with this memory record.

score
Type: double

The relevance score of the memory record when returned as part of a search result. Higher values indicate greater relevance to the search query.

PayloadType

Description

Contains the payload content for an event.

Members
blob
Type: document (null|bool|string|numeric) or an (array|associative array) whose members are all valid documents

The binary content of the payload.

conversational
Type: Conversational structure

The conversational content of the payload.

ResourceContent

Description

Contains information about resource content.

Members
blob
Type: blob (string|resource|Psr\Http\Message\StreamInterface)

The binary resource content.

mimeType
Type: string

The MIME type of the resource content.

text
Type: string

The text resource content.

type
Required: Yes
Type: string

The type of resource content.

uri
Type: string

The URI of the resource content.

ResourceNotFoundException

Description

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.

Members
message
Type: string

RuntimeClientError

Description

The exception that occurs when there is an error in the runtime client. This can happen due to network issues, invalid configuration, or other client-side problems. Check the error message for specific details about the error.

Members
message
Type: string

SearchCriteria

Description

Contains search criteria for retrieving memory records.

Members
memoryStrategyId
Type: string

The memory strategy identifier to filter memory records by.

searchQuery
Required: Yes
Type: string

The search query to use for finding relevant memory records.

topK
Type: int

The maximum number of top-scoring memory records to return. This value is used for semantic search ranking.

ServiceException

Description

The service encountered an internal error. Try your request again later.

Members
message
Required: Yes
Type: string

ServiceQuotaExceededException

Description

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.

Members
message
Type: string

SessionSummary

Description

Contains summary information about a session in a memory store.

Members
actorId
Required: Yes
Type: string

The identifier of the actor associated with the session.

createdAt
Required: Yes
Type: timestamp (string|DateTime or anything parsable by strtotime)

The timestamp when the session was created.

sessionId
Required: Yes
Type: string

The unique identifier of the session.

StreamUpdate

Description

Contains information about an update to a stream.

Members
automationStreamUpdate
Type: AutomationStreamUpdate structure

The update to an automation stream.

ThrottledException

Description

The request was denied due to request throttling. Reduce the frequency of requests and try again.

Members
message
Required: Yes
Type: string

ThrottlingException

Description

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.

Members
message
Type: string

ToolArguments

Description

The collection of arguments that specify the operation to perform and its parameters when invoking a tool in Amazon Bedrock. Different tools require different arguments, and this structure provides a flexible way to pass the appropriate arguments to each tool type.

Members
clearContext
Type: boolean

Whether to clear the context for the tool.

code
Type: 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.

command
Type: string

The command to execute with the tool.

content
Type: Array of InputContentBlock structures

The content for the tool operation.

directoryPath
Type: string

The directory path for the tool operation.

language
Type: 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'.

path
Type: string

The path for the tool operation.

paths
Type: Array of strings

The paths for the tool operation.

taskId
Type: string

The identifier of the task for the tool operation.

ToolResultStructuredContent

Description

Contains structured content from a tool result.

Members
executionTime
Type: double

The execution time of the tool operation in milliseconds.

exitCode
Type: int

The exit code from the tool execution.

stderr
Type: string

The standard error output from the tool execution.

stdout
Type: string

The standard output from the tool execution.

taskId
Type: string

The identifier of the task that produced the result.

taskStatus
Type: string

The status of the task that produced the result.

UnauthorizedException

Description

This exception is thrown when the JWT bearer token is invalid or not found for OAuth bearer token based access

Members
message
Type: string

ValidationException

Description

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.

Members
fieldList
Type: Array of ValidationExceptionField structures
message
Required: Yes
Type: string
reason
Required: Yes
Type: string

ValidationExceptionField

Description

Stores information about a field passed inside a request that resulted in an exception.

Members
message
Required: Yes
Type: string

A message describing why this field failed validation.

name
Required: Yes
Type: string

The name of the field.

ViewPort

Description

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.

Members
height
Required: Yes
Type: int

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.

width
Required: Yes
Type: int

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.