@aws-sdk/client-bedrock-agent-runtime 3.764.0 → 3.772.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -181,6 +181,9 @@ export interface ActionGroupInvocationOutput {
181
181
  export declare const ActionGroupSignature: {
182
182
  readonly AMAZON_CODEINTERPRETER: "AMAZON.CodeInterpreter";
183
183
  readonly AMAZON_USERINPUT: "AMAZON.UserInput";
184
+ readonly ANTHROPIC_BASH: "ANTHROPIC.Bash";
185
+ readonly ANTHROPIC_COMPUTER: "ANTHROPIC.Computer";
186
+ readonly ANTHROPIC_TEXTEDITOR: "ANTHROPIC.TextEditor";
184
187
  };
185
188
  /**
186
189
  * @public
@@ -418,14 +421,41 @@ export interface AgentActionGroup {
418
421
  */
419
422
  description?: string | undefined;
420
423
  /**
421
- * <p>
422
- * To allow your agent to request the user for additional information when trying to complete a task, set this field to <code>AMAZON.UserInput</code>.
423
- * You must leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields blank for this action group.
424
- * </p>
425
- * <p>To allow your agent to generate, run, and troubleshoot code when trying to complete a task, set this field to <code>AMAZON.CodeInterpreter</code>. You must
426
- * leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields blank for this action group.</p>
427
- * <p>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,
428
- * 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>
424
+ * <p>Specify a built-in or computer use action for this action group. If you specify a value, you must leave the <code>description</code>, <code>apiSchema</code>, and <code>actionGroupExecutor</code> fields empty for this action group. </p>
425
+ * <ul>
426
+ * <li>
427
+ * <p>To allow your agent to request the user for additional information when trying to complete a task, set this field to <code>AMAZON.UserInput</code>. </p>
428
+ * </li>
429
+ * <li>
430
+ * <p>To allow your agent to generate, run, and troubleshoot code when trying to complete a task, set this field to <code>AMAZON.CodeInterpreter</code>.</p>
431
+ * </li>
432
+ * <li>
433
+ * <p>To allow your agent to use an Anthropic computer use tool, specify one of the following values. </p>
434
+ * <important>
435
+ * <p>
436
+ * Computer use is a new Anthropic Claude model capability (in beta) available with Anthropic Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only.
437
+ * When operating computer use functionality, we recommend taking additional security precautions,
438
+ * such as executing computer actions in virtual environments with restricted data access and limited internet connectivity.
439
+ * For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agent-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>.
440
+ * </p>
441
+ * </important>
442
+ * <ul>
443
+ * <li>
444
+ * <p>
445
+ * <code>ANTHROPIC.Computer</code> - Gives the agent permission to use the mouse and keyboard and
446
+ * take screenshots.</p>
447
+ * </li>
448
+ * <li>
449
+ * <p>
450
+ * <code>ANTHROPIC.TextEditor</code> - Gives the agent permission to view, create and edit files.</p>
451
+ * </li>
452
+ * <li>
453
+ * <p>
454
+ * <code>ANTHROPIC.Bash</code> - Gives the agent permission to run commands in a bash shell.</p>
455
+ * </li>
456
+ * </ul>
457
+ * </li>
458
+ * </ul>
429
459
  * @public
430
460
  */
431
461
  parentActionGroupSignature?: ActionGroupSignature | undefined;
@@ -452,6 +482,16 @@ export interface AgentActionGroup {
452
482
  * @public
453
483
  */
454
484
  functionSchema?: FunctionSchema | undefined;
485
+ /**
486
+ * <p>
487
+ * The configuration settings for a computer use action.
488
+ * </p>
489
+ * <important>
490
+ * <p>Computer use is a new Anthropic Claude model capability (in beta) available with Claude 3.7 Sonnet and Claude 3.5 Sonnet v2 only. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agent-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>.</p>
491
+ * </important>
492
+ * @public
493
+ */
494
+ parentActionGroupSignatureParams?: Record<string, string> | undefined;
455
495
  }
456
496
  /**
457
497
  * @public
@@ -478,6 +518,67 @@ export declare const ConfirmationState: {
478
518
  * @public
479
519
  */
480
520
  export type ConfirmationState = (typeof ConfirmationState)[keyof typeof ConfirmationState];
521
+ /**
522
+ * @public
523
+ * @enum
524
+ */
525
+ export declare const ImageInputFormat: {
526
+ readonly GIF: "gif";
527
+ readonly JPEG: "jpeg";
528
+ readonly PNG: "png";
529
+ readonly WEBP: "webp";
530
+ };
531
+ /**
532
+ * @public
533
+ */
534
+ export type ImageInputFormat = (typeof ImageInputFormat)[keyof typeof ImageInputFormat];
535
+ /**
536
+ * <p>Details about the source of an input image in the result from a function in the action group invocation.</p>
537
+ * @public
538
+ */
539
+ export type ImageInputSource = ImageInputSource.BytesMember | ImageInputSource.$UnknownMember;
540
+ /**
541
+ * @public
542
+ */
543
+ export declare namespace ImageInputSource {
544
+ /**
545
+ * <p> The raw image bytes for the image. If you use an Amazon Web Services SDK, you don't need to encode the image bytes in base64.</p>
546
+ * @public
547
+ */
548
+ interface BytesMember {
549
+ bytes: Uint8Array;
550
+ $unknown?: never;
551
+ }
552
+ /**
553
+ * @public
554
+ */
555
+ interface $UnknownMember {
556
+ bytes?: never;
557
+ $unknown: [string, any];
558
+ }
559
+ interface Visitor<T> {
560
+ bytes: (value: Uint8Array) => T;
561
+ _: (name: string, value: any) => T;
562
+ }
563
+ const visit: <T>(value: ImageInputSource, visitor: Visitor<T>) => T;
564
+ }
565
+ /**
566
+ * <p>Details about an image in the result from a function in the action group invocation. You can specify images only when the function
567
+ * is a computer use action. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agent-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>.</p>
568
+ * @public
569
+ */
570
+ export interface ImageInput {
571
+ /**
572
+ * <p>The type of image in the result.</p>
573
+ * @public
574
+ */
575
+ format: ImageInputFormat | undefined;
576
+ /**
577
+ * <p>The source of the image in the result.</p>
578
+ * @public
579
+ */
580
+ source: ImageInputSource | undefined;
581
+ }
481
582
  /**
482
583
  * <p>Contains the body of the API response.</p>
483
584
  * <p>This data type is used in the following API operations:</p>
@@ -495,6 +596,14 @@ export interface ContentBody {
495
596
  * @public
496
597
  */
497
598
  body?: string | undefined;
599
+ /**
600
+ * <p>Lists details, including format and source, for the image in the response from the function call. You can specify only one image and the function in the <code>returnControlInvocationResults</code>
601
+ * must be a computer use action.
602
+ * For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agent-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>.
603
+ * </p>
604
+ * @public
605
+ */
606
+ images?: ImageInput[] | undefined;
498
607
  }
499
608
  /**
500
609
  * @public
@@ -589,7 +698,10 @@ export interface FunctionResult {
589
698
  */
590
699
  function?: string | undefined;
591
700
  /**
592
- * <p>The response from the function call using the parameters. The key of the object is the content type (currently, only <code>TEXT</code> is supported). The response may be returned directly or from the Lambda function.</p>
701
+ * <p>The response from the function call using the parameters. The response might be returned directly or from the Lambda function.
702
+ * Specify <code>TEXT</code> or <code>IMAGES</code>. The key of the object is the content type. You can only specify one type. If you
703
+ * specify <code>IMAGES</code>, you can specify only one image. You can specify images only when the function in the <code>returnControlInvocationResults</code>
704
+ * is a computer use action. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agent-computer-use.html">Configure an Amazon Bedrock Agent to complete tasks with computer use tools</a>.</p>
593
705
  * @public
594
706
  */
595
707
  responseBody?: Record<string, ContentBody> | undefined;
@@ -7746,41 +7858,6 @@ export interface UpdateSessionResponse {
7746
7858
  */
7747
7859
  lastUpdatedAt: Date | undefined;
7748
7860
  }
7749
- /**
7750
- * @public
7751
- */
7752
- export interface ListTagsForResourceRequest {
7753
- /**
7754
- * <p>The Amazon Resource Name (ARN) of the resource for which to list tags.</p>
7755
- * @public
7756
- */
7757
- resourceArn: string | undefined;
7758
- }
7759
- /**
7760
- * @public
7761
- */
7762
- export interface ListTagsForResourceResponse {
7763
- /**
7764
- * <p>The key-value pairs for the tags associated with the resource.</p>
7765
- * @public
7766
- */
7767
- tags?: Record<string, string> | undefined;
7768
- }
7769
- /**
7770
- * @public
7771
- */
7772
- export interface TagResourceRequest {
7773
- /**
7774
- * <p>The Amazon Resource Name (ARN) of the resource to tag.</p>
7775
- * @public
7776
- */
7777
- resourceArn: string | undefined;
7778
- /**
7779
- * <p>An object containing key-value pairs that define the tags to attach to the resource.</p>
7780
- * @public
7781
- */
7782
- tags: Record<string, string> | undefined;
7783
- }
7784
7861
  /**
7785
7862
  * @internal
7786
7863
  */
@@ -1,4 +1,39 @@
1
1
  import { AgentActionGroup, AgentCollaboration, BedrockModelConfigurations, CollaboratorConfiguration, ConversationHistory, ExternalSourcesRetrieveAndGenerateConfiguration, FilterAttribute, GenerationConfiguration, GuardrailConfiguration, GuardrailConfigurationWithArn, ImplicitFilterConfiguration, InlineBedrockModelConfigurations, InlineSessionState, InputFile, InvocationResultMember, KnowledgeBaseQuery, OrchestrationConfiguration, PromptOverrideConfiguration, RetrieveAndGenerateInput, RetrieveAndGenerateSessionConfiguration, RetrieveAndGenerateType, SearchType, StreamingConfigurations, VectorSearchRerankingConfiguration } from "./models_0";
2
+ /**
3
+ * @public
4
+ */
5
+ export interface ListTagsForResourceRequest {
6
+ /**
7
+ * <p>The Amazon Resource Name (ARN) of the resource for which to list tags.</p>
8
+ * @public
9
+ */
10
+ resourceArn: string | undefined;
11
+ }
12
+ /**
13
+ * @public
14
+ */
15
+ export interface ListTagsForResourceResponse {
16
+ /**
17
+ * <p>The key-value pairs for the tags associated with the resource.</p>
18
+ * @public
19
+ */
20
+ tags?: Record<string, string> | undefined;
21
+ }
22
+ /**
23
+ * @public
24
+ */
25
+ export interface TagResourceRequest {
26
+ /**
27
+ * <p>The Amazon Resource Name (ARN) of the resource to tag.</p>
28
+ * @public
29
+ */
30
+ resourceArn: string | undefined;
31
+ /**
32
+ * <p>An object containing key-value pairs that define the tags to attach to the resource.</p>
33
+ * @public
34
+ */
35
+ tags: Record<string, string> | undefined;
36
+ }
2
37
  /**
3
38
  * @public
4
39
  */
@@ -69,7 +104,16 @@ export declare namespace RetrievalFilter {
69
104
  $unknown?: never;
70
105
  }
71
106
  /**
72
- * <p>Knowledge base data sources that contain a metadata attribute whose name matches the <code>key</code> and whose value doesn't match the <code>value</code> in this object are returned.</p>
107
+ * <p>Knowledge base data sources are returned when:</p>
108
+ * <ul>
109
+ * <li>
110
+ * <p>It contains a metadata attribute whose name matches the <code>key</code> and whose value doesn't match the <code>value</code>
111
+ * in this object.</p>
112
+ * </li>
113
+ * <li>
114
+ * <p>The key is not present in the document.</p>
115
+ * </li>
116
+ * </ul>
73
117
  * <p>The following example would return data sources that don't contain an <code>animal</code> attribute whose value is <code>cat</code>.</p>
74
118
  * <p>
75
119
  * <code>"notEquals": \{ "key": "animal", "value": "cat" \}</code>
@@ -590,7 +634,9 @@ export interface RetrieveRequest {
590
634
  export interface RetrieveAndGenerateConfiguration {
591
635
  /**
592
636
  * <p>The type of resource that contains your data for retrieving information and generating responses.</p>
593
- * <p>If you choose to use <code>EXTERNAL_SOURCES</code>, then currently only Anthropic Claude 3 Sonnet models for knowledge bases are supported.</p>
637
+ * <note>
638
+ * <p>If you choose to use <code>EXTERNAL_SOURCES</code>, then currently only Anthropic Claude 3 Sonnet models for knowledge bases are supported.</p>
639
+ * </note>
594
640
  * @public
595
641
  */
596
642
  type: RetrieveAndGenerateType | undefined;
@@ -747,12 +793,20 @@ export interface RetrieveAndGenerateStreamRequest {
747
793
  */
748
794
  export interface SessionState {
749
795
  /**
750
- * <p>Contains attributes that persist across a session and the values of those attributes.</p>
796
+ * <p>Contains attributes that persist across a session and the values of those attributes. If <code>sessionAttributes</code> are passed to a supervisor agent in <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-multi-agent-collaboration.html">multi-agent collaboration</a>, it will be forwarded to all agent collaborators.</p>
751
797
  * @public
752
798
  */
753
799
  sessionAttributes?: Record<string, string> | undefined;
754
800
  /**
755
- * <p>Contains attributes that persist across a prompt and the values of those attributes. These attributes replace the $prompt_session_attributes$ placeholder variable in the orchestration prompt template. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html">Prompt template placeholder variables</a>.</p>
801
+ * <p>Contains attributes that persist across a prompt and the values of those attributes. </p>
802
+ * <ul>
803
+ * <li>
804
+ * <p>In orchestration prompt template, these attributes replace the $prompt_session_attributes$ placeholder variable. For more information, see <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html">Prompt template placeholder variables</a>.</p>
805
+ * </li>
806
+ * <li>
807
+ * <p>In <a href="https://docs.aws.amazon.com/bedrock/latest/userguide/agents-multi-agent-collaboration.html">multi-agent collaboration</a>, the <code>promptSessionAttributes</code> will only be used by supervisor agent when $prompt_session_attributes$ is present in prompt template. </p>
808
+ * </li>
809
+ * </ul>
756
810
  * @public
757
811
  */
758
812
  promptSessionAttributes?: Record<string, string> | undefined;
@@ -8,7 +8,7 @@ import {
8
8
  import {
9
9
  ListTagsForResourceRequest,
10
10
  ListTagsForResourceResponse,
11
- } from "../models/models_0";
11
+ } from "../models/models_1";
12
12
  export { __MetadataBearer };
13
13
  export { $Command };
14
14
  export interface ListTagsForResourceCommandInput
@@ -5,8 +5,7 @@ import {
5
5
  ServiceInputTypes,
6
6
  ServiceOutputTypes,
7
7
  } from "../BedrockAgentRuntimeClient";
8
- import { TagResourceRequest } from "../models/models_0";
9
- import { TagResourceResponse } from "../models/models_1";
8
+ import { TagResourceRequest, TagResourceResponse } from "../models/models_1";
10
9
  export { __MetadataBearer };
11
10
  export { $Command };
12
11
  export interface TagResourceCommandInput extends TagResourceRequest {}
@@ -69,6 +69,9 @@ export interface ActionGroupInvocationOutput {
69
69
  export declare const ActionGroupSignature: {
70
70
  readonly AMAZON_CODEINTERPRETER: "AMAZON.CodeInterpreter";
71
71
  readonly AMAZON_USERINPUT: "AMAZON.UserInput";
72
+ readonly ANTHROPIC_BASH: "ANTHROPIC.Bash";
73
+ readonly ANTHROPIC_COMPUTER: "ANTHROPIC.Computer";
74
+ readonly ANTHROPIC_TEXTEDITOR: "ANTHROPIC.TextEditor";
72
75
  };
73
76
  export type ActionGroupSignature =
74
77
  (typeof ActionGroupSignature)[keyof typeof ActionGroupSignature];
@@ -160,6 +163,7 @@ export interface AgentActionGroup {
160
163
  actionGroupExecutor?: ActionGroupExecutor | undefined;
161
164
  apiSchema?: APISchema | undefined;
162
165
  functionSchema?: FunctionSchema | undefined;
166
+ parentActionGroupSignatureParams?: Record<string, string> | undefined;
163
167
  }
164
168
  export declare const AgentCollaboration: {
165
169
  readonly DISABLED: "DISABLED";
@@ -174,8 +178,39 @@ export declare const ConfirmationState: {
174
178
  };
175
179
  export type ConfirmationState =
176
180
  (typeof ConfirmationState)[keyof typeof ConfirmationState];
181
+ export declare const ImageInputFormat: {
182
+ readonly GIF: "gif";
183
+ readonly JPEG: "jpeg";
184
+ readonly PNG: "png";
185
+ readonly WEBP: "webp";
186
+ };
187
+ export type ImageInputFormat =
188
+ (typeof ImageInputFormat)[keyof typeof ImageInputFormat];
189
+ export type ImageInputSource =
190
+ | ImageInputSource.BytesMember
191
+ | ImageInputSource.$UnknownMember;
192
+ export declare namespace ImageInputSource {
193
+ interface BytesMember {
194
+ bytes: Uint8Array;
195
+ $unknown?: never;
196
+ }
197
+ interface $UnknownMember {
198
+ bytes?: never;
199
+ $unknown: [string, any];
200
+ }
201
+ interface Visitor<T> {
202
+ bytes: (value: Uint8Array) => T;
203
+ _: (name: string, value: any) => T;
204
+ }
205
+ const visit: <T>(value: ImageInputSource, visitor: Visitor<T>) => T;
206
+ }
207
+ export interface ImageInput {
208
+ format: ImageInputFormat | undefined;
209
+ source: ImageInputSource | undefined;
210
+ }
177
211
  export interface ContentBody {
178
212
  body?: string | undefined;
213
+ images?: ImageInput[] | undefined;
179
214
  }
180
215
  export declare const ResponseState: {
181
216
  readonly FAILURE: "FAILURE";
@@ -3291,16 +3326,6 @@ export interface UpdateSessionResponse {
3291
3326
  createdAt: Date | undefined;
3292
3327
  lastUpdatedAt: Date | undefined;
3293
3328
  }
3294
- export interface ListTagsForResourceRequest {
3295
- resourceArn: string | undefined;
3296
- }
3297
- export interface ListTagsForResourceResponse {
3298
- tags?: Record<string, string> | undefined;
3299
- }
3300
- export interface TagResourceRequest {
3301
- resourceArn: string | undefined;
3302
- tags: Record<string, string> | undefined;
3303
- }
3304
3329
  export declare const ActionGroupInvocationInputFilterSensitiveLog: (
3305
3330
  obj: ActionGroupInvocationInput
3306
3331
  ) => any;
@@ -24,6 +24,16 @@ import {
24
24
  StreamingConfigurations,
25
25
  VectorSearchRerankingConfiguration,
26
26
  } from "./models_0";
27
+ export interface ListTagsForResourceRequest {
28
+ resourceArn: string | undefined;
29
+ }
30
+ export interface ListTagsForResourceResponse {
31
+ tags?: Record<string, string> | undefined;
32
+ }
33
+ export interface TagResourceRequest {
34
+ resourceArn: string | undefined;
35
+ tags: Record<string, string> | undefined;
36
+ }
27
37
  export interface TagResourceResponse {}
28
38
  export interface UntagResourceRequest {
29
39
  resourceArn: string | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-bedrock-agent-runtime",
3
3
  "description": "AWS SDK for JavaScript Bedrock Agent Runtime Client for Node.js, Browser and React Native",
4
- "version": "3.764.0",
4
+ "version": "3.772.0",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
7
7
  "build:cjs": "node ../../scripts/compilation/inline client-bedrock-agent-runtime",
@@ -21,10 +21,10 @@
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
23
  "@aws-sdk/core": "3.758.0",
24
- "@aws-sdk/credential-provider-node": "3.758.0",
24
+ "@aws-sdk/credential-provider-node": "3.772.0",
25
25
  "@aws-sdk/middleware-host-header": "3.734.0",
26
26
  "@aws-sdk/middleware-logger": "3.734.0",
27
- "@aws-sdk/middleware-recursion-detection": "3.734.0",
27
+ "@aws-sdk/middleware-recursion-detection": "3.772.0",
28
28
  "@aws-sdk/middleware-user-agent": "3.758.0",
29
29
  "@aws-sdk/region-config-resolver": "3.734.0",
30
30
  "@aws-sdk/types": "3.734.0",