Skip to content

Commit

Permalink
feat(client-bedrock-agent): This changes introduces metadata document…
Browse files Browse the repository at this point in the history
…s statistics and also updates the documentation for bedrock agent.
  • Loading branch information
awstools committed Mar 27, 2024
1 parent 7238c53 commit f6cf100
Show file tree
Hide file tree
Showing 46 changed files with 1,963 additions and 1,286 deletions.
3 changes: 1 addition & 2 deletions clients/client-bedrock-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@

AWS SDK for JavaScript BedrockAgent Client for Node.js, Browser and React Native.

An example service, deployed with the Octane Service creator,
which will echo the string
<p>Describes the API operations for creating and managing Amazon Bedrock agents.</p>

## Installing

Expand Down
3 changes: 1 addition & 2 deletions clients/client-bedrock-agent/src/BedrockAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -839,8 +839,7 @@ export interface BedrockAgent {
}

/**
* An example service, deployed with the Octane Service creator,
* which will echo the string
* <p>Describes the API operations for creating and managing Amazon Bedrock agents.</p>
* @public
*/
export class BedrockAgent extends BedrockAgentClient implements BedrockAgent {}
Expand Down
3 changes: 1 addition & 2 deletions clients/client-bedrock-agent/src/BedrockAgentClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,7 @@ export type BedrockAgentClientResolvedConfigType = __SmithyResolvedConfiguration
export interface BedrockAgentClientResolvedConfig extends BedrockAgentClientResolvedConfigType {}

/**
* An example service, deployed with the Octane Service creator,
* which will echo the string
* <p>Describes the API operations for creating and managing Amazon Bedrock agents.</p>
* @public
*/
export class BedrockAgentClient extends __Client<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export interface AssociateAgentKnowledgeBaseCommandOutput
__MetadataBearer {}

/**
* Associate a Knowledge Base to an existing Amazon Bedrock Agent
* <p>Associates a knowledge base with an agent. If a knowledge base is associated and its <code>indexState</code> is set to <code>Enabled</code>, the agent queries the knowledge base for information to augment its response to the user.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -69,25 +69,25 @@ export interface AssociateAgentKnowledgeBaseCommandOutput
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* This exception is thrown when a request is denied per access permissions
* <p>The request is denied because of missing access permissions.</p>
*
* @throws {@link ConflictException} (client fault)
* This exception is thrown when there is a conflict performing an operation
* <p>There was a conflict performing an operation.</p>
*
* @throws {@link InternalServerException} (server fault)
* This exception is thrown if there was an unexpected error during processing of request
* <p>An internal server error occurred. Retry your request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* This exception is thrown when a resource referenced by the operation does not exist
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* This exception is thrown when a request is made beyond the service quota
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
*
* @throws {@link ThrottlingException} (client fault)
* This exception is thrown when the number of requests exceeds the limit
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
*
* @throws {@link ValidationException} (client fault)
* This exception is thrown when the request's input validation fails
* <p>Input validation failed. Check your request parameters and retry the request.</p>
*
* @throws {@link BedrockAgentServiceException}
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export interface CreateAgentActionGroupCommandInput extends CreateAgentActionGro
export interface CreateAgentActionGroupCommandOutput extends CreateAgentActionGroupResponse, __MetadataBearer {}

/**
* Creates an Action Group for existing Amazon Bedrock Agent
* <p>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.</p>
* <p>To allow your agent to request the user for additional information when trying to complete a task, add an action group with the <code>parentActionGroupSignature</code> field set to <code>AMAZON.UserInput</code>. You must leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> 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 <a href="https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Observation.html">Observation</a> reprompting the user for more information.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -94,25 +95,25 @@ export interface CreateAgentActionGroupCommandOutput extends CreateAgentActionGr
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* This exception is thrown when a request is denied per access permissions
* <p>The request is denied because of missing access permissions.</p>
*
* @throws {@link ConflictException} (client fault)
* This exception is thrown when there is a conflict performing an operation
* <p>There was a conflict performing an operation.</p>
*
* @throws {@link InternalServerException} (server fault)
* This exception is thrown if there was an unexpected error during processing of request
* <p>An internal server error occurred. Retry your request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* This exception is thrown when a resource referenced by the operation does not exist
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* This exception is thrown when a request is made beyond the service quota
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
*
* @throws {@link ThrottlingException} (client fault)
* This exception is thrown when the number of requests exceeds the limit
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
*
* @throws {@link ValidationException} (client fault)
* This exception is thrown when the request's input validation fails
* <p>Input validation failed. Check your request parameters and retry the request.</p>
*
* @throws {@link BedrockAgentServiceException}
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface CreateAgentAliasCommandInput extends CreateAgentAliasRequest {}
export interface CreateAgentAliasCommandOutput extends CreateAgentAliasResponse, __MetadataBearer {}

/**
* Creates an Alias for an existing Amazon Bedrock Agent
* <p>Creates an alias of an agent that can be used to deploy the agent.</p>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -89,25 +89,25 @@ export interface CreateAgentAliasCommandOutput extends CreateAgentAliasResponse,
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* This exception is thrown when a request is denied per access permissions
* <p>The request is denied because of missing access permissions.</p>
*
* @throws {@link ConflictException} (client fault)
* This exception is thrown when there is a conflict performing an operation
* <p>There was a conflict performing an operation.</p>
*
* @throws {@link InternalServerException} (server fault)
* This exception is thrown if there was an unexpected error during processing of request
* <p>An internal server error occurred. Retry your request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* This exception is thrown when a resource referenced by the operation does not exist
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* This exception is thrown when a request is made beyond the service quota
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
*
* @throws {@link ThrottlingException} (client fault)
* This exception is thrown when the number of requests exceeds the limit
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
*
* @throws {@link ValidationException} (client fault)
* This exception is thrown when the request's input validation fails
* <p>Input validation failed. Check your request parameters and retry the request.</p>
*
* @throws {@link BedrockAgentServiceException}
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>
Expand Down
37 changes: 30 additions & 7 deletions clients/client-bedrock-agent/src/commands/CreateAgentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,30 @@ export interface CreateAgentCommandInput extends CreateAgentRequest {}
export interface CreateAgentCommandOutput extends CreateAgentResponse, __MetadataBearer {}

/**
* Creates an Amazon Bedrock Agent
* <p>Creates an agent that orchestrates interactions between foundation models, data sources, software applications, user conversations, and APIs to carry out tasks to help customers.</p>
* <ul>
* <li>
* <p>Specify the following fields for security purposes.</p>
* <ul>
* <li>
* <p>
* <code>agentResourceRoleArn</code> – The ARN of the role with permissions to create an agent.</p>
* </li>
* <li>
* <p>(Optional) <code>customerEncryptionKeyArn</code> – The ARN of a KMS key to encrypt the creation of the agent.</p>
* </li>
* <li>
* <p>(Optional) <code>idleSessionTTLinSeconds</code> – Specify the number of seconds for which the agent should maintain session information. After this time expires, the subsequent <code>InvokeAgent</code> request begins a new session.</p>
* </li>
* </ul>
* </li>
* <li>
* <p>To override the default prompt behavior for agent orchestration and to use advanced prompts, include a <code>promptOverrideConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/advanced-prompts.html">Advanced prompts</a>.</p>
* </li>
* <li>
* <p>If you agent fails to be created, the response returns a list of <code>failureReasons</code> alongside a list of <code>recommendedActions</code> for you to troubleshoot.</p>
* </li>
* </ul>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -131,22 +154,22 @@ export interface CreateAgentCommandOutput extends CreateAgentResponse, __Metadat
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* This exception is thrown when a request is denied per access permissions
* <p>The request is denied because of missing access permissions.</p>
*
* @throws {@link ConflictException} (client fault)
* This exception is thrown when there is a conflict performing an operation
* <p>There was a conflict performing an operation.</p>
*
* @throws {@link InternalServerException} (server fault)
* This exception is thrown if there was an unexpected error during processing of request
* <p>An internal server error occurred. Retry your request.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* This exception is thrown when a request is made beyond the service quota
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
*
* @throws {@link ThrottlingException} (client fault)
* This exception is thrown when the number of requests exceeds the limit
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
*
* @throws {@link ValidationException} (client fault)
* This exception is thrown when the request's input validation fails
* <p>Input validation failed. Check your request parameters and retry the request.</p>
*
* @throws {@link BedrockAgentServiceException}
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ export interface CreateDataSourceCommandInput extends CreateDataSourceRequest {}
export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse, __MetadataBearer {}

/**
* Create a new data source
* <p>Sets up a data source to be added to a knowledge base.</p>
* <important>
* <p>You can't change the <code>chunkingConfiguration</code> after you create the data source.</p>
* </important>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -105,25 +108,25 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* This exception is thrown when a request is denied per access permissions
* <p>The request is denied because of missing access permissions.</p>
*
* @throws {@link ConflictException} (client fault)
* This exception is thrown when there is a conflict performing an operation
* <p>There was a conflict performing an operation.</p>
*
* @throws {@link InternalServerException} (server fault)
* This exception is thrown if there was an unexpected error during processing of request
* <p>An internal server error occurred. Retry your request.</p>
*
* @throws {@link ResourceNotFoundException} (client fault)
* This exception is thrown when a resource referenced by the operation does not exist
* <p>The specified resource ARN was not found. Check the ARN and try your request again.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* This exception is thrown when a request is made beyond the service quota
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
*
* @throws {@link ThrottlingException} (client fault)
* This exception is thrown when the number of requests exceeds the limit
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
*
* @throws {@link ValidationException} (client fault)
* This exception is thrown when the request's input validation fails
* <p>Input validation failed. Check your request parameters and retry the request.</p>
*
* @throws {@link BedrockAgentServiceException}
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,38 @@ export interface CreateKnowledgeBaseCommandInput extends CreateKnowledgeBaseRequ
export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseResponse, __MetadataBearer {}

/**
* Create a new knowledge base
* <p>Creates a knowledge base that contains data sources from which information can be queried and used by LLMs. To create a knowledge base, you must first set up your data sources and configure a supported vector store. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup.html">Set up your data for ingestion</a>.</p>
* <note>
* <p>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 <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-create">Create a knowledge base</a>.</p>
* </note>
* <ul>
* <li>
* <p>Provide the <code>name</code> and an optional <code>description</code>.</p>
* </li>
* <li>
* <p>Provide the ARN with permissions to create a knowledge base in the <code>roleArn</code> field.</p>
* </li>
* <li>
* <p>Provide the embedding model to use in the <code>embeddingModelArn</code> field in the <code>knowledgeBaseConfiguration</code> object.</p>
* </li>
* <li>
* <p>Provide the configuration for your vector store in the <code>storageConfiguration</code> object.</p>
* <ul>
* <li>
* <p>For an Amazon OpenSearch Service database, use the <code>opensearchServerlessConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup-oss.html">Create a vector store in Amazon OpenSearch Service</a>.</p>
* </li>
* <li>
* <p>For an Amazon Aurora database, use the <code>RdsConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup-rds.html">Create a vector store in Amazon Aurora</a>.</p>
* </li>
* <li>
* <p>For a Pinecone database, use the <code>pineconeConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup-pinecone.html">Create a vector store in Pinecone</a>.</p>
* </li>
* <li>
* <p>For a Redis Enterprise Cloud database, use the <code>redisEnterpriseCloudConfiguration</code> object. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/knowledge-base-setup-redis.html">Create a vector store in Redis Enterprise Cloud</a>.</p>
* </li>
* </ul>
* </li>
* </ul>
* @example
* Use a bare-bones client and the command you need to make an API call.
* ```javascript
Expand Down Expand Up @@ -168,22 +199,22 @@ export interface CreateKnowledgeBaseCommandOutput extends CreateKnowledgeBaseRes
* @see {@link BedrockAgentClientResolvedConfig | config} for BedrockAgentClient's `config` shape.
*
* @throws {@link AccessDeniedException} (client fault)
* This exception is thrown when a request is denied per access permissions
* <p>The request is denied because of missing access permissions.</p>
*
* @throws {@link ConflictException} (client fault)
* This exception is thrown when there is a conflict performing an operation
* <p>There was a conflict performing an operation.</p>
*
* @throws {@link InternalServerException} (server fault)
* This exception is thrown if there was an unexpected error during processing of request
* <p>An internal server error occurred. Retry your request.</p>
*
* @throws {@link ServiceQuotaExceededException} (client fault)
* This exception is thrown when a request is made beyond the service quota
* <p>The number of requests exceeds the service quota. Resubmit your request later.</p>
*
* @throws {@link ThrottlingException} (client fault)
* This exception is thrown when the number of requests exceeds the limit
* <p>The number of requests exceeds the limit. Resubmit your request later.</p>
*
* @throws {@link ValidationException} (client fault)
* This exception is thrown when the request's input validation fails
* <p>Input validation failed. Check your request parameters and retry the request.</p>
*
* @throws {@link BedrockAgentServiceException}
* <p>Base exception class for all service exceptions from BedrockAgent service.</p>
Expand Down
Loading

0 comments on commit f6cf100

Please sign in to comment.