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

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

Gets information about an agent.

Gets information about an alias of an agent.

Gets information about a knowledge base associated with an agent.

Gets details about a version of an agent.

Retrieves information about a flow.

Retrieves information about a version of a flow.

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.

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 flows and information about each flow.

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.

Updates the configuration of an agent.

Updates configurations for an alias of an agent.

Updates the configuration for a knowledge base that has been associated with an agent.

Updates the configurations for a data source connector.

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

Link to this function

associate_agent_collaborator(client, agent_id, agent_version, input, options \\ [])

View Source

Makes an agent a collaborator for another agent.

Link to this function

associate_agent_knowledge_base(client, agent_id, agent_version, input, options \\ [])

View Source

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

Link to this function

create_agent(client, input, options \\ [])

View Source

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.

Link to this function

create_agent_action_group(client, agent_id, agent_version, input, options \\ [])

View Source

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.

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.

Link to this function

create_agent_alias(client, agent_id, input, options \\ [])

View Source

Creates an alias of an agent that can be used to deploy the agent.

Link to this function

create_data_source(client, knowledge_base_id, input, options \\ [])

View Source

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

Link to this function

create_flow(client, input, options \\ [])

View Source

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.

Link to this function

create_flow_alias(client, flow_identifier, input, options \\ [])

View Source

Creates an alias of a flow for deployment.

For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

Link to this function

create_flow_version(client, flow_identifier, input, options \\ [])

View Source

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.

Link to this function

create_knowledge_base(client, input, options \\ [])

View Source

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.

Link to this function

create_prompt(client, input, options \\ [])

View Source

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.

Link to this function

create_prompt_version(client, prompt_identifier, input, options \\ [])

View Source

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.

Link to this function

delete_agent(client, agent_id, input, options \\ [])

View Source

Deletes an agent.

Link to this function

delete_agent_action_group(client, action_group_id, agent_id, agent_version, input, options \\ [])

View Source

Deletes an action group in an agent.

Link to this function

delete_agent_alias(client, agent_alias_id, agent_id, input, options \\ [])

View Source

Deletes an alias of an agent.

Link to this function

delete_agent_version(client, agent_id, agent_version, input, options \\ [])

View Source

Deletes a version of an agent.

Link to this function

delete_data_source(client, data_source_id, knowledge_base_id, input, options \\ [])

View Source

Deletes a data source from a knowledge base.

Link to this function

delete_flow(client, flow_identifier, input, options \\ [])

View Source

Deletes a flow.

Link to this function

delete_flow_alias(client, alias_identifier, flow_identifier, input, options \\ [])

View Source

Deletes an alias of a flow.

Link to this function

delete_flow_version(client, flow_identifier, flow_version, input, options \\ [])

View Source

Deletes a version of a flow.

Link to this function

delete_knowledge_base(client, knowledge_base_id, input, options \\ [])

View Source

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.

Link to this function

delete_knowledge_base_documents(client, data_source_id, knowledge_base_id, input, options \\ [])

View Source

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

Link to this function

delete_prompt(client, prompt_identifier, input, options \\ [])

View Source

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.

Link to this function

disassociate_agent_collaborator(client, agent_id, agent_version, collaborator_id, input, options \\ [])

View Source

Disassociates an agent collaborator.

Link to this function

disassociate_agent_knowledge_base(client, agent_id, agent_version, knowledge_base_id, input, options \\ [])

View Source

Disassociates a knowledge base from an agent.

Link to this function

get_agent(client, agent_id, options \\ [])

View Source

Gets information about an agent.

Link to this function

get_agent_action_group(client, action_group_id, agent_id, agent_version, options \\ [])

View Source

Gets information about an action group for an agent.

Link to this function

get_agent_alias(client, agent_alias_id, agent_id, options \\ [])

View Source

Gets information about an alias of an agent.

Link to this function

get_agent_collaborator(client, agent_id, agent_version, collaborator_id, options \\ [])

View Source

Retrieves information about an agent's collaborator.

Link to this function

get_agent_knowledge_base(client, agent_id, agent_version, knowledge_base_id, options \\ [])

View Source

Gets information about a knowledge base associated with an agent.

Link to this function

get_agent_version(client, agent_id, agent_version, options \\ [])

View Source

Gets details about a version of an agent.

Link to this function

get_data_source(client, data_source_id, knowledge_base_id, options \\ [])

View Source

Gets information about a data source.

Link to this function

get_flow(client, flow_identifier, options \\ [])

View Source

Retrieves information about a flow.

For more information, see Manage a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

Link to this function

get_flow_alias(client, alias_identifier, flow_identifier, options \\ [])

View Source

Retrieves information about a flow.

For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

Link to this function

get_flow_version(client, flow_identifier, flow_version, options \\ [])

View Source

Retrieves information about a version of a flow.

For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

Link to this function

get_ingestion_job(client, data_source_id, ingestion_job_id, knowledge_base_id, options \\ [])

View Source

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.

Link to this function

get_knowledge_base(client, knowledge_base_id, options \\ [])

View Source

Gets information about a knoweldge base.

Link to this function

get_knowledge_base_documents(client, data_source_id, knowledge_base_id, input, options \\ [])

View Source

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

Link to this function

get_prompt(client, prompt_identifier, prompt_version \\ nil, options \\ [])

View Source

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.

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.

Link to this function

ingest_knowledge_base_documents(client, data_source_id, knowledge_base_id, input, options \\ [])

View Source

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

Link to this function

list_agent_action_groups(client, agent_id, agent_version, input, options \\ [])

View Source

Lists the action groups for an agent and information about each one.

Link to this function

list_agent_aliases(client, agent_id, input, options \\ [])

View Source

Lists the aliases of an agent and information about each one.

Link to this function

list_agent_collaborators(client, agent_id, agent_version, input, options \\ [])

View Source

Retrieve a list of an agent's collaborators.

Link to this function

list_agent_knowledge_bases(client, agent_id, agent_version, input, options \\ [])

View Source

Lists knowledge bases associated with an agent and information about each one.

Link to this function

list_agent_versions(client, agent_id, input, options \\ [])

View Source

Lists the versions of an agent and information about each version.

Link to this function

list_agents(client, input, options \\ [])

View Source

Lists the agents belonging to an account and information about each agent.

Link to this function

list_data_sources(client, knowledge_base_id, input, options \\ [])

View Source

Lists the data sources in a knowledge base and information about each one.

Link to this function

list_flow_aliases(client, flow_identifier, max_results \\ nil, next_token \\ nil, options \\ [])

View Source

Returns a list of aliases for a flow.

Link to this function

list_flow_versions(client, flow_identifier, max_results \\ nil, next_token \\ nil, options \\ [])

View Source

Returns a list of information about each flow.

For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

Link to this function

list_flows(client, max_results \\ nil, next_token \\ nil, options \\ [])

View Source

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.

Link to this function

list_ingestion_jobs(client, data_source_id, knowledge_base_id, input, options \\ [])

View Source

Lists the data ingestion jobs for a data source.

The list also includes information about each job.

Link to this function

list_knowledge_base_documents(client, data_source_id, knowledge_base_id, input, options \\ [])

View Source

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

Link to this function

list_knowledge_bases(client, input, options \\ [])

View Source

Lists the knowledge bases in an account.

The list also includesinformation about each knowledge base.

Link to this function

list_prompts(client, max_results \\ nil, next_token \\ nil, prompt_identifier \\ nil, options \\ [])

View Source

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.

For more information, see View information about prompts using Prompt management in the Amazon Bedrock User Guide.

Link to this function

list_tags_for_resource(client, resource_arn, options \\ [])

View Source

List all the tags for the resource you specify.

Link to this function

prepare_agent(client, agent_id, input, options \\ [])

View Source

Creates a DRAFT version of the agent that can be used for internal testing.

Link to this function

prepare_flow(client, flow_identifier, input, options \\ [])

View Source

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.

Link to this function

start_ingestion_job(client, data_source_id, knowledge_base_id, input, options \\ [])

View Source

Begins a data ingestion job.

Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data.

Link to this function

stop_ingestion_job(client, data_source_id, ingestion_job_id, knowledge_base_id, input, options \\ [])

View Source

Stops a currently running data ingestion job.

You can send a StartIngestionJob request again to ingest the rest of your data when you are ready.

Link to this function

tag_resource(client, resource_arn, input, options \\ [])

View Source

Associate tags with a resource.

For more information, see Tagging resources in the Amazon Bedrock User Guide.

Link to this function

untag_resource(client, resource_arn, input, options \\ [])

View Source

Remove tags from a resource.

Link to this function

update_agent(client, agent_id, input, options \\ [])

View Source

Updates the configuration of an agent.

Link to this function

update_agent_action_group(client, action_group_id, agent_id, agent_version, input, options \\ [])

View Source

Updates the configuration for an action group for an agent.

Link to this function

update_agent_alias(client, agent_alias_id, agent_id, input, options \\ [])

View Source

Updates configurations for an alias of an agent.

Link to this function

update_agent_collaborator(client, agent_id, agent_version, collaborator_id, input, options \\ [])

View Source

Updates an agent's collaborator.

Link to this function

update_agent_knowledge_base(client, agent_id, agent_version, knowledge_base_id, input, options \\ [])

View Source

Updates the configuration for a knowledge base that has been associated with an agent.

Link to this function

update_data_source(client, data_source_id, knowledge_base_id, input, options \\ [])

View Source

Updates the configurations for a data source connector.

You can't change the chunkingConfiguration after you create the data source connector. Specify the existing chunkingConfiguration.

Link to this function

update_flow(client, flow_identifier, input, options \\ [])

View Source

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.

Link to this function

update_flow_alias(client, alias_identifier, flow_identifier, input, options \\ [])

View Source

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.

Link to this function

update_knowledge_base(client, knowledge_base_id, input, options \\ [])

View Source

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.

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.

Link to this function

update_prompt(client, prompt_identifier, input, options \\ [])

View Source

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.

Link to this function

validate_flow_definition(client, input, options \\ [])

View Source

Validates the definition of a flow.