View Source AWS.BedrockAgent (aws-elixir v1.0.4)
Describes the API operations for creating and managing Amazon Bedrock agents.
Link to this section Summary
Functions
Makes an agent a collaborator for another agent.
Associates a knowledge base with an agent.
Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.
Creates an action group for an agent.
Creates an alias of an agent that can be used to deploy the agent.
Connects a knowledge base to a data source.
Creates a prompt flow that you can use to send an input through various steps to yield an output.
Creates an alias of a flow for deployment.
Creates a version of the flow that you can deploy.
Creates a knowledge base.
Creates a prompt in your prompt library that you can add to a flow.
Creates a static snapshot of your prompt that can be deployed to production.
Deletes an agent.
Deletes an action group in an agent.
Deletes an alias of an agent.
Deletes a version of an agent.
Deletes a data source from a knowledge base.
Deletes a flow.
Deletes an alias of a flow.
Deletes a version of a flow.
Deletes a knowledge base.
Deletes documents from a data source and syncs the changes to the knowledge base that is connected to it.
Deletes a prompt or a version of it, depending on whether you include the
promptVersion
field or not.
Disassociates an agent collaborator.
Disassociates a knowledge base from an agent.
Gets information about an agent.
Gets information about an action group for an agent.
Gets information about an alias of an agent.
Retrieves information about an agent's collaborator.
Gets information about a knowledge base associated with an agent.
Gets details about a version of an agent.
Gets information about a data source.
Retrieves information about a flow.
Retrieves information about a flow.
Retrieves information about a version of a flow.
Gets information about a data ingestion job.
Gets information about a knoweldge base.
Retrieves specific documents from a data source that is connected to a knowledge base.
Retrieves information about the working draft (DRAFT
version) of a prompt or a
version of it, depending on whether you include the promptVersion
field or
not.
Ingests documents directly into the knowledge base that is connected to the data source.
Lists the action groups for an agent and information about each one.
Lists the aliases of an agent and information about each one.
Retrieve a list of an agent's collaborators.
Lists knowledge bases associated with an agent and information about each one.
Lists the versions of an agent and information about each version.
Lists the agents belonging to an account and information about each agent.
Lists the data sources in a knowledge base and information about each one.
Returns a list of aliases for a flow.
Returns a list of information about each flow.
Returns a list of flows and information about each flow.
Lists the data ingestion jobs for a data source.
Retrieves all the documents contained in a data source that is connected to a knowledge base.
Lists the knowledge bases in an account.
Returns either information about the working draft (DRAFT
version) of each
prompt in an account, or information about of all versions of a prompt,
depending on whether you include the promptIdentifier
field or not.
List all the tags for the resource you specify.
Creates a DRAFT
version of the agent that can be used for internal testing.
Prepares the DRAFT
version of a flow so that it can be invoked.
Begins a data ingestion job.
Stops a currently running data ingestion job.
Associate tags with a resource.
Remove tags from a resource.
Updates the configuration of an agent.
Updates the configuration for an action group for an agent.
Updates configurations for an alias of an agent.
Updates an agent's collaborator.
Updates the configuration for a knowledge base that has been associated with an agent.
Updates the configurations for a data source connector.
Modifies a flow.
Modifies the alias of a flow.
Updates the configuration of a knowledge base with the fields that you specify.
Modifies a prompt in your prompt library.
Validates the definition of a flow.
Link to this section Functions
associate_agent_collaborator(client, agent_id, agent_version, input, options \\ [])
View SourceMakes an agent a collaborator for another agent.
associate_agent_knowledge_base(client, agent_id, agent_version, input, options \\ [])
View SourceAssociates a knowledge base with an agent.
If a knowledge base is associated and its indexState
is set to Enabled
, the
agent queries the knowledge base for information to augment its response to the
user.
Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.
* Specify the following fields for security purposes.
*
agentResourceRoleArn
– The Amazon Resource Name (ARN) of the role with
permissions to invoke API operations on an agent.
*
(Optional) customerEncryptionKeyArn
– The Amazon Resource Name (ARN) of a KMS
key to encrypt the creation of the agent.
*
(Optional) idleSessionTTLinSeconds
– Specify the number of seconds for which
the agent should maintain session information. After this time expires, the
subsequent InvokeAgent
request begins a new session.
*
To enable your agent to retain conversational context across multiple sessions,
include a memoryConfiguration
object.
For more information, see Configure memory.
*
To override the default prompt behavior for agent orchestration and to use
advanced prompts, include a promptOverrideConfiguration
object.
For more information, see Advanced prompts.
*
If your agent fails to be created, the response returns a list of
failureReasons
alongside a list of recommendedActions
for you to
troubleshoot.
* The agent instructions will not be honored if your agent has only one knowledge base, uses default prompts, has no action group, and user input is disabled.
create_agent_action_group(client, agent_id, agent_version, input, options \\ [])
View SourceCreates 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.
To allow your agent to request the user for additional information when trying
to complete a task,
add an action group with the parentActionGroupSignature
field set to
AMAZON.UserInput
.
To allow your agent to generate, run, and troubleshoot code when trying to
complete a task,
add an action group with the parentActionGroupSignature
field set to
AMAZON.CodeInterpreter
.
You must leave the description
, apiSchema
, and actionGroupExecutor
fields
blank for this action group. During orchestration, if your agent determines that
it needs to invoke an API in an action group, but doesn't have enough
information to complete the API request, it will invoke this action group
instead and return an
Observation
reprompting the user for more information.
Creates an alias of an agent that can be used to deploy the agent.
create_data_source(client, knowledge_base_id, input, options \\ [])
View SourceConnects a knowledge base to a data source.
You specify the configuration for the specific data source service in the
dataSourceConfiguration
field.
You can't change the chunkingConfiguration
after you create the data source
connector.
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.
Creates an alias of a flow for deployment.
For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
create_flow_version(client, flow_identifier, input, options \\ [])
View SourceCreates 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.
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.
If you prefer to let Amazon Bedrock create and manage a vector store for you in Amazon OpenSearch Service, use the console. For more information, see Create a knowledge base.
*
Provide the name
and an optional description
.
*
Provide the Amazon Resource Name (ARN) with permissions to create a knowledge
base in the roleArn
field.
*
Provide the embedding model to use in the embeddingModelArn
field in the
knowledgeBaseConfiguration
object.
*
Provide the configuration for your vector store in the storageConfiguration
object.
*
For an Amazon OpenSearch Service database, use the
opensearchServerlessConfiguration
object. For more information, see Create a vector store in Amazon OpenSearch
Service.
*
For an Amazon Aurora database, use the RdsConfiguration
object. For more
information, see Create a vector store in Amazon Aurora.
*
For a Pinecone database, use the pineconeConfiguration
object. For more
information, see Create a vector store in Pinecone.
*
For a Redis Enterprise Cloud database, use the
redisEnterpriseCloudConfiguration
object. For more information, see Create a vector store in Redis Enterprise
Cloud.
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.
create_prompt_version(client, prompt_identifier, input, options \\ [])
View SourceCreates 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.
Deletes an agent.
delete_agent_action_group(client, action_group_id, agent_id, agent_version, input, options \\ [])
View SourceDeletes an action group in an agent.
delete_agent_alias(client, agent_alias_id, agent_id, input, options \\ [])
View SourceDeletes an alias of an agent.
delete_agent_version(client, agent_id, agent_version, input, options \\ [])
View SourceDeletes a version of an agent.
delete_data_source(client, data_source_id, knowledge_base_id, input, options \\ [])
View SourceDeletes a data source from a knowledge base.
Deletes a flow.
delete_flow_alias(client, alias_identifier, flow_identifier, input, options \\ [])
View SourceDeletes an alias of a flow.
delete_flow_version(client, flow_identifier, flow_version, input, options \\ [])
View SourceDeletes a version of a flow.
delete_knowledge_base(client, knowledge_base_id, input, options \\ [])
View SourceDeletes 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.
delete_knowledge_base_documents(client, data_source_id, knowledge_base_id, input, options \\ [])
View SourceDeletes documents from a data source and syncs the changes to the knowledge base that is connected to it.
For more information, see Ingest documents into a knowledge base in real-time in the Amazon Bedrock User Guide.
Deletes a prompt or a version of it, depending on whether you include the
promptVersion
field 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.
disassociate_agent_collaborator(client, agent_id, agent_version, collaborator_id, input, options \\ [])
View SourceDisassociates an agent collaborator.
disassociate_agent_knowledge_base(client, agent_id, agent_version, knowledge_base_id, input, options \\ [])
View SourceDisassociates a knowledge base from an agent.
Gets information about an agent.
get_agent_action_group(client, action_group_id, agent_id, agent_version, options \\ [])
View SourceGets information about an action group for an agent.
Gets information about an alias of an agent.
get_agent_collaborator(client, agent_id, agent_version, collaborator_id, options \\ [])
View SourceRetrieves information about an agent's collaborator.
get_agent_knowledge_base(client, agent_id, agent_version, knowledge_base_id, options \\ [])
View SourceGets information about a knowledge base associated with an agent.
Gets details about a version of an agent.
get_data_source(client, data_source_id, knowledge_base_id, options \\ [])
View SourceGets information about a data source.
Retrieves information about a flow.
For more information, see Manage a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
get_flow_alias(client, alias_identifier, flow_identifier, options \\ [])
View SourceRetrieves information about a flow.
For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
get_flow_version(client, flow_identifier, flow_version, options \\ [])
View SourceRetrieves information about a version of a flow.
For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
get_ingestion_job(client, data_source_id, ingestion_job_id, knowledge_base_id, options \\ [])
View SourceGets information about a data ingestion job.
Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data.
Gets information about a knoweldge base.
get_knowledge_base_documents(client, data_source_id, knowledge_base_id, input, options \\ [])
View SourceRetrieves specific documents from a data source that is connected to a knowledge base.
For more information, see Ingest documents into a knowledge base in real-time in the Amazon Bedrock User Guide.
get_prompt(client, prompt_identifier, prompt_version \\ nil, options \\ [])
View SourceRetrieves information about the working draft (DRAFT
version) of a prompt or a
version of it, depending on whether you include the promptVersion
field 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.
ingest_knowledge_base_documents(client, data_source_id, knowledge_base_id, input, options \\ [])
View SourceIngests documents directly into the knowledge base that is connected to the data source.
The dataSourceType
specified 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 documents into a knowledge base in real-time
in the Amazon Bedrock User Guide.
list_agent_action_groups(client, agent_id, agent_version, input, options \\ [])
View SourceLists the action groups for an agent and information about each one.
Lists the aliases of an agent and information about each one.
list_agent_collaborators(client, agent_id, agent_version, input, options \\ [])
View SourceRetrieve a list of an agent's collaborators.
list_agent_knowledge_bases(client, agent_id, agent_version, input, options \\ [])
View SourceLists knowledge bases associated with an agent and information about each one.
Lists the versions of an agent and information about each version.
Lists the agents belonging to an account and information about each agent.
list_data_sources(client, knowledge_base_id, input, options \\ [])
View SourceLists the data sources in a knowledge base and information about each one.
list_flow_aliases(client, flow_identifier, max_results \\ nil, next_token \\ nil, options \\ [])
View SourceReturns a list of aliases for a flow.
list_flow_versions(client, flow_identifier, max_results \\ nil, next_token \\ nil, options \\ [])
View SourceReturns a list of information about each flow.
For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.
list_flows(client, max_results \\ nil, next_token \\ nil, options \\ [])
View SourceReturns 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.
list_ingestion_jobs(client, data_source_id, knowledge_base_id, input, options \\ [])
View SourceLists the data ingestion jobs for a data source.
The list also includes information about each job.
list_knowledge_base_documents(client, data_source_id, knowledge_base_id, input, options \\ [])
View SourceRetrieves all the documents contained in a data source that is connected to a knowledge base.
For more information, see Ingest documents into a knowledge base in real-time in the Amazon Bedrock User Guide.
Lists the knowledge bases in an account.
The list also includesinformation about each knowledge base.
list_prompts(client, max_results \\ nil, next_token \\ nil, prompt_identifier \\ nil, options \\ [])
View SourceReturns either information about the working draft (DRAFT
version) of each
prompt in an account, or information about of all versions of a prompt,
depending on whether you include the promptIdentifier
field or not.
For more information, see View information about prompts using Prompt management in the Amazon Bedrock User Guide.
List all the tags for the resource you specify.
Creates a DRAFT
version of the agent that can be used for internal testing.
Prepares the DRAFT
version 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.
start_ingestion_job(client, data_source_id, knowledge_base_id, input, options \\ [])
View SourceBegins a data ingestion job.
Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data.
stop_ingestion_job(client, data_source_id, ingestion_job_id, knowledge_base_id, input, options \\ [])
View SourceStops a currently running data ingestion job.
You can send a StartIngestionJob
request again to ingest the rest of your data
when you are ready.
Associate tags with a resource.
For more information, see Tagging resources in the Amazon Bedrock User Guide.
Remove tags from a resource.
Updates the configuration of an agent.
update_agent_action_group(client, action_group_id, agent_id, agent_version, input, options \\ [])
View SourceUpdates the configuration for an action group for an agent.
update_agent_alias(client, agent_alias_id, agent_id, input, options \\ [])
View SourceUpdates configurations for an alias of an agent.
update_agent_collaborator(client, agent_id, agent_version, collaborator_id, input, options \\ [])
View SourceUpdates an agent's collaborator.
update_agent_knowledge_base(client, agent_id, agent_version, knowledge_base_id, input, options \\ [])
View SourceUpdates the configuration for a knowledge base that has been associated with an agent.
update_data_source(client, data_source_id, knowledge_base_id, input, options \\ [])
View SourceUpdates the configurations for a data source connector.
You can't change the chunkingConfiguration
after you create the data source
connector. Specify the existing chunkingConfiguration
.
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.
update_flow_alias(client, alias_identifier, flow_identifier, input, options \\ [])
View SourceModifies 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.
update_knowledge_base(client, knowledge_base_id, input, options \\ [])
View SourceUpdates 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.
You can change the following fields:
*
name
*
description
*
roleArn
You can't change the knowledgeBaseConfiguration
or storageConfiguration
fields, so you must specify the same configurations as when you created the
knowledge base. You can send a
GetKnowledgeBase
request and copy the same configurations.
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.
Validates the definition of a flow.