BedrockAgent class
Describes the API operations for creating and managing Amazon Bedrock agents.
Constructors
- BedrockAgent({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
-
associateAgentCollaborator(
{required AgentDescriptor agentDescriptor, required String agentId, required String agentVersion, required String collaborationInstruction, required String collaboratorName, String? clientToken, RelayConversationHistory? relayConversationHistory}) → Future< AssociateAgentCollaboratorResponse> - Makes an agent a collaborator for another agent.
-
associateAgentKnowledgeBase(
{required String agentId, required String agentVersion, required String description, required String knowledgeBaseId, KnowledgeBaseState? knowledgeBaseState}) → Future< AssociateAgentKnowledgeBaseResponse> -
Associates a knowledge base with an agent. If a knowledge base is
associated and its
indexStateis set toEnabled, the agent queries the knowledge base for information to augment its response to the user. -
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.
-
createAgent(
{required String agentName, AgentCollaboration? agentCollaboration, String? agentResourceRoleArn, String? clientToken, CustomOrchestration? customOrchestration, String? customerEncryptionKeyArn, String? description, String? foundationModel, GuardrailConfiguration? guardrailConfiguration, int? idleSessionTTLInSeconds, String? instruction, MemoryConfiguration? memoryConfiguration, OrchestrationType? orchestrationType, PromptOverrideConfiguration? promptOverrideConfiguration, Map< String, String> ? tags}) → Future<CreateAgentResponse> - Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.
-
createAgentActionGroup(
{required String actionGroupName, required String agentId, required String agentVersion, ActionGroupExecutor? actionGroupExecutor, ActionGroupState? actionGroupState, APISchema? apiSchema, String? clientToken, String? description, FunctionSchema? functionSchema, ActionGroupSignature? parentActionGroupSignature, Map< String, String> ? parentActionGroupSignatureParams}) → Future<CreateAgentActionGroupResponse> - Creates an action group for an agent. An action group represents the actions that an agent can carry out for the customer by defining the APIs that an agent can call and the logic for calling them.
-
createAgentAlias(
{required String agentAliasName, required String agentId, String? clientToken, String? description, List< AgentAliasRoutingConfigurationListItem> ? routingConfiguration, Map<String, String> ? tags}) → Future<CreateAgentAliasResponse> - Creates an alias of an agent that can be used to deploy the agent.
-
createDataSource(
{required DataSourceConfiguration dataSourceConfiguration, required String knowledgeBaseId, required String name, String? clientToken, DataDeletionPolicy? dataDeletionPolicy, String? description, ServerSideEncryptionConfiguration? serverSideEncryptionConfiguration, VectorIngestionConfiguration? vectorIngestionConfiguration}) → Future< CreateDataSourceResponse> -
Connects a knowledge base to a data source. You specify the configuration
for the specific data source service in the
dataSourceConfigurationfield. -
createFlow(
{required String executionRoleArn, required String name, String? clientToken, String? customerEncryptionKeyArn, FlowDefinition? definition, String? description, Map< String, String> ? tags}) → Future<CreateFlowResponse> - Creates a prompt flow that you can use to send an input through various steps to yield an output. Configure nodes, each of which corresponds to a step of the flow, and create connections between the nodes to create paths to different outputs. For more information, see How it works and Create a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
-
createFlowAlias(
{required String flowIdentifier, required String name, required List< FlowAliasRoutingConfigurationListItem> routingConfiguration, String? clientToken, FlowAliasConcurrencyConfiguration? concurrencyConfiguration, String? description, Map<String, String> ? tags}) → Future<CreateFlowAliasResponse> - Creates an alias of a flow for deployment. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
-
createFlowVersion(
{required String flowIdentifier, String? clientToken, String? description}) → Future< CreateFlowVersionResponse> - Creates a version of the flow that you can deploy. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
-
createKnowledgeBase(
{required KnowledgeBaseConfiguration knowledgeBaseConfiguration, required String name, required String roleArn, String? clientToken, String? description, StorageConfiguration? storageConfiguration, Map< String, String> ? tags}) → Future<CreateKnowledgeBaseResponse> - Creates a knowledge base. A knowledge base contains your data sources so that Large Language Models (LLMs) can use your data. To create a knowledge base, you must first set up your data sources and configure a supported vector store. For more information, see Set up a knowledge base.
-
createPrompt(
{required String name, String? clientToken, String? customerEncryptionKeyArn, String? defaultVariant, String? description, Map< String, String> ? tags, List<PromptVariant> ? variants}) → Future<CreatePromptResponse> - Creates a prompt in your prompt library that you can add to a flow. For more information, see Prompt management in Amazon Bedrock, Create a prompt using Prompt management and Prompt flows in Amazon Bedrock in the Amazon Bedrock User Guide.
-
createPromptVersion(
{required String promptIdentifier, String? clientToken, String? description, Map< String, String> ? tags}) → Future<CreatePromptVersionResponse> - Creates a static snapshot of your prompt that can be deployed to production. For more information, see Deploy prompts using Prompt management by creating versions in the Amazon Bedrock User Guide.
-
deleteAgent(
{required String agentId, bool? skipResourceInUseCheck}) → Future< DeleteAgentResponse> - Deletes an agent.
-
deleteAgentActionGroup(
{required String actionGroupId, required String agentId, required String agentVersion, bool? skipResourceInUseCheck}) → Future< void> - Deletes an action group in an agent.
-
deleteAgentAlias(
{required String agentAliasId, required String agentId}) → Future< DeleteAgentAliasResponse> - Deletes an alias of an agent.
-
deleteAgentVersion(
{required String agentId, required String agentVersion, bool? skipResourceInUseCheck}) → Future< DeleteAgentVersionResponse> - Deletes a version of an agent.
-
deleteDataSource(
{required String dataSourceId, required String knowledgeBaseId}) → Future< DeleteDataSourceResponse> - Deletes a data source from a knowledge base.
-
deleteFlow(
{required String flowIdentifier, bool? skipResourceInUseCheck}) → Future< DeleteFlowResponse> - Deletes a flow.
-
deleteFlowAlias(
{required String aliasIdentifier, required String flowIdentifier}) → Future< DeleteFlowAliasResponse> - Deletes an alias of a flow.
-
deleteFlowVersion(
{required String flowIdentifier, required String flowVersion, bool? skipResourceInUseCheck}) → Future< DeleteFlowVersionResponse> - Deletes a version of a flow.
-
deleteKnowledgeBase(
{required String knowledgeBaseId}) → Future< DeleteKnowledgeBaseResponse> - Deletes a knowledge base. Before deleting a knowledge base, you should disassociate the knowledge base from any agents that it is associated with by making a DisassociateAgentKnowledgeBase request.
-
deleteKnowledgeBaseDocuments(
{required String dataSourceId, required List< DocumentIdentifier> documentIdentifiers, required String knowledgeBaseId, String? clientToken}) → Future<DeleteKnowledgeBaseDocumentsResponse> - Deletes documents from a data source and syncs the changes to the knowledge base that is connected to it. For more information, see Ingest changes directly into a knowledge base in the Amazon Bedrock User Guide.
-
deletePrompt(
{required String promptIdentifier, String? promptVersion}) → Future< DeletePromptResponse> -
Deletes a prompt or a version of it, depending on whether you include the
promptVersionfield or not. For more information, see Delete prompts from the Prompt management tool and Delete a version of a prompt from the Prompt management tool in the Amazon Bedrock User Guide. -
disassociateAgentCollaborator(
{required String agentId, required String agentVersion, required String collaboratorId}) → Future< void> - Disassociates an agent collaborator.
-
disassociateAgentKnowledgeBase(
{required String agentId, required String agentVersion, required String knowledgeBaseId}) → Future< void> - Disassociates a knowledge base from an agent.
-
getAgent(
{required String agentId}) → Future< GetAgentResponse> - Gets information about an agent.
-
getAgentActionGroup(
{required String actionGroupId, required String agentId, required String agentVersion}) → Future< GetAgentActionGroupResponse> - Gets information about an action group for an agent.
-
getAgentAlias(
{required String agentAliasId, required String agentId}) → Future< GetAgentAliasResponse> - Gets information about an alias of an agent.
-
getAgentCollaborator(
{required String agentId, required String agentVersion, required String collaboratorId}) → Future< GetAgentCollaboratorResponse> - Retrieves information about an agent's collaborator.
-
getAgentKnowledgeBase(
{required String agentId, required String agentVersion, required String knowledgeBaseId}) → Future< GetAgentKnowledgeBaseResponse> - Gets information about a knowledge base associated with an agent.
-
getAgentVersion(
{required String agentId, required String agentVersion}) → Future< GetAgentVersionResponse> - Gets details about a version of an agent.
-
getDataSource(
{required String dataSourceId, required String knowledgeBaseId}) → Future< GetDataSourceResponse> - Gets information about a data source.
-
getFlow(
{required String flowIdentifier}) → Future< GetFlowResponse> - Retrieves information about a flow. For more information, see Manage a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
-
getFlowAlias(
{required String aliasIdentifier, required String flowIdentifier}) → Future< GetFlowAliasResponse> - Retrieves information about a flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
-
getFlowVersion(
{required String flowIdentifier, required String flowVersion}) → Future< GetFlowVersionResponse> - Retrieves information about a version of a flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
-
getIngestionJob(
{required String dataSourceId, required String ingestionJobId, required String knowledgeBaseId}) → Future< GetIngestionJobResponse> - Gets information about a data ingestion job. Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data.
-
getKnowledgeBase(
{required String knowledgeBaseId}) → Future< GetKnowledgeBaseResponse> - Gets information about a knowledge base.
-
getKnowledgeBaseDocuments(
{required String dataSourceId, required List< DocumentIdentifier> documentIdentifiers, required String knowledgeBaseId}) → Future<GetKnowledgeBaseDocumentsResponse> - Retrieves specific documents from a data source that is connected to a knowledge base. For more information, see Ingest changes directly into a knowledge base in the Amazon Bedrock User Guide.
-
getPrompt(
{required String promptIdentifier, String? promptVersion}) → Future< GetPromptResponse> -
Retrieves information about the working draft (
DRAFTversion) of a prompt or a version of it, depending on whether you include thepromptVersionfield or not. For more information, see View information about prompts using Prompt management and View information about a version of your prompt in the Amazon Bedrock User Guide. -
ingestKnowledgeBaseDocuments(
{required String dataSourceId, required List< KnowledgeBaseDocument> documents, required String knowledgeBaseId, String? clientToken}) → Future<IngestKnowledgeBaseDocumentsResponse> -
Ingests documents directly into the knowledge base that is connected to
the data source. The
dataSourceTypespecified in the content for each document must match the type of the data source that you specify in the header. For more information, see Ingest changes directly into a knowledge base in the Amazon Bedrock User Guide. -
listAgentActionGroups(
{required String agentId, required String agentVersion, int? maxResults, String? nextToken}) → Future< ListAgentActionGroupsResponse> - Lists the action groups for an agent and information about each one.
-
listAgentAliases(
{required String agentId, int? maxResults, String? nextToken}) → Future< ListAgentAliasesResponse> - Lists the aliases of an agent and information about each one.
-
listAgentCollaborators(
{required String agentId, required String agentVersion, int? maxResults, String? nextToken}) → Future< ListAgentCollaboratorsResponse> - Retrieve a list of an agent's collaborators.
-
listAgentKnowledgeBases(
{required String agentId, required String agentVersion, int? maxResults, String? nextToken}) → Future< ListAgentKnowledgeBasesResponse> - Lists knowledge bases associated with an agent and information about each one.
-
listAgents(
{int? maxResults, String? nextToken}) → Future< ListAgentsResponse> - Lists the agents belonging to an account and information about each agent.
-
listAgentVersions(
{required String agentId, int? maxResults, String? nextToken}) → Future< ListAgentVersionsResponse> - Lists the versions of an agent and information about each version.
-
listDataSources(
{required String knowledgeBaseId, int? maxResults, String? nextToken}) → Future< ListDataSourcesResponse> - Lists the data sources in a knowledge base and information about each one.
-
listFlowAliases(
{required String flowIdentifier, int? maxResults, String? nextToken}) → Future< ListFlowAliasesResponse> - Returns a list of aliases for a flow.
-
listFlows(
{int? maxResults, String? nextToken}) → Future< ListFlowsResponse> - Returns a list of flows and information about each flow. For more information, see Manage a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
-
listFlowVersions(
{required String flowIdentifier, int? maxResults, String? nextToken}) → Future< ListFlowVersionsResponse> - Returns a list of information about each flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
-
listIngestionJobs(
{required String dataSourceId, required String knowledgeBaseId, List< IngestionJobFilter> ? filters, int? maxResults, String? nextToken, IngestionJobSortBy? sortBy}) → Future<ListIngestionJobsResponse> - Lists the data ingestion jobs for a data source. The list also includes information about each job.
-
listKnowledgeBaseDocuments(
{required String dataSourceId, required String knowledgeBaseId, int? maxResults, String? nextToken}) → Future< ListKnowledgeBaseDocumentsResponse> - Retrieves all the documents contained in a data source that is connected to a knowledge base. For more information, see Ingest changes directly into a knowledge base in the Amazon Bedrock User Guide.
-
listKnowledgeBases(
{int? maxResults, String? nextToken}) → Future< ListKnowledgeBasesResponse> - Lists the knowledge bases in an account. The list also includesinformation about each knowledge base.
-
listPrompts(
{int? maxResults, String? nextToken, String? promptIdentifier}) → Future< ListPromptsResponse> -
Returns either information about the working draft (
DRAFTversion) of each prompt in an account, or information about of all versions of a prompt, depending on whether you include thepromptIdentifierfield or not. For more information, see View information about prompts using Prompt management in the Amazon Bedrock User Guide. -
listTagsForResource(
{required String resourceArn}) → Future< ListTagsForResourceResponse> - List all the tags for the resource you specify.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prepareAgent(
{required String agentId}) → Future< PrepareAgentResponse> -
Creates a
DRAFTversion of the agent that can be used for internal testing. -
prepareFlow(
{required String flowIdentifier}) → Future< PrepareFlowResponse> -
Prepares the
DRAFTversion of a flow so that it can be invoked. For more information, see Test a flow in Amazon Bedrock in the Amazon Bedrock User Guide. -
startIngestionJob(
{required String dataSourceId, required String knowledgeBaseId, String? clientToken, String? description}) → Future< StartIngestionJobResponse> - Begins a data ingestion job. Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data.
-
stopIngestionJob(
{required String dataSourceId, required String ingestionJobId, required String knowledgeBaseId}) → Future< StopIngestionJobResponse> -
Stops a currently running data ingestion job. You can send a
StartIngestionJobrequest again to ingest the rest of your data when you are ready. -
tagResource(
{required String resourceArn, required Map< String, String> tags}) → Future<void> - Associate tags with a resource. For more information, see Tagging resources in the Amazon Bedrock User Guide.
-
toString(
) → String -
A string representation of this object.
inherited
-
untagResource(
{required String resourceArn, required List< String> tagKeys}) → Future<void> - Remove tags from a resource.
-
updateAgent(
{required String agentId, required String agentName, required String agentResourceRoleArn, required String foundationModel, AgentCollaboration? agentCollaboration, CustomOrchestration? customOrchestration, String? customerEncryptionKeyArn, String? description, GuardrailConfiguration? guardrailConfiguration, int? idleSessionTTLInSeconds, String? instruction, MemoryConfiguration? memoryConfiguration, OrchestrationType? orchestrationType, PromptOverrideConfiguration? promptOverrideConfiguration}) → Future< UpdateAgentResponse> - Updates the configuration of an agent.
-
updateAgentActionGroup(
{required String actionGroupId, required String actionGroupName, required String agentId, required String agentVersion, ActionGroupExecutor? actionGroupExecutor, ActionGroupState? actionGroupState, APISchema? apiSchema, String? description, FunctionSchema? functionSchema, ActionGroupSignature? parentActionGroupSignature, Map< String, String> ? parentActionGroupSignatureParams}) → Future<UpdateAgentActionGroupResponse> - Updates the configuration for an action group for an agent.
-
updateAgentAlias(
{required String agentAliasId, required String agentAliasName, required String agentId, AliasInvocationState? aliasInvocationState, String? description, List< AgentAliasRoutingConfigurationListItem> ? routingConfiguration}) → Future<UpdateAgentAliasResponse> - Updates configurations for an alias of an agent.
-
updateAgentCollaborator(
{required AgentDescriptor agentDescriptor, required String agentId, required String agentVersion, required String collaborationInstruction, required String collaboratorId, required String collaboratorName, RelayConversationHistory? relayConversationHistory}) → Future< UpdateAgentCollaboratorResponse> - Updates an agent's collaborator.
-
updateAgentKnowledgeBase(
{required String agentId, required String agentVersion, required String knowledgeBaseId, String? description, KnowledgeBaseState? knowledgeBaseState}) → Future< UpdateAgentKnowledgeBaseResponse> - Updates the configuration for a knowledge base that has been associated with an agent.
-
updateDataSource(
{required DataSourceConfiguration dataSourceConfiguration, required String dataSourceId, required String knowledgeBaseId, required String name, DataDeletionPolicy? dataDeletionPolicy, String? description, ServerSideEncryptionConfiguration? serverSideEncryptionConfiguration, VectorIngestionConfiguration? vectorIngestionConfiguration}) → Future< UpdateDataSourceResponse> - Updates the configurations for a data source connector.
-
updateFlow(
{required String executionRoleArn, required String flowIdentifier, required String name, String? customerEncryptionKeyArn, FlowDefinition? definition, String? description}) → Future< UpdateFlowResponse> - Modifies a flow. Include both fields that you want to keep and fields that you want to change. For more information, see How it works and Create a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
-
updateFlowAlias(
{required String aliasIdentifier, required String flowIdentifier, required String name, required List< FlowAliasRoutingConfigurationListItem> routingConfiguration, FlowAliasConcurrencyConfiguration? concurrencyConfiguration, String? description}) → Future<UpdateFlowAliasResponse> - Modifies the alias of a flow. Include both fields that you want to keep and ones that you want to change. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
-
updateKnowledgeBase(
{required KnowledgeBaseConfiguration knowledgeBaseConfiguration, required String knowledgeBaseId, required String name, required String roleArn, String? description, StorageConfiguration? storageConfiguration}) → Future< UpdateKnowledgeBaseResponse> - Updates the configuration of a knowledge base with the fields that you specify. Because all fields will be overwritten, you must include the same values for fields that you want to keep the same.
-
updatePrompt(
{required String name, required String promptIdentifier, String? customerEncryptionKeyArn, String? defaultVariant, String? description, List< PromptVariant> ? variants}) → Future<UpdatePromptResponse> - Modifies a prompt in your prompt library. Include both fields that you want to keep and fields that you want to replace. For more information, see Prompt management in Amazon Bedrock and Edit prompts in your prompt library in the Amazon Bedrock User Guide.
-
validateFlowDefinition(
{required FlowDefinition definition}) → Future< ValidateFlowDefinitionResponse> - Validates the definition of a flow.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited