BedrockAgentCore class

Welcome to the Amazon Bedrock AgentCore Data Plane API reference. Data Plane actions process and handle data or workloads within Amazon Web Services services.

Constructors

BedrockAgentCore({required String region, AwsClientCredentials? credentials, AwsClientCredentialsProvider? credentialsProvider, Client? client, String? endpointUrl})

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

batchCreateMemoryRecords({required String memoryId, required List<MemoryRecordCreateInput> records, String? clientToken}) Future<BatchCreateMemoryRecordsOutput>
Creates multiple memory records in a single batch operation for the specified memory with custom content.
batchDeleteMemoryRecords({required String memoryId, required List<MemoryRecordDeleteInput> records}) Future<BatchDeleteMemoryRecordsOutput>
Deletes multiple memory records in a single batch operation from the specified memory.
batchUpdateMemoryRecords({required String memoryId, required List<MemoryRecordUpdateInput> records}) Future<BatchUpdateMemoryRecordsOutput>
Updates multiple memory records with custom content in a single batch operation within the specified memory.
close() → void
Closes the internal HTTP client if none was provided at creation. If a client was passed as a constructor argument, this becomes a noop.
completeResourceTokenAuth({required String sessionUri, required UserIdentifier userIdentifier}) Future<void>
Confirms the user authentication session for obtaining OAuth2.0 tokens for a resource.
createABTest({required ABTestEvaluationConfig evaluationConfig, required String gatewayArn, required String name, required String roleArn, required List<Variant> variants, String? clientToken, String? description, bool? enableOnCreate, GatewayFilter? gatewayFilter}) Future<CreateABTestResponse>
Creates an A/B test for comparing agent configurations. A/B tests split traffic between a control variant and a treatment variant through a gateway, then evaluate performance using online evaluation configurations to determine which variant performs better.
createEvent({required String actorId, required DateTime eventTimestamp, required String memoryId, required List<PayloadType> payload, Branch? branch, String? clientToken, Map<String, MetadataValue>? metadata, String? sessionId}) Future<CreateEventOutput>
Creates an event in an AgentCore Memory resource. Events represent interactions or activities that occur within a session and are associated with specific actors.
createPaymentInstrument({required String paymentConnectorId, required PaymentInstrumentDetails paymentInstrumentDetails, required PaymentInstrumentType paymentInstrumentType, required String paymentManagerArn, String? agentName, String? clientToken, String? userId}) Future<CreatePaymentInstrumentResponse>
Create a new payment instrument for a connector.
createPaymentSession({required int expiryTimeInMinutes, required String paymentManagerArn, String? agentName, String? clientToken, SessionLimits? limits, String? userId}) Future<CreatePaymentSessionResponse>
Create a new payment session.
deleteABTest({required String abTestId}) Future<DeleteABTestResponse>
Deletes an A/B test and its associated gateway rules.
deleteBatchEvaluation({required String batchEvaluationId}) Future<DeleteBatchEvaluationResponse>
Deletes a batch evaluation and its associated results.
deleteEvent({required String actorId, required String eventId, required String memoryId, required String sessionId}) Future<DeleteEventOutput>
Deletes an event from an AgentCore Memory resource. When you delete an event, it is permanently removed.
deleteMemoryRecord({required String memoryId, required String memoryRecordId}) Future<DeleteMemoryRecordOutput>
Deletes a memory record from an AgentCore Memory resource. When you delete a memory record, it is permanently removed.
deletePaymentInstrument({required String paymentConnectorId, required String paymentInstrumentId, required String paymentManagerArn, String? userId}) Future<DeletePaymentInstrumentResponse>
Deletes a payment instrument. This is a soft delete operation that preserves the record for audit and compliance purposes.
deletePaymentSession({required String paymentManagerArn, required String paymentSessionId, String? userId}) Future<DeletePaymentSessionResponse>
Deletes a payment session. This permanently removes the payment session record.
deleteRecommendation({required String recommendationId}) Future<DeleteRecommendationResponse>
Deletes a recommendation and its associated results.
evaluate({required EvaluationInput evaluationInput, required String evaluatorId, List<EvaluationReferenceInput>? evaluationReferenceInputs, EvaluationTarget? evaluationTarget}) Future<EvaluateResponse>
Performs on-demand evaluation of agent traces using a specified evaluator. This synchronous API accepts traces in OpenTelemetry format and returns immediate scoring results with detailed explanations.
getABTest({required String abTestId}) Future<GetABTestResponse>
Retrieves detailed information about an A/B test, including its configuration, status, and statistical results.
getAgentCard({required String agentRuntimeArn, String? qualifier, String? runtimeSessionId}) Future<GetAgentCardResponse>
Retrieves the A2A agent card associated with an AgentCore Runtime agent.
getBatchEvaluation({required String batchEvaluationId}) Future<GetBatchEvaluationResponse>
Retrieves detailed information about a batch evaluation, including its status, configuration, results, and any error details.
getBrowserSession({required String browserIdentifier, required String sessionId}) Future<GetBrowserSessionResponse>
Retrieves detailed information about a specific browser session in Amazon Bedrock AgentCore. This operation returns the session's configuration, current status, associated streams, and metadata.
getCodeInterpreterSession({required String codeInterpreterIdentifier, required String sessionId}) Future<GetCodeInterpreterSessionResponse>
Retrieves detailed information about a specific code interpreter session in Amazon Bedrock AgentCore. This operation returns the session's configuration, current status, and metadata.
getEvent({required String actorId, required String eventId, required String memoryId, required String sessionId}) Future<GetEventOutput>
Retrieves information about a specific event in an AgentCore Memory resource.
getMemoryRecord({required String memoryId, required String memoryRecordId}) Future<GetMemoryRecordOutput>
Retrieves a specific memory record from an AgentCore Memory resource.
getPaymentInstrument({required String paymentInstrumentId, required String paymentManagerArn, String? agentName, String? paymentConnectorId, String? userId}) Future<GetPaymentInstrumentResponse>
Get a payment instrument by ID.
getPaymentInstrumentBalance({required BlockchainChainId chain, required String paymentConnectorId, required String paymentInstrumentId, required String paymentManagerArn, required InstrumentBalanceToken token, String? agentName, String? userId}) Future<GetPaymentInstrumentBalanceResponse>
Get the balance of a payment instrument.
getPaymentSession({required String paymentManagerArn, required String paymentSessionId, String? agentName, String? userId}) Future<GetPaymentSessionResponse>
Get a payment session.
getRecommendation({required String recommendationId}) Future<GetRecommendationResponse>
Retrieves detailed information about a recommendation, including its configuration, status, and results.
getResourceApiKey({required String resourceCredentialProviderName, required String workloadIdentityToken}) Future<GetResourceApiKeyResponse>
Retrieves the API key associated with an API key credential provider.
getResourceOauth2Token({required Oauth2FlowType oauth2Flow, required String resourceCredentialProviderName, required List<String> scopes, required String workloadIdentityToken, List<String>? audiences, Map<String, String>? customParameters, String? customState, bool? forceAuthentication, String? resourceOauth2ReturnUrl, List<String>? resources, String? sessionUri}) Future<GetResourceOauth2TokenResponse>
Returns the OAuth 2.0 token of the provided resource.
getResourcePaymentToken({required PaymentTokenRequestInput paymentTokenRequest, required String resourceCredentialProviderName, required String workloadIdentityToken}) Future<GetResourcePaymentTokenResponse>
Generates authentication tokens for payment providers that use vendor-specific authentication mechanisms.
getWorkloadAccessToken({required String workloadName}) Future<GetWorkloadAccessTokenResponse>
Obtains a workload access token for agentic workloads not acting on behalf of a user.
getWorkloadAccessTokenForJWT({required String userToken, required String workloadName}) Future<GetWorkloadAccessTokenForJWTResponse>
Obtains a workload access token for agentic workloads acting on behalf of a user, using a JWT token.
getWorkloadAccessTokenForUserId({required String userId, required String workloadName}) Future<GetWorkloadAccessTokenForUserIdResponse>
Obtains a workload access token for agentic workloads acting on behalf of a user, using the user's ID.
invokeAgentRuntime({required String agentRuntimeArn, required Uint8List payload, String? accept, String? accountId, String? baggage, String? contentType, String? mcpProtocolVersion, String? mcpSessionId, String? qualifier, String? runtimeSessionId, String? runtimeUserId, String? traceId, String? traceParent, String? traceState}) Future<InvokeAgentRuntimeResponse>
Sends a request to an agent or tool hosted in an Amazon Bedrock AgentCore Runtime and receives responses in real-time.
invokeAgentRuntimeCommand({required String agentRuntimeArn, required InvokeAgentRuntimeCommandRequestBody body, String? accept, String? accountId, String? baggage, String? contentType, String? qualifier, String? runtimeSessionId, String? traceId, String? traceParent, String? traceState}) Future<InvokeAgentRuntimeCommandResponse>
Executes a command in a runtime session container and streams the output back to the caller. This operation allows you to run shell commands within the agent runtime environment and receive real-time streaming responses including standard output and standard error.
invokeBrowser({required BrowserAction action, required String browserIdentifier, required String sessionId}) Future<InvokeBrowserResponse>
Invokes an operating system-level action on a browser session in Amazon Bedrock AgentCore. This operation provides direct OS-level control over browser sessions, enabling mouse actions, keyboard input, and screenshots that the WebSocket-based Chrome DevTools Protocol (CDP) cannot handle — such as interacting with print dialogs, context menus, and JavaScript alerts.
invokeCodeInterpreter({required String codeInterpreterIdentifier, required ToolName name, ToolArguments? arguments, String? sessionId, String? traceId, String? traceParent}) Future<InvokeCodeInterpreterResponse>
Executes code within an active code interpreter session in Amazon Bedrock AgentCore. This operation processes the provided code, runs it in a secure environment, and returns the execution results including output, errors, and generated visualizations.
invokeHarness({required String harnessArn, required List<HarnessMessage> messages, required String runtimeSessionId, String? actorId, List<String>? allowedTools, int? maxIterations, int? maxTokens, HarnessModelConfiguration? model, String? runtimeUserId, List<HarnessSkill>? skills, List<HarnessSystemContentBlock>? systemPrompt, int? timeoutSeconds, List<HarnessTool>? tools}) Future<InvokeHarnessResponse>
Operation to invoke a Harness.
listABTests({int? maxResults, String? nextToken}) Future<ListABTestsResponse>
Lists all A/B tests in the account.
listActors({required String memoryId, int? maxResults, String? nextToken}) Future<ListActorsOutput>
Lists all actors in an AgentCore Memory resource. We recommend using pagination to ensure that the operation returns quickly and successfully.
listBatchEvaluations({int? maxResults, String? nextToken}) Future<ListBatchEvaluationsResponse>
Lists all batch evaluations in the account, providing summary information about each evaluation's status and configuration.
listBrowserSessions({required String browserIdentifier, int? maxResults, String? nextToken, BrowserSessionStatus? status}) Future<ListBrowserSessionsResponse>
Retrieves a list of browser sessions in Amazon Bedrock AgentCore that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
listCodeInterpreterSessions({required String codeInterpreterIdentifier, int? maxResults, String? nextToken, CodeInterpreterSessionStatus? status}) Future<ListCodeInterpreterSessionsResponse>
Retrieves a list of code interpreter sessions in Amazon Bedrock AgentCore that match the specified criteria. This operation returns summary information about each session, including identifiers, status, and timestamps.
listEvents({required String actorId, required String memoryId, required String sessionId, FilterInput? filter, bool? includePayloads, int? maxResults, String? nextToken}) Future<ListEventsOutput>
Lists events in an AgentCore Memory resource based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
listMemoryExtractionJobs({required String memoryId, ExtractionJobFilterInput? filter, int? maxResults, String? nextToken}) Future<ListMemoryExtractionJobsOutput>
Lists all long-term memory extraction jobs that are eligible to be started with optional filtering.
listMemoryRecords({required String memoryId, int? maxResults, String? memoryStrategyId, List<MemoryMetadataFilterExpression>? metadataFilters, String? namespace, String? namespacePath, String? nextToken}) Future<ListMemoryRecordsOutput>
Lists memory records in an AgentCore Memory resource based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
listPaymentInstruments({required String paymentManagerArn, String? agentName, int? maxResults, String? nextToken, String? paymentConnectorId, String? userId}) Future<ListPaymentInstrumentsResponse>
List payment instruments for a manager.
listPaymentSessions({required String paymentManagerArn, String? agentName, int? maxResults, String? nextToken, String? userId}) Future<ListPaymentSessionsResponse>
List payment sessions.
listRecommendations({int? maxResults, String? nextToken, RecommendationStatus? statusFilter}) Future<ListRecommendationsResponse>
Lists all recommendations in the account, with optional filtering by status.
listSessions({required String actorId, required String memoryId, SessionFilter? filter, int? maxResults, String? nextToken}) Future<ListSessionsOutput>
Lists sessions in an AgentCore Memory resource based on specified criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processPayment({required PaymentInput paymentInput, required String paymentInstrumentId, required String paymentManagerArn, required String paymentSessionId, required PaymentType paymentType, String? agentName, String? clientToken, String? userId}) Future<ProcessPaymentResponse>
Processes a payment using a payment instrument within a payment session.
retrieveMemoryRecords({required String memoryId, required SearchCriteria searchCriteria, int? maxResults, String? namespace, String? namespacePath, String? nextToken}) Future<RetrieveMemoryRecordsOutput>
Searches for and retrieves memory records from an AgentCore Memory resource based on specified search criteria. We recommend using pagination to ensure that the operation returns quickly and successfully.
saveBrowserSessionProfile({required String browserIdentifier, required String profileIdentifier, required String sessionId, String? clientToken, String? traceId, String? traceParent}) Future<SaveBrowserSessionProfileResponse>
Saves the current state of a browser session as a reusable profile in Amazon Bedrock AgentCore. A browser profile captures persistent browser data such as cookies and local storage from an active session, enabling you to reuse this data in future browser sessions.
searchRegistryRecords({required List<String> registryIds, required String searchQuery, Object? filters, int? maxResults}) Future<SearchRegistryRecordsResponse>
Searches for registry records using semantic, lexical, or hybrid queries. Returns metadata for matching records ordered by relevance within the specified registry.
startBatchEvaluation({required String batchEvaluationName, required DataSourceConfig dataSourceConfig, String? clientToken, String? description, EvaluationMetadata? evaluationMetadata, List<Evaluator>? evaluators}) Future<StartBatchEvaluationResponse>
Starts a batch evaluation job that evaluates agent performance across multiple sessions. Batch evaluations pull agent traces from CloudWatch Logs or an existing online evaluation configuration and run specified evaluators and insights against them.
startBrowserSession({required String browserIdentifier, List<Certificate>? certificates, String? clientToken, List<BrowserEnterprisePolicy>? enterprisePolicies, List<BrowserExtension>? extensions, String? name, BrowserProfileConfiguration? profileConfiguration, ProxyConfiguration? proxyConfiguration, int? sessionTimeoutSeconds, String? traceId, String? traceParent, ViewPort? viewPort}) Future<StartBrowserSessionResponse>
Creates and initializes a browser session in Amazon Bedrock AgentCore. The session enables agents to navigate and interact with web content, extract information from websites, and perform web-based tasks as part of their response generation.
startCodeInterpreterSession({required String codeInterpreterIdentifier, List<Certificate>? certificates, String? clientToken, String? name, int? sessionTimeoutSeconds, String? traceId, String? traceParent}) Future<StartCodeInterpreterSessionResponse>
Creates and initializes a code interpreter session in Amazon Bedrock AgentCore. 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.
startMemoryExtractionJob({required ExtractionJob extractionJob, required String memoryId, String? clientToken}) Future<StartMemoryExtractionJobOutput>
Starts a memory extraction job that processes events that failed extraction previously in an AgentCore Memory resource and produces structured memory records. When earlier extraction attempts have left events unprocessed, this job will pick up and extract those as well.
startRecommendation({required String name, required RecommendationConfig recommendationConfig, required RecommendationType type, String? clientToken, String? description}) Future<StartRecommendationResponse>
Starts a recommendation job that analyzes agent traces and generates optimization suggestions for system prompts or tool descriptions to improve agent performance.
stopBatchEvaluation({required String batchEvaluationId}) Future<StopBatchEvaluationResponse>
Stops a running batch evaluation. Sessions that have already been evaluated retain their results.
stopBrowserSession({required String browserIdentifier, required String sessionId, String? clientToken, String? traceId, String? traceParent}) Future<StopBrowserSessionResponse>
Terminates an active browser session in Amazon Bedrock AgentCore. This operation stops the session, releases associated resources, and makes the session unavailable for further use.
stopCodeInterpreterSession({required String codeInterpreterIdentifier, required String sessionId, String? clientToken, String? traceId, String? traceParent}) Future<StopCodeInterpreterSessionResponse>
Terminates an active code interpreter session in Amazon Bedrock AgentCore. This operation stops the session, releases associated resources, and makes the session unavailable for further use.
stopRuntimeSession({required String agentRuntimeArn, required String runtimeSessionId, String? clientToken, String? qualifier}) Future<StopRuntimeSessionResponse>
Stops a session that is running in an running AgentCore Runtime agent.
toString() String
A string representation of this object.
inherited
updateABTest({required String abTestId, String? clientToken, String? description, ABTestEvaluationConfig? evaluationConfig, ABTestExecutionStatus? executionStatus, GatewayFilter? gatewayFilter, String? name, String? roleArn, List<Variant>? variants}) Future<UpdateABTestResponse>
Updates an A/B test's configuration, including variants, traffic allocation, evaluation settings, or execution status.
updateBrowserStream({required String browserIdentifier, required String sessionId, required StreamUpdate streamUpdate, String? clientToken}) Future<UpdateBrowserStreamResponse>
Updates a browser stream. To use this operation, you must have permissions to perform the bedrock:UpdateBrowserStream action.

Operators

operator ==(Object other) bool
The equality operator.
inherited