Skip to content

Commit 808e71b

Browse files
author
awstools
committed
feat(client-bedrock-agent): Support for custom user agent and max web pages crawled for web connector. Support app only credentials for SharePoint connector. Increase agents memory duration limit to 365 days. Support to specify max number of session summaries to include in agent invocation context.
1 parent 47d77a9 commit 808e71b

File tree

11 files changed

+171
-35
lines changed

11 files changed

+171
-35
lines changed

clients/client-bedrock-agent/src/commands/CreateAgentCommand.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export interface CreateAgentCommandOutput extends CreateAgentResponse, __Metadat
9292
* promptOverrideConfiguration: { // PromptOverrideConfiguration
9393
* promptConfigurations: [ // PromptConfigurations // required
9494
* { // PromptConfiguration
95-
* promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION",
95+
* promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "MEMORY_SUMMARIZATION",
9696
* promptCreationMode: "DEFAULT" || "OVERRIDDEN",
9797
* promptState: "ENABLED" || "DISABLED",
9898
* basePromptTemplate: "STRING_VALUE",
@@ -120,6 +120,9 @@ export interface CreateAgentCommandOutput extends CreateAgentResponse, __Metadat
120120
* "SESSION_SUMMARY",
121121
* ],
122122
* storageDays: Number("int"),
123+
* sessionSummaryConfiguration: { // SessionSummaryConfiguration
124+
* maxRecentSessions: Number("int"),
125+
* },
123126
* },
124127
* agentCollaboration: "SUPERVISOR" || "SUPERVISOR_ROUTER" || "DISABLED",
125128
* };
@@ -157,7 +160,7 @@ export interface CreateAgentCommandOutput extends CreateAgentResponse, __Metadat
157160
* // promptOverrideConfiguration: { // PromptOverrideConfiguration
158161
* // promptConfigurations: [ // PromptConfigurations // required
159162
* // { // PromptConfiguration
160-
* // promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION",
163+
* // promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "MEMORY_SUMMARIZATION",
161164
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
162165
* // promptState: "ENABLED" || "DISABLED",
163166
* // basePromptTemplate: "STRING_VALUE",
@@ -185,6 +188,9 @@ export interface CreateAgentCommandOutput extends CreateAgentResponse, __Metadat
185188
* // "SESSION_SUMMARY",
186189
* // ],
187190
* // storageDays: Number("int"),
191+
* // sessionSummaryConfiguration: { // SessionSummaryConfiguration
192+
* // maxRecentSessions: Number("int"),
193+
* // },
188194
* // },
189195
* // agentCollaboration: "SUPERVISOR" || "SUPERVISOR_ROUTER" || "DISABLED",
190196
* // },

clients/client-bedrock-agent/src/commands/CreateDataSourceCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
7070
* crawlerConfiguration: { // WebCrawlerConfiguration
7171
* crawlerLimits: { // WebCrawlerLimits
7272
* rateLimit: Number("int"),
73+
* maxPages: Number("int"),
7374
* },
7475
* inclusionFilters: [ // FilterList
7576
* "STRING_VALUE",
@@ -78,6 +79,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
7879
* "STRING_VALUE",
7980
* ],
8081
* scope: "HOST_ONLY" || "SUBDOMAINS",
82+
* userAgent: "STRING_VALUE",
8183
* },
8284
* },
8385
* confluenceConfiguration: { // ConfluenceDataSourceConfiguration
@@ -137,7 +139,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
137139
* "STRING_VALUE",
138140
* ],
139141
* hostType: "ONLINE", // required
140-
* authType: "OAUTH2_CLIENT_CREDENTIALS", // required
142+
* authType: "OAUTH2_CLIENT_CREDENTIALS" || "OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS", // required
141143
* credentialsSecretArn: "STRING_VALUE", // required
142144
* },
143145
* crawlerConfiguration: { // SharePointCrawlerConfiguration
@@ -244,6 +246,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
244246
* // crawlerConfiguration: { // WebCrawlerConfiguration
245247
* // crawlerLimits: { // WebCrawlerLimits
246248
* // rateLimit: Number("int"),
249+
* // maxPages: Number("int"),
247250
* // },
248251
* // inclusionFilters: [ // FilterList
249252
* // "STRING_VALUE",
@@ -252,6 +255,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
252255
* // "STRING_VALUE",
253256
* // ],
254257
* // scope: "HOST_ONLY" || "SUBDOMAINS",
258+
* // userAgent: "STRING_VALUE",
255259
* // },
256260
* // },
257261
* // confluenceConfiguration: { // ConfluenceDataSourceConfiguration
@@ -311,7 +315,7 @@ export interface CreateDataSourceCommandOutput extends CreateDataSourceResponse,
311315
* // "STRING_VALUE",
312316
* // ],
313317
* // hostType: "ONLINE", // required
314-
* // authType: "OAUTH2_CLIENT_CREDENTIALS", // required
318+
* // authType: "OAUTH2_CLIENT_CREDENTIALS" || "OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS", // required
315319
* // credentialsSecretArn: "STRING_VALUE", // required
316320
* // },
317321
* // crawlerConfiguration: { // SharePointCrawlerConfiguration

clients/client-bedrock-agent/src/commands/GetAgentCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export interface GetAgentCommandOutput extends GetAgentResponse, __MetadataBeare
7272
* // promptOverrideConfiguration: { // PromptOverrideConfiguration
7373
* // promptConfigurations: [ // PromptConfigurations // required
7474
* // { // PromptConfiguration
75-
* // promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION",
75+
* // promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "MEMORY_SUMMARIZATION",
7676
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
7777
* // promptState: "ENABLED" || "DISABLED",
7878
* // basePromptTemplate: "STRING_VALUE",
@@ -100,6 +100,9 @@ export interface GetAgentCommandOutput extends GetAgentResponse, __MetadataBeare
100100
* // "SESSION_SUMMARY",
101101
* // ],
102102
* // storageDays: Number("int"),
103+
* // sessionSummaryConfiguration: { // SessionSummaryConfiguration
104+
* // maxRecentSessions: Number("int"),
105+
* // },
103106
* // },
104107
* // agentCollaboration: "SUPERVISOR" || "SUPERVISOR_ROUTER" || "DISABLED",
105108
* // },

clients/client-bedrock-agent/src/commands/GetAgentVersionCommand.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export interface GetAgentVersionCommandOutput extends GetAgentVersionResponse, _
6969
* // promptOverrideConfiguration: { // PromptOverrideConfiguration
7070
* // promptConfigurations: [ // PromptConfigurations // required
7171
* // { // PromptConfiguration
72-
* // promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION",
72+
* // promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "MEMORY_SUMMARIZATION",
7373
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
7474
* // promptState: "ENABLED" || "DISABLED",
7575
* // basePromptTemplate: "STRING_VALUE",
@@ -97,6 +97,9 @@ export interface GetAgentVersionCommandOutput extends GetAgentVersionResponse, _
9797
* // "SESSION_SUMMARY",
9898
* // ],
9999
* // storageDays: Number("int"),
100+
* // sessionSummaryConfiguration: { // SessionSummaryConfiguration
101+
* // maxRecentSessions: Number("int"),
102+
* // },
100103
* // },
101104
* // agentCollaboration: "SUPERVISOR" || "SUPERVISOR_ROUTER" || "DISABLED",
102105
* // },

clients/client-bedrock-agent/src/commands/GetDataSourceCommand.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ export interface GetDataSourceCommandOutput extends GetDataSourceResponse, __Met
7474
* // crawlerConfiguration: { // WebCrawlerConfiguration
7575
* // crawlerLimits: { // WebCrawlerLimits
7676
* // rateLimit: Number("int"),
77+
* // maxPages: Number("int"),
7778
* // },
7879
* // inclusionFilters: [ // FilterList
7980
* // "STRING_VALUE",
@@ -82,6 +83,7 @@ export interface GetDataSourceCommandOutput extends GetDataSourceResponse, __Met
8283
* // "STRING_VALUE",
8384
* // ],
8485
* // scope: "HOST_ONLY" || "SUBDOMAINS",
86+
* // userAgent: "STRING_VALUE",
8587
* // },
8688
* // },
8789
* // confluenceConfiguration: { // ConfluenceDataSourceConfiguration
@@ -141,7 +143,7 @@ export interface GetDataSourceCommandOutput extends GetDataSourceResponse, __Met
141143
* // "STRING_VALUE",
142144
* // ],
143145
* // hostType: "ONLINE", // required
144-
* // authType: "OAUTH2_CLIENT_CREDENTIALS", // required
146+
* // authType: "OAUTH2_CLIENT_CREDENTIALS" || "OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS", // required
145147
* // credentialsSecretArn: "STRING_VALUE", // required
146148
* // },
147149
* // crawlerConfiguration: { // SharePointCrawlerConfiguration

clients/client-bedrock-agent/src/commands/UpdateAgentCommand.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export interface UpdateAgentCommandOutput extends UpdateAgentResponse, __Metadat
5858
* promptOverrideConfiguration: { // PromptOverrideConfiguration
5959
* promptConfigurations: [ // PromptConfigurations // required
6060
* { // PromptConfiguration
61-
* promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION",
61+
* promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "MEMORY_SUMMARIZATION",
6262
* promptCreationMode: "DEFAULT" || "OVERRIDDEN",
6363
* promptState: "ENABLED" || "DISABLED",
6464
* basePromptTemplate: "STRING_VALUE",
@@ -86,6 +86,9 @@ export interface UpdateAgentCommandOutput extends UpdateAgentResponse, __Metadat
8686
* "SESSION_SUMMARY",
8787
* ],
8888
* storageDays: Number("int"),
89+
* sessionSummaryConfiguration: { // SessionSummaryConfiguration
90+
* maxRecentSessions: Number("int"),
91+
* },
8992
* },
9093
* agentCollaboration: "SUPERVISOR" || "SUPERVISOR_ROUTER" || "DISABLED",
9194
* };
@@ -123,7 +126,7 @@ export interface UpdateAgentCommandOutput extends UpdateAgentResponse, __Metadat
123126
* // promptOverrideConfiguration: { // PromptOverrideConfiguration
124127
* // promptConfigurations: [ // PromptConfigurations // required
125128
* // { // PromptConfiguration
126-
* // promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION",
129+
* // promptType: "PRE_PROCESSING" || "ORCHESTRATION" || "POST_PROCESSING" || "KNOWLEDGE_BASE_RESPONSE_GENERATION" || "MEMORY_SUMMARIZATION",
127130
* // promptCreationMode: "DEFAULT" || "OVERRIDDEN",
128131
* // promptState: "ENABLED" || "DISABLED",
129132
* // basePromptTemplate: "STRING_VALUE",
@@ -151,6 +154,9 @@ export interface UpdateAgentCommandOutput extends UpdateAgentResponse, __Metadat
151154
* // "SESSION_SUMMARY",
152155
* // ],
153156
* // storageDays: Number("int"),
157+
* // sessionSummaryConfiguration: { // SessionSummaryConfiguration
158+
* // maxRecentSessions: Number("int"),
159+
* // },
154160
* // },
155161
* // agentCollaboration: "SUPERVISOR" || "SUPERVISOR_ROUTER" || "DISABLED",
156162
* // },

clients/client-bedrock-agent/src/commands/UpdateDataSourceCommand.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
7070
* crawlerConfiguration: { // WebCrawlerConfiguration
7171
* crawlerLimits: { // WebCrawlerLimits
7272
* rateLimit: Number("int"),
73+
* maxPages: Number("int"),
7374
* },
7475
* inclusionFilters: [ // FilterList
7576
* "STRING_VALUE",
@@ -78,6 +79,7 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
7879
* "STRING_VALUE",
7980
* ],
8081
* scope: "HOST_ONLY" || "SUBDOMAINS",
82+
* userAgent: "STRING_VALUE",
8183
* },
8284
* },
8385
* confluenceConfiguration: { // ConfluenceDataSourceConfiguration
@@ -137,7 +139,7 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
137139
* "STRING_VALUE",
138140
* ],
139141
* hostType: "ONLINE", // required
140-
* authType: "OAUTH2_CLIENT_CREDENTIALS", // required
142+
* authType: "OAUTH2_CLIENT_CREDENTIALS" || "OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS", // required
141143
* credentialsSecretArn: "STRING_VALUE", // required
142144
* },
143145
* crawlerConfiguration: { // SharePointCrawlerConfiguration
@@ -244,6 +246,7 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
244246
* // crawlerConfiguration: { // WebCrawlerConfiguration
245247
* // crawlerLimits: { // WebCrawlerLimits
246248
* // rateLimit: Number("int"),
249+
* // maxPages: Number("int"),
247250
* // },
248251
* // inclusionFilters: [ // FilterList
249252
* // "STRING_VALUE",
@@ -252,6 +255,7 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
252255
* // "STRING_VALUE",
253256
* // ],
254257
* // scope: "HOST_ONLY" || "SUBDOMAINS",
258+
* // userAgent: "STRING_VALUE",
255259
* // },
256260
* // },
257261
* // confluenceConfiguration: { // ConfluenceDataSourceConfiguration
@@ -311,7 +315,7 @@ export interface UpdateDataSourceCommandOutput extends UpdateDataSourceResponse,
311315
* // "STRING_VALUE",
312316
* // ],
313317
* // hostType: "ONLINE", // required
314-
* // authType: "OAUTH2_CLIENT_CREDENTIALS", // required
318+
* // authType: "OAUTH2_CLIENT_CREDENTIALS" || "OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS", // required
315319
* // credentialsSecretArn: "STRING_VALUE", // required
316320
* // },
317321
* // crawlerConfiguration: { // SharePointCrawlerConfiguration

clients/client-bedrock-agent/src/models/models_0.ts

Lines changed: 39 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,18 @@ export const MemoryType = {
10611061
*/
10621062
export type MemoryType = (typeof MemoryType)[keyof typeof MemoryType];
10631063

1064+
/**
1065+
* <p>Configuration for SESSION_SUMMARY memory type enabled for the agent.</p>
1066+
* @public
1067+
*/
1068+
export interface SessionSummaryConfiguration {
1069+
/**
1070+
* <p>Maximum number of recent session summaries to include in the agent's prompt context.</p>
1071+
* @public
1072+
*/
1073+
maxRecentSessions?: number | undefined;
1074+
}
1075+
10641076
/**
10651077
* <p>Details of the memory configuration.</p>
10661078
* @public
@@ -1077,6 +1089,12 @@ export interface MemoryConfiguration {
10771089
* @public
10781090
*/
10791091
storageDays?: number | undefined;
1092+
1093+
/**
1094+
* <p>Contains the configuration for SESSION_SUMMARY memory type enabled for the agent. </p>
1095+
* @public
1096+
*/
1097+
sessionSummaryConfiguration?: SessionSummaryConfiguration | undefined;
10801098
}
10811099

10821100
/**
@@ -1163,6 +1181,7 @@ export type PromptState = (typeof PromptState)[keyof typeof PromptState];
11631181
*/
11641182
export const PromptType = {
11651183
KNOWLEDGE_BASE_RESPONSE_GENERATION: "KNOWLEDGE_BASE_RESPONSE_GENERATION",
1184+
MEMORY_SUMMARIZATION: "MEMORY_SUMMARIZATION",
11661185
ORCHESTRATION: "ORCHESTRATION",
11671186
POST_PROCESSING: "POST_PROCESSING",
11681187
PRE_PROCESSING: "PRE_PROCESSING",
@@ -3235,6 +3254,7 @@ export interface SharePointCrawlerConfiguration {
32353254
*/
32363255
export const SharePointAuthType = {
32373256
OAUTH2_CLIENT_CREDENTIALS: "OAUTH2_CLIENT_CREDENTIALS",
3257+
OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS: "OAUTH2_SHAREPOINT_APP_ONLY_CLIENT_CREDENTIALS",
32383258
} as const;
32393259

32403260
/**
@@ -3351,6 +3371,15 @@ export interface WebCrawlerLimits {
33513371
* @public
33523372
*/
33533373
rateLimit?: number | undefined;
3374+
3375+
/**
3376+
* <p>
3377+
* The max number of web pages crawled from your source URLs, up to 25,000 pages. If
3378+
* the web pages exceed this limit, the data source sync will fail and no web pages will be ingested.
3379+
* </p>
3380+
* @public
3381+
*/
3382+
maxPages?: number | undefined;
33543383
}
33553384

33563385
/**
@@ -3408,6 +3437,15 @@ export interface WebCrawlerConfiguration {
34083437
* @public
34093438
*/
34103439
scope?: WebScopeType | undefined;
3440+
3441+
/**
3442+
* <p>A string used for identifying the crawler or a bot when it accesses a web server. By default,
3443+
* this is set to <code>bedrockbot_UUID</code> for your crawler. You can optionally append a custom
3444+
* string to <code>bedrockbot_UUID</code> to allowlist a specific user agent permitted to access your source URLs.
3445+
* </p>
3446+
* @public
3447+
*/
3448+
userAgent?: string | undefined;
34113449
}
34123450

34133451
/**
@@ -9194,18 +9232,6 @@ export interface ByteContentDoc {
91949232
data: Uint8Array | undefined;
91959233
}
91969234

9197-
/**
9198-
* <p>Contains information about content defined inline in text.</p>
9199-
* @public
9200-
*/
9201-
export interface TextContentDoc {
9202-
/**
9203-
* <p>The text of the content.</p>
9204-
* @public
9205-
*/
9206-
data: string | undefined;
9207-
}
9208-
92099235
/**
92109236
* @internal
92119237
*/
@@ -9521,6 +9547,7 @@ export const WebCrawlerConfigurationFilterSensitiveLog = (obj: WebCrawlerConfigu
95219547
...obj,
95229548
...(obj.inclusionFilters && { inclusionFilters: SENSITIVE_STRING }),
95239549
...(obj.exclusionFilters && { exclusionFilters: SENSITIVE_STRING }),
9550+
...(obj.userAgent && { userAgent: SENSITIVE_STRING }),
95249551
});
95259552

95269553
/**
@@ -9897,11 +9924,3 @@ export const ByteContentDocFilterSensitiveLog = (obj: ByteContentDoc): any => ({
98979924
...obj,
98989925
...(obj.data && { data: SENSITIVE_STRING }),
98999926
});
9900-
9901-
/**
9902-
* @internal
9903-
*/
9904-
export const TextContentDocFilterSensitiveLog = (obj: TextContentDoc): any => ({
9905-
...obj,
9906-
...(obj.data && { data: SENSITIVE_STRING }),
9907-
});

clients/client-bedrock-agent/src/models/models_1.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,20 @@ import {
2424
PromptTemplateConfigurationFilterSensitiveLog,
2525
PromptTemplateType,
2626
S3Location,
27-
TextContentDoc,
28-
TextContentDocFilterSensitiveLog,
2927
} from "./models_0";
3028

29+
/**
30+
* <p>Contains information about content defined inline in text.</p>
31+
* @public
32+
*/
33+
export interface TextContentDoc {
34+
/**
35+
* <p>The text of the content.</p>
36+
* @public
37+
*/
38+
data: string | undefined;
39+
}
40+
3141
/**
3242
* @public
3343
* @enum
@@ -2671,6 +2681,14 @@ export interface ListAgentVersionsResponse {
26712681
nextToken?: string | undefined;
26722682
}
26732683

2684+
/**
2685+
* @internal
2686+
*/
2687+
export const TextContentDocFilterSensitiveLog = (obj: TextContentDoc): any => ({
2688+
...obj,
2689+
...(obj.data && { data: SENSITIVE_STRING }),
2690+
});
2691+
26742692
/**
26752693
* @internal
26762694
*/

0 commit comments

Comments
 (0)