appmod-catalog-blueprints 1.6.1__py3-none-any.whl → 1.7.1__py3-none-any.whl

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.
@@ -417,6 +417,80 @@ class AccessLogProps:
417
417
  )
418
418
 
419
419
 
420
+ @jsii.data_type(
421
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.AclConfiguration",
422
+ jsii_struct_bases=[],
423
+ name_mapping={"enabled": "enabled", "metadata_field": "metadataField"},
424
+ )
425
+ class AclConfiguration:
426
+ def __init__(
427
+ self,
428
+ *,
429
+ enabled: builtins.bool,
430
+ metadata_field: typing.Optional[builtins.str] = None,
431
+ ) -> None:
432
+ '''(experimental) Configuration for Access Control List (ACL) based filtering.
433
+
434
+ When enabled, retrieval queries will be filtered based on user identity
435
+ context, ensuring users only retrieve documents they have permission to access.
436
+
437
+ :param enabled: (experimental) Enable ACL-based filtering for retrieval queries. When true, the retrieval tool will require user context and apply metadata filters based on user permissions. Default: false
438
+ :param metadata_field: (experimental) Metadata field containing access permissions. This field in the document metadata should contain the group or permission identifier that controls access. The retrieval tool will filter results where this field matches the user's permissions. Default: 'group'
439
+
440
+ :stability: experimental
441
+ '''
442
+ if __debug__:
443
+ type_hints = typing.get_type_hints(_typecheckingstub__899807b7dca2d7be5f310df5984cd7a0c5fe3c612a8995f0927c15acbec703da)
444
+ check_type(argname="argument enabled", value=enabled, expected_type=type_hints["enabled"])
445
+ check_type(argname="argument metadata_field", value=metadata_field, expected_type=type_hints["metadata_field"])
446
+ self._values: typing.Dict[builtins.str, typing.Any] = {
447
+ "enabled": enabled,
448
+ }
449
+ if metadata_field is not None:
450
+ self._values["metadata_field"] = metadata_field
451
+
452
+ @builtins.property
453
+ def enabled(self) -> builtins.bool:
454
+ '''(experimental) Enable ACL-based filtering for retrieval queries.
455
+
456
+ When true, the retrieval tool will require user context and apply
457
+ metadata filters based on user permissions.
458
+
459
+ :default: false
460
+
461
+ :stability: experimental
462
+ '''
463
+ result = self._values.get("enabled")
464
+ assert result is not None, "Required property 'enabled' is missing"
465
+ return typing.cast(builtins.bool, result)
466
+
467
+ @builtins.property
468
+ def metadata_field(self) -> typing.Optional[builtins.str]:
469
+ '''(experimental) Metadata field containing access permissions.
470
+
471
+ This field in the document metadata should contain the group or
472
+ permission identifier that controls access. The retrieval tool
473
+ will filter results where this field matches the user's permissions.
474
+
475
+ :default: 'group'
476
+
477
+ :stability: experimental
478
+ '''
479
+ result = self._values.get("metadata_field")
480
+ return typing.cast(typing.Optional[builtins.str], result)
481
+
482
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
483
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
484
+
485
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
486
+ return not (rhs == self)
487
+
488
+ def __repr__(self) -> str:
489
+ return "AclConfiguration(%s)" % ", ".join(
490
+ k + "=" + repr(v) for k, v in self._values.items()
491
+ )
492
+
493
+
420
494
  @jsii.data_type(
421
495
  jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.AdditionalDistributionProps",
422
496
  jsii_struct_bases=[],
@@ -517,7 +591,9 @@ class AdditionalDistributionProps:
517
591
  name_mapping={
518
592
  "bedrock_model": "bedrockModel",
519
593
  "system_prompt": "systemPrompt",
594
+ "additional_policy_statements_for_knowledge_bases": "additionalPolicyStatementsForKnowledgeBases",
520
595
  "additional_policy_statements_for_tools": "additionalPolicyStatementsForTools",
596
+ "knowledge_bases": "knowledgeBases",
521
597
  "lambda_layers": "lambdaLayers",
522
598
  "tools": "tools",
523
599
  },
@@ -528,7 +604,9 @@ class AgentDefinitionProps:
528
604
  *,
529
605
  bedrock_model: typing.Union["BedrockModelProps", typing.Dict[builtins.str, typing.Any]],
530
606
  system_prompt: "_aws_cdk_aws_s3_assets_ceddda9d.Asset",
607
+ additional_policy_statements_for_knowledge_bases: typing.Optional[typing.Sequence["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"]] = None,
531
608
  additional_policy_statements_for_tools: typing.Optional[typing.Sequence["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"]] = None,
609
+ knowledge_bases: typing.Optional[typing.Sequence["IKnowledgeBase"]] = None,
532
610
  lambda_layers: typing.Optional[typing.Sequence["_aws_cdk_aws_lambda_ceddda9d.LayerVersion"]] = None,
533
611
  tools: typing.Optional[typing.Sequence["_aws_cdk_aws_s3_assets_ceddda9d.Asset"]] = None,
534
612
  ) -> None:
@@ -536,7 +614,9 @@ class AgentDefinitionProps:
536
614
 
537
615
  :param bedrock_model: (experimental) Configuration for the Bedrock Model to be used.
538
616
  :param system_prompt: (experimental) The system prompt of the agent.
617
+ :param additional_policy_statements_for_knowledge_bases: (experimental) Additional IAM policy statements for knowledge base access. Use this when knowledge bases require permissions beyond what is automatically generated by the IKnowledgeBase implementations. These statements will be added to the agent's IAM role in addition to the auto-generated permissions. Default: - Only auto-generated permissions from knowledge bases
539
618
  :param additional_policy_statements_for_tools: (experimental) If tools need additional IAM permissions, these statements would be attached to the Agent's IAM role.
619
+ :param knowledge_bases: (experimental) Knowledge bases available to the agent for Retrieval-Augmented Generation (RAG). When configured, the agent will have access to a built-in retrieval tool that can query these knowledge bases. The agent's system prompt will be automatically augmented with information about available knowledge bases. Each knowledge base must implement the IKnowledgeBase interface, which handles IAM permission generation and runtime configuration. Default: - No knowledge bases configured
540
620
  :param lambda_layers: (experimental) Any dependencies needed by the provided tools.
541
621
  :param tools: (experimental) List of tools defined in python files. This tools would automatically be loaded by the agent. You can also use this to incorporate other specialized agents as tools.
542
622
 
@@ -548,15 +628,21 @@ class AgentDefinitionProps:
548
628
  type_hints = typing.get_type_hints(_typecheckingstub__4a2d1deab0cc9bf96473ffb32138a2c564c47ae7382fe5d2d1f0e43da3324272)
549
629
  check_type(argname="argument bedrock_model", value=bedrock_model, expected_type=type_hints["bedrock_model"])
550
630
  check_type(argname="argument system_prompt", value=system_prompt, expected_type=type_hints["system_prompt"])
631
+ check_type(argname="argument additional_policy_statements_for_knowledge_bases", value=additional_policy_statements_for_knowledge_bases, expected_type=type_hints["additional_policy_statements_for_knowledge_bases"])
551
632
  check_type(argname="argument additional_policy_statements_for_tools", value=additional_policy_statements_for_tools, expected_type=type_hints["additional_policy_statements_for_tools"])
633
+ check_type(argname="argument knowledge_bases", value=knowledge_bases, expected_type=type_hints["knowledge_bases"])
552
634
  check_type(argname="argument lambda_layers", value=lambda_layers, expected_type=type_hints["lambda_layers"])
553
635
  check_type(argname="argument tools", value=tools, expected_type=type_hints["tools"])
554
636
  self._values: typing.Dict[builtins.str, typing.Any] = {
555
637
  "bedrock_model": bedrock_model,
556
638
  "system_prompt": system_prompt,
557
639
  }
640
+ if additional_policy_statements_for_knowledge_bases is not None:
641
+ self._values["additional_policy_statements_for_knowledge_bases"] = additional_policy_statements_for_knowledge_bases
558
642
  if additional_policy_statements_for_tools is not None:
559
643
  self._values["additional_policy_statements_for_tools"] = additional_policy_statements_for_tools
644
+ if knowledge_bases is not None:
645
+ self._values["knowledge_bases"] = knowledge_bases
560
646
  if lambda_layers is not None:
561
647
  self._values["lambda_layers"] = lambda_layers
562
648
  if tools is not None:
@@ -582,6 +668,24 @@ class AgentDefinitionProps:
582
668
  assert result is not None, "Required property 'system_prompt' is missing"
583
669
  return typing.cast("_aws_cdk_aws_s3_assets_ceddda9d.Asset", result)
584
670
 
671
+ @builtins.property
672
+ def additional_policy_statements_for_knowledge_bases(
673
+ self,
674
+ ) -> typing.Optional[typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"]]:
675
+ '''(experimental) Additional IAM policy statements for knowledge base access.
676
+
677
+ Use this when knowledge bases require permissions beyond what is
678
+ automatically generated by the IKnowledgeBase implementations.
679
+ These statements will be added to the agent's IAM role in addition
680
+ to the auto-generated permissions.
681
+
682
+ :default: - Only auto-generated permissions from knowledge bases
683
+
684
+ :stability: experimental
685
+ '''
686
+ result = self._values.get("additional_policy_statements_for_knowledge_bases")
687
+ return typing.cast(typing.Optional[typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"]], result)
688
+
585
689
  @builtins.property
586
690
  def additional_policy_statements_for_tools(
587
691
  self,
@@ -593,6 +697,24 @@ class AgentDefinitionProps:
593
697
  result = self._values.get("additional_policy_statements_for_tools")
594
698
  return typing.cast(typing.Optional[typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"]], result)
595
699
 
700
+ @builtins.property
701
+ def knowledge_bases(self) -> typing.Optional[typing.List["IKnowledgeBase"]]:
702
+ '''(experimental) Knowledge bases available to the agent for Retrieval-Augmented Generation (RAG).
703
+
704
+ When configured, the agent will have access to a built-in retrieval tool
705
+ that can query these knowledge bases. The agent's system prompt will be
706
+ automatically augmented with information about available knowledge bases.
707
+
708
+ Each knowledge base must implement the IKnowledgeBase interface, which
709
+ handles IAM permission generation and runtime configuration.
710
+
711
+ :default: - No knowledge bases configured
712
+
713
+ :stability: experimental
714
+ '''
715
+ result = self._values.get("knowledge_bases")
716
+ return typing.cast(typing.Optional[typing.List["IKnowledgeBase"]], result)
717
+
596
718
  @builtins.property
597
719
  def lambda_layers(
598
720
  self,
@@ -1029,6 +1151,34 @@ class BaseAgent(
1029
1151
  '''
1030
1152
  return typing.cast("_aws_cdk_aws_kms_ceddda9d.Key", jsii.get(self, "encryptionKey"))
1031
1153
 
1154
+ @builtins.property
1155
+ @jsii.member(jsii_name="knowledgeBaseConfigs")
1156
+ def _knowledge_base_configs(self) -> typing.List["KnowledgeBaseRuntimeConfig"]:
1157
+ '''(experimental) Knowledge base configurations for runtime use.
1158
+
1159
+ This array contains the exported configurations from all configured
1160
+ knowledge bases. Subclasses use this to set the KNOWLEDGE_BASES_CONFIG
1161
+ environment variable on the agent Lambda function.
1162
+
1163
+ :stability: experimental
1164
+ '''
1165
+ return typing.cast(typing.List["KnowledgeBaseRuntimeConfig"], jsii.get(self, "knowledgeBaseConfigs"))
1166
+
1167
+ @builtins.property
1168
+ @jsii.member(jsii_name="knowledgeBaseLayers")
1169
+ def _knowledge_base_layers(
1170
+ self,
1171
+ ) -> typing.List["_aws_cdk_aws_lambda_ceddda9d.LayerVersion"]:
1172
+ '''(experimental) Lambda layers required by knowledge base retrieval tools.
1173
+
1174
+ This array contains Lambda layers from all configured knowledge bases.
1175
+ Subclasses should add these layers to the agent Lambda function to
1176
+ ensure retrieval tools have access to required dependencies.
1177
+
1178
+ :stability: experimental
1179
+ '''
1180
+ return typing.cast(typing.List["_aws_cdk_aws_lambda_ceddda9d.LayerVersion"], jsii.get(self, "knowledgeBaseLayers"))
1181
+
1032
1182
  @builtins.property
1033
1183
  @jsii.member(jsii_name="logGroupDataProtection")
1034
1184
  def _log_group_data_protection(self) -> "LogGroupDataProtectionProps":
@@ -1046,6 +1196,20 @@ class BaseAgent(
1046
1196
  '''
1047
1197
  return typing.cast(typing.Optional["BedrockModelProps"], jsii.get(self, "bedrockModel"))
1048
1198
 
1199
+ @builtins.property
1200
+ @jsii.member(jsii_name="knowledgeBaseToolAsset")
1201
+ def _knowledge_base_tool_asset(
1202
+ self,
1203
+ ) -> typing.Optional["_aws_cdk_aws_s3_assets_ceddda9d.Asset"]:
1204
+ '''(experimental) Asset containing the knowledge base retrieval tool.
1205
+
1206
+ This is automatically created when knowledge bases are configured.
1207
+ The asset is added to the agent's tools and granted read access.
1208
+
1209
+ :stability: experimental
1210
+ '''
1211
+ return typing.cast(typing.Optional["_aws_cdk_aws_s3_assets_ceddda9d.Asset"], jsii.get(self, "knowledgeBaseToolAsset"))
1212
+
1049
1213
 
1050
1214
  class _BaseAgentProxy(BaseAgent):
1051
1215
  @builtins.property
@@ -1062,6 +1226,132 @@ class _BaseAgentProxy(BaseAgent):
1062
1226
  typing.cast(typing.Any, BaseAgent).__jsii_proxy_class__ = lambda : _BaseAgentProxy
1063
1227
 
1064
1228
 
1229
+ @jsii.data_type(
1230
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.BaseKnowledgeBaseProps",
1231
+ jsii_struct_bases=[],
1232
+ name_mapping={
1233
+ "description": "description",
1234
+ "name": "name",
1235
+ "acl": "acl",
1236
+ "retrieval": "retrieval",
1237
+ },
1238
+ )
1239
+ class BaseKnowledgeBaseProps:
1240
+ def __init__(
1241
+ self,
1242
+ *,
1243
+ description: builtins.str,
1244
+ name: builtins.str,
1245
+ acl: typing.Optional[typing.Union["AclConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1246
+ retrieval: typing.Optional[typing.Union["RetrievalConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1247
+ ) -> None:
1248
+ '''(experimental) Base configuration for all knowledge base implementations.
1249
+
1250
+ This interface defines the common properties shared by all knowledge
1251
+ base types. Specific implementations (like BedrockKnowledgeBase) extend
1252
+ this with additional properties.
1253
+
1254
+ :param description: (experimental) Description of what this knowledge base contains and when to use it. This description is shown to the agent in its system prompt to help it decide when to query this knowledge base. Be specific about the type of information contained and appropriate use cases.
1255
+ :param name: (experimental) Human-readable name/identifier for this knowledge base. Used for logging, display purposes, and to help the agent identify which knowledge base to query. Should be unique within the set of knowledge bases configured for an agent.
1256
+ :param acl: (experimental) Access control configuration for identity-aware retrieval. When enabled, retrieval queries will be filtered based on user identity context to ensure users only access permitted documents. Default: - ACL disabled
1257
+ :param retrieval: (experimental) Retrieval configuration options. Controls the number of results returned and optional metadata filtering. Default: { numberOfResults: 5 }
1258
+
1259
+ :stability: experimental
1260
+ '''
1261
+ if isinstance(acl, dict):
1262
+ acl = AclConfiguration(**acl)
1263
+ if isinstance(retrieval, dict):
1264
+ retrieval = RetrievalConfiguration(**retrieval)
1265
+ if __debug__:
1266
+ type_hints = typing.get_type_hints(_typecheckingstub__40fa4a59f1a0502756f07aba8d6cba5255e1743cbc160af92ff68cb3b17fef23)
1267
+ check_type(argname="argument description", value=description, expected_type=type_hints["description"])
1268
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
1269
+ check_type(argname="argument acl", value=acl, expected_type=type_hints["acl"])
1270
+ check_type(argname="argument retrieval", value=retrieval, expected_type=type_hints["retrieval"])
1271
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1272
+ "description": description,
1273
+ "name": name,
1274
+ }
1275
+ if acl is not None:
1276
+ self._values["acl"] = acl
1277
+ if retrieval is not None:
1278
+ self._values["retrieval"] = retrieval
1279
+
1280
+ @builtins.property
1281
+ def description(self) -> builtins.str:
1282
+ '''(experimental) Description of what this knowledge base contains and when to use it.
1283
+
1284
+ This description is shown to the agent in its system prompt to help
1285
+ it decide when to query this knowledge base. Be specific about the
1286
+ type of information contained and appropriate use cases.
1287
+
1288
+ :stability: experimental
1289
+
1290
+ Example::
1291
+
1292
+ 'Contains product documentation, user guides, and FAQs. Use when answering questions about product features or troubleshooting.'
1293
+ '''
1294
+ result = self._values.get("description")
1295
+ assert result is not None, "Required property 'description' is missing"
1296
+ return typing.cast(builtins.str, result)
1297
+
1298
+ @builtins.property
1299
+ def name(self) -> builtins.str:
1300
+ '''(experimental) Human-readable name/identifier for this knowledge base.
1301
+
1302
+ Used for logging, display purposes, and to help the agent identify
1303
+ which knowledge base to query. Should be unique within the set of
1304
+ knowledge bases configured for an agent.
1305
+
1306
+ :stability: experimental
1307
+
1308
+ Example::
1309
+
1310
+ 'product-documentation'
1311
+ '''
1312
+ result = self._values.get("name")
1313
+ assert result is not None, "Required property 'name' is missing"
1314
+ return typing.cast(builtins.str, result)
1315
+
1316
+ @builtins.property
1317
+ def acl(self) -> typing.Optional["AclConfiguration"]:
1318
+ '''(experimental) Access control configuration for identity-aware retrieval.
1319
+
1320
+ When enabled, retrieval queries will be filtered based on user
1321
+ identity context to ensure users only access permitted documents.
1322
+
1323
+ :default: - ACL disabled
1324
+
1325
+ :stability: experimental
1326
+ '''
1327
+ result = self._values.get("acl")
1328
+ return typing.cast(typing.Optional["AclConfiguration"], result)
1329
+
1330
+ @builtins.property
1331
+ def retrieval(self) -> typing.Optional["RetrievalConfiguration"]:
1332
+ '''(experimental) Retrieval configuration options.
1333
+
1334
+ Controls the number of results returned and optional metadata filtering.
1335
+
1336
+ :default: { numberOfResults: 5 }
1337
+
1338
+ :stability: experimental
1339
+ '''
1340
+ result = self._values.get("retrieval")
1341
+ return typing.cast(typing.Optional["RetrievalConfiguration"], result)
1342
+
1343
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1344
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1345
+
1346
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1347
+ return not (rhs == self)
1348
+
1349
+ def __repr__(self) -> str:
1350
+ return "BaseKnowledgeBaseProps(%s)" % ", ".join(
1351
+ k + "=" + repr(v) for k, v in self._values.items()
1352
+ )
1353
+
1354
+
1065
1355
  class BatchAgent(
1066
1356
  BaseAgent,
1067
1357
  metaclass=jsii.JSIIMeta,
@@ -1078,6 +1368,7 @@ class BatchAgent(
1078
1368
  *,
1079
1369
  prompt: builtins.str,
1080
1370
  expect_json: typing.Optional[builtins.bool] = None,
1371
+ invoke_type: typing.Optional["InvokeType"] = None,
1081
1372
  agent_definition: typing.Union["AgentDefinitionProps", typing.Dict[builtins.str, typing.Any]],
1082
1373
  agent_name: builtins.str,
1083
1374
  enable_observability: typing.Optional[builtins.bool] = None,
@@ -1093,6 +1384,7 @@ class BatchAgent(
1093
1384
  :param id: -
1094
1385
  :param prompt:
1095
1386
  :param expect_json:
1387
+ :param invoke_type: (experimental) Agent invocation type. Defines how the agent is invoked and what processing mode to use. Default: InvokeType.BATCH
1096
1388
  :param agent_definition: (experimental) Agent related parameters.
1097
1389
  :param agent_name: (experimental) Name of the agent.
1098
1390
  :param enable_observability: (experimental) Enable observability. Default: false
@@ -1112,6 +1404,7 @@ class BatchAgent(
1112
1404
  props = BatchAgentProps(
1113
1405
  prompt=prompt,
1114
1406
  expect_json=expect_json,
1407
+ invoke_type=invoke_type,
1115
1408
  agent_definition=agent_definition,
1116
1409
  agent_name=agent_name,
1117
1410
  enable_observability=enable_observability,
@@ -1159,6 +1452,243 @@ class BedrockCrossRegionInferencePrefix(enum.Enum):
1159
1452
  '''
1160
1453
 
1161
1454
 
1455
+ @jsii.data_type(
1456
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.BedrockKnowledgeBaseProps",
1457
+ jsii_struct_bases=[BaseKnowledgeBaseProps],
1458
+ name_mapping={
1459
+ "description": "description",
1460
+ "name": "name",
1461
+ "acl": "acl",
1462
+ "retrieval": "retrieval",
1463
+ "knowledge_base_id": "knowledgeBaseId",
1464
+ "create": "create",
1465
+ "guardrail": "guardrail",
1466
+ "knowledge_base_arn": "knowledgeBaseArn",
1467
+ "vector_store": "vectorStore",
1468
+ },
1469
+ )
1470
+ class BedrockKnowledgeBaseProps(BaseKnowledgeBaseProps):
1471
+ def __init__(
1472
+ self,
1473
+ *,
1474
+ description: builtins.str,
1475
+ name: builtins.str,
1476
+ acl: typing.Optional[typing.Union["AclConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1477
+ retrieval: typing.Optional[typing.Union["RetrievalConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1478
+ knowledge_base_id: builtins.str,
1479
+ create: typing.Optional[typing.Union["CreateKnowledgeBaseConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1480
+ guardrail: typing.Optional[typing.Union["GuardrailConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1481
+ knowledge_base_arn: typing.Optional[builtins.str] = None,
1482
+ vector_store: typing.Optional[typing.Union["VectorStoreConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
1483
+ ) -> None:
1484
+ '''(experimental) Configuration for Amazon Bedrock Knowledge Base.
1485
+
1486
+ This interface extends the base configuration with Bedrock-specific
1487
+ properties for connecting to an existing Bedrock Knowledge Base.
1488
+
1489
+ :param description: (experimental) Description of what this knowledge base contains and when to use it. This description is shown to the agent in its system prompt to help it decide when to query this knowledge base. Be specific about the type of information contained and appropriate use cases.
1490
+ :param name: (experimental) Human-readable name/identifier for this knowledge base. Used for logging, display purposes, and to help the agent identify which knowledge base to query. Should be unique within the set of knowledge bases configured for an agent.
1491
+ :param acl: (experimental) Access control configuration for identity-aware retrieval. When enabled, retrieval queries will be filtered based on user identity context to ensure users only access permitted documents. Default: - ACL disabled
1492
+ :param retrieval: (experimental) Retrieval configuration options. Controls the number of results returned and optional metadata filtering. Default: { numberOfResults: 5 }
1493
+ :param knowledge_base_id: (experimental) Unique identifier for the Bedrock Knowledge Base. This is the ID assigned by Bedrock when the knowledge base was created. You can find this in the Bedrock console or via the AWS CLI. Required when referencing an existing knowledge base. Not required when using the ``create`` property to create a new KB.
1494
+ :param create: (experimental) Configuration for creating a new knowledge base. When provided, a new Bedrock Knowledge Base will be created with the specified data source and embedding configuration. Note: This is an advanced feature that creates AWS resources. For most use cases, referencing an existing knowledge base by ID is recommended. Default: - Reference existing KB only (no creation)
1495
+ :param guardrail: (experimental) Guardrail configuration for content filtering. When configured, the guardrail will be applied during retrieval operations to filter inappropriate or sensitive content. Default: - No guardrail applied
1496
+ :param knowledge_base_arn: (experimental) ARN of the Bedrock Knowledge Base. If not provided, the ARN will be constructed from the knowledgeBaseId using the current region and account. Default: - Constructed from knowledgeBaseId
1497
+ :param vector_store: (experimental) Vector store configuration. Defines the type of vector store used by this knowledge base. This is informational and used for generating appropriate IAM permissions when needed. Default: - S3 Vectors (type: 's3-vectors')
1498
+
1499
+ :stability: experimental
1500
+ '''
1501
+ if isinstance(acl, dict):
1502
+ acl = AclConfiguration(**acl)
1503
+ if isinstance(retrieval, dict):
1504
+ retrieval = RetrievalConfiguration(**retrieval)
1505
+ if isinstance(create, dict):
1506
+ create = CreateKnowledgeBaseConfiguration(**create)
1507
+ if isinstance(guardrail, dict):
1508
+ guardrail = GuardrailConfiguration(**guardrail)
1509
+ if isinstance(vector_store, dict):
1510
+ vector_store = VectorStoreConfiguration(**vector_store)
1511
+ if __debug__:
1512
+ type_hints = typing.get_type_hints(_typecheckingstub__fa5a5937a282e8ddfa91598805b072febd3483c7f6ad9ed8eed9f52e4f0912e9)
1513
+ check_type(argname="argument description", value=description, expected_type=type_hints["description"])
1514
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
1515
+ check_type(argname="argument acl", value=acl, expected_type=type_hints["acl"])
1516
+ check_type(argname="argument retrieval", value=retrieval, expected_type=type_hints["retrieval"])
1517
+ check_type(argname="argument knowledge_base_id", value=knowledge_base_id, expected_type=type_hints["knowledge_base_id"])
1518
+ check_type(argname="argument create", value=create, expected_type=type_hints["create"])
1519
+ check_type(argname="argument guardrail", value=guardrail, expected_type=type_hints["guardrail"])
1520
+ check_type(argname="argument knowledge_base_arn", value=knowledge_base_arn, expected_type=type_hints["knowledge_base_arn"])
1521
+ check_type(argname="argument vector_store", value=vector_store, expected_type=type_hints["vector_store"])
1522
+ self._values: typing.Dict[builtins.str, typing.Any] = {
1523
+ "description": description,
1524
+ "name": name,
1525
+ "knowledge_base_id": knowledge_base_id,
1526
+ }
1527
+ if acl is not None:
1528
+ self._values["acl"] = acl
1529
+ if retrieval is not None:
1530
+ self._values["retrieval"] = retrieval
1531
+ if create is not None:
1532
+ self._values["create"] = create
1533
+ if guardrail is not None:
1534
+ self._values["guardrail"] = guardrail
1535
+ if knowledge_base_arn is not None:
1536
+ self._values["knowledge_base_arn"] = knowledge_base_arn
1537
+ if vector_store is not None:
1538
+ self._values["vector_store"] = vector_store
1539
+
1540
+ @builtins.property
1541
+ def description(self) -> builtins.str:
1542
+ '''(experimental) Description of what this knowledge base contains and when to use it.
1543
+
1544
+ This description is shown to the agent in its system prompt to help
1545
+ it decide when to query this knowledge base. Be specific about the
1546
+ type of information contained and appropriate use cases.
1547
+
1548
+ :stability: experimental
1549
+
1550
+ Example::
1551
+
1552
+ 'Contains product documentation, user guides, and FAQs. Use when answering questions about product features or troubleshooting.'
1553
+ '''
1554
+ result = self._values.get("description")
1555
+ assert result is not None, "Required property 'description' is missing"
1556
+ return typing.cast(builtins.str, result)
1557
+
1558
+ @builtins.property
1559
+ def name(self) -> builtins.str:
1560
+ '''(experimental) Human-readable name/identifier for this knowledge base.
1561
+
1562
+ Used for logging, display purposes, and to help the agent identify
1563
+ which knowledge base to query. Should be unique within the set of
1564
+ knowledge bases configured for an agent.
1565
+
1566
+ :stability: experimental
1567
+
1568
+ Example::
1569
+
1570
+ 'product-documentation'
1571
+ '''
1572
+ result = self._values.get("name")
1573
+ assert result is not None, "Required property 'name' is missing"
1574
+ return typing.cast(builtins.str, result)
1575
+
1576
+ @builtins.property
1577
+ def acl(self) -> typing.Optional["AclConfiguration"]:
1578
+ '''(experimental) Access control configuration for identity-aware retrieval.
1579
+
1580
+ When enabled, retrieval queries will be filtered based on user
1581
+ identity context to ensure users only access permitted documents.
1582
+
1583
+ :default: - ACL disabled
1584
+
1585
+ :stability: experimental
1586
+ '''
1587
+ result = self._values.get("acl")
1588
+ return typing.cast(typing.Optional["AclConfiguration"], result)
1589
+
1590
+ @builtins.property
1591
+ def retrieval(self) -> typing.Optional["RetrievalConfiguration"]:
1592
+ '''(experimental) Retrieval configuration options.
1593
+
1594
+ Controls the number of results returned and optional metadata filtering.
1595
+
1596
+ :default: { numberOfResults: 5 }
1597
+
1598
+ :stability: experimental
1599
+ '''
1600
+ result = self._values.get("retrieval")
1601
+ return typing.cast(typing.Optional["RetrievalConfiguration"], result)
1602
+
1603
+ @builtins.property
1604
+ def knowledge_base_id(self) -> builtins.str:
1605
+ '''(experimental) Unique identifier for the Bedrock Knowledge Base.
1606
+
1607
+ This is the ID assigned by Bedrock when the knowledge base was created.
1608
+ You can find this in the Bedrock console or via the AWS CLI.
1609
+
1610
+ Required when referencing an existing knowledge base.
1611
+ Not required when using the ``create`` property to create a new KB.
1612
+
1613
+ :stability: experimental
1614
+ '''
1615
+ result = self._values.get("knowledge_base_id")
1616
+ assert result is not None, "Required property 'knowledge_base_id' is missing"
1617
+ return typing.cast(builtins.str, result)
1618
+
1619
+ @builtins.property
1620
+ def create(self) -> typing.Optional["CreateKnowledgeBaseConfiguration"]:
1621
+ '''(experimental) Configuration for creating a new knowledge base.
1622
+
1623
+ When provided, a new Bedrock Knowledge Base will be created with
1624
+ the specified data source and embedding configuration.
1625
+
1626
+ Note: This is an advanced feature that creates AWS resources.
1627
+ For most use cases, referencing an existing knowledge base by ID
1628
+ is recommended.
1629
+
1630
+ :default: - Reference existing KB only (no creation)
1631
+
1632
+ :stability: experimental
1633
+ '''
1634
+ result = self._values.get("create")
1635
+ return typing.cast(typing.Optional["CreateKnowledgeBaseConfiguration"], result)
1636
+
1637
+ @builtins.property
1638
+ def guardrail(self) -> typing.Optional["GuardrailConfiguration"]:
1639
+ '''(experimental) Guardrail configuration for content filtering.
1640
+
1641
+ When configured, the guardrail will be applied during retrieval
1642
+ operations to filter inappropriate or sensitive content.
1643
+
1644
+ :default: - No guardrail applied
1645
+
1646
+ :stability: experimental
1647
+ '''
1648
+ result = self._values.get("guardrail")
1649
+ return typing.cast(typing.Optional["GuardrailConfiguration"], result)
1650
+
1651
+ @builtins.property
1652
+ def knowledge_base_arn(self) -> typing.Optional[builtins.str]:
1653
+ '''(experimental) ARN of the Bedrock Knowledge Base.
1654
+
1655
+ If not provided, the ARN will be constructed from the knowledgeBaseId
1656
+ using the current region and account.
1657
+
1658
+ :default: - Constructed from knowledgeBaseId
1659
+
1660
+ :stability: experimental
1661
+ '''
1662
+ result = self._values.get("knowledge_base_arn")
1663
+ return typing.cast(typing.Optional[builtins.str], result)
1664
+
1665
+ @builtins.property
1666
+ def vector_store(self) -> typing.Optional["VectorStoreConfiguration"]:
1667
+ '''(experimental) Vector store configuration.
1668
+
1669
+ Defines the type of vector store used by this knowledge base.
1670
+ This is informational and used for generating appropriate IAM
1671
+ permissions when needed.
1672
+
1673
+ :default: - S3 Vectors (type: 's3-vectors')
1674
+
1675
+ :stability: experimental
1676
+ '''
1677
+ result = self._values.get("vector_store")
1678
+ return typing.cast(typing.Optional["VectorStoreConfiguration"], result)
1679
+
1680
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
1681
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
1682
+
1683
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
1684
+ return not (rhs == self)
1685
+
1686
+ def __repr__(self) -> str:
1687
+ return "BedrockKnowledgeBaseProps(%s)" % ", ".join(
1688
+ k + "=" + repr(v) for k, v in self._values.items()
1689
+ )
1690
+
1691
+
1162
1692
  @jsii.data_type(
1163
1693
  jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.BedrockModelProps",
1164
1694
  jsii_struct_bases=[],
@@ -2739,25 +3269,178 @@ class CloudfrontDistributionObservabilityPropertyInjector(
2739
3269
 
2740
3270
 
2741
3271
  @jsii.data_type(
2742
- jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.CustomDomainConfig",
3272
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.CreateKnowledgeBaseConfiguration",
2743
3273
  jsii_struct_bases=[],
2744
3274
  name_mapping={
2745
- "certificate": "certificate",
2746
- "domain_name": "domainName",
2747
- "hosted_zone": "hostedZone",
3275
+ "data_source_bucket_name": "dataSourceBucketName",
3276
+ "chunking_strategy": "chunkingStrategy",
3277
+ "data_source_prefix": "dataSourcePrefix",
3278
+ "embedding_model_id": "embeddingModelId",
3279
+ "max_tokens": "maxTokens",
3280
+ "overlap_tokens": "overlapTokens",
2748
3281
  },
2749
3282
  )
2750
- class CustomDomainConfig:
3283
+ class CreateKnowledgeBaseConfiguration:
2751
3284
  def __init__(
2752
3285
  self,
2753
3286
  *,
2754
- certificate: "_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate",
2755
- domain_name: builtins.str,
2756
- hosted_zone: typing.Optional["_aws_cdk_aws_route53_ceddda9d.IHostedZone"] = None,
3287
+ data_source_bucket_name: builtins.str,
3288
+ chunking_strategy: typing.Optional[builtins.str] = None,
3289
+ data_source_prefix: typing.Optional[builtins.str] = None,
3290
+ embedding_model_id: typing.Optional[builtins.str] = None,
3291
+ max_tokens: typing.Optional[jsii.Number] = None,
3292
+ overlap_tokens: typing.Optional[jsii.Number] = None,
2757
3293
  ) -> None:
2758
- '''(experimental) Custom domain configuration for the frontend.
3294
+ '''(experimental) Configuration for creating a new Bedrock Knowledge Base.
2759
3295
 
2760
- :param certificate: (experimental) SSL certificate for the domain (required when domainName is provided).
3296
+ When provided to BedrockKnowledgeBase, a new knowledge base will be
3297
+ created with the specified data source and embedding configuration.
3298
+
3299
+ Note: This is an advanced feature. For most use cases, referencing
3300
+ an existing knowledge base by ID is recommended.
3301
+
3302
+ :param data_source_bucket_name: (experimental) S3 bucket name containing source documents. The bucket must exist and contain the documents to be indexed.
3303
+ :param chunking_strategy: (experimental) Chunking strategy for document processing. - 'fixed-size': Split documents into fixed-size chunks - 'semantic': Use semantic boundaries for chunking - 'none': No chunking (use entire documents) Default: 'fixed-size'
3304
+ :param data_source_prefix: (experimental) S3 prefix for source documents within the bucket. Only documents under this prefix will be indexed. Default: - Root of bucket (all documents)
3305
+ :param embedding_model_id: (experimental) Embedding model to use for vectorization. Must be a valid Bedrock embedding model ID. Default: 'amazon.titan-embed-text-v2:0'
3306
+ :param max_tokens: (experimental) Maximum chunk size in tokens (for fixed-size chunking). Only used when chunkingStrategy is 'fixed-size'. Default: 300
3307
+ :param overlap_tokens: (experimental) Overlap between chunks in tokens (for fixed-size chunking). Only used when chunkingStrategy is 'fixed-size'. Default: 20
3308
+
3309
+ :stability: experimental
3310
+ '''
3311
+ if __debug__:
3312
+ type_hints = typing.get_type_hints(_typecheckingstub__5a66ad6b4c71f08ad11270f15622825326a8ae23d1f4b8349ee45ee1997ed029)
3313
+ check_type(argname="argument data_source_bucket_name", value=data_source_bucket_name, expected_type=type_hints["data_source_bucket_name"])
3314
+ check_type(argname="argument chunking_strategy", value=chunking_strategy, expected_type=type_hints["chunking_strategy"])
3315
+ check_type(argname="argument data_source_prefix", value=data_source_prefix, expected_type=type_hints["data_source_prefix"])
3316
+ check_type(argname="argument embedding_model_id", value=embedding_model_id, expected_type=type_hints["embedding_model_id"])
3317
+ check_type(argname="argument max_tokens", value=max_tokens, expected_type=type_hints["max_tokens"])
3318
+ check_type(argname="argument overlap_tokens", value=overlap_tokens, expected_type=type_hints["overlap_tokens"])
3319
+ self._values: typing.Dict[builtins.str, typing.Any] = {
3320
+ "data_source_bucket_name": data_source_bucket_name,
3321
+ }
3322
+ if chunking_strategy is not None:
3323
+ self._values["chunking_strategy"] = chunking_strategy
3324
+ if data_source_prefix is not None:
3325
+ self._values["data_source_prefix"] = data_source_prefix
3326
+ if embedding_model_id is not None:
3327
+ self._values["embedding_model_id"] = embedding_model_id
3328
+ if max_tokens is not None:
3329
+ self._values["max_tokens"] = max_tokens
3330
+ if overlap_tokens is not None:
3331
+ self._values["overlap_tokens"] = overlap_tokens
3332
+
3333
+ @builtins.property
3334
+ def data_source_bucket_name(self) -> builtins.str:
3335
+ '''(experimental) S3 bucket name containing source documents.
3336
+
3337
+ The bucket must exist and contain the documents to be indexed.
3338
+
3339
+ :stability: experimental
3340
+ '''
3341
+ result = self._values.get("data_source_bucket_name")
3342
+ assert result is not None, "Required property 'data_source_bucket_name' is missing"
3343
+ return typing.cast(builtins.str, result)
3344
+
3345
+ @builtins.property
3346
+ def chunking_strategy(self) -> typing.Optional[builtins.str]:
3347
+ '''(experimental) Chunking strategy for document processing.
3348
+
3349
+ - 'fixed-size': Split documents into fixed-size chunks
3350
+ - 'semantic': Use semantic boundaries for chunking
3351
+ - 'none': No chunking (use entire documents)
3352
+
3353
+ :default: 'fixed-size'
3354
+
3355
+ :stability: experimental
3356
+ '''
3357
+ result = self._values.get("chunking_strategy")
3358
+ return typing.cast(typing.Optional[builtins.str], result)
3359
+
3360
+ @builtins.property
3361
+ def data_source_prefix(self) -> typing.Optional[builtins.str]:
3362
+ '''(experimental) S3 prefix for source documents within the bucket.
3363
+
3364
+ Only documents under this prefix will be indexed.
3365
+
3366
+ :default: - Root of bucket (all documents)
3367
+
3368
+ :stability: experimental
3369
+ '''
3370
+ result = self._values.get("data_source_prefix")
3371
+ return typing.cast(typing.Optional[builtins.str], result)
3372
+
3373
+ @builtins.property
3374
+ def embedding_model_id(self) -> typing.Optional[builtins.str]:
3375
+ '''(experimental) Embedding model to use for vectorization.
3376
+
3377
+ Must be a valid Bedrock embedding model ID.
3378
+
3379
+ :default: 'amazon.titan-embed-text-v2:0'
3380
+
3381
+ :stability: experimental
3382
+ '''
3383
+ result = self._values.get("embedding_model_id")
3384
+ return typing.cast(typing.Optional[builtins.str], result)
3385
+
3386
+ @builtins.property
3387
+ def max_tokens(self) -> typing.Optional[jsii.Number]:
3388
+ '''(experimental) Maximum chunk size in tokens (for fixed-size chunking).
3389
+
3390
+ Only used when chunkingStrategy is 'fixed-size'.
3391
+
3392
+ :default: 300
3393
+
3394
+ :stability: experimental
3395
+ '''
3396
+ result = self._values.get("max_tokens")
3397
+ return typing.cast(typing.Optional[jsii.Number], result)
3398
+
3399
+ @builtins.property
3400
+ def overlap_tokens(self) -> typing.Optional[jsii.Number]:
3401
+ '''(experimental) Overlap between chunks in tokens (for fixed-size chunking).
3402
+
3403
+ Only used when chunkingStrategy is 'fixed-size'.
3404
+
3405
+ :default: 20
3406
+
3407
+ :stability: experimental
3408
+ '''
3409
+ result = self._values.get("overlap_tokens")
3410
+ return typing.cast(typing.Optional[jsii.Number], result)
3411
+
3412
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
3413
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
3414
+
3415
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
3416
+ return not (rhs == self)
3417
+
3418
+ def __repr__(self) -> str:
3419
+ return "CreateKnowledgeBaseConfiguration(%s)" % ", ".join(
3420
+ k + "=" + repr(v) for k, v in self._values.items()
3421
+ )
3422
+
3423
+
3424
+ @jsii.data_type(
3425
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.CustomDomainConfig",
3426
+ jsii_struct_bases=[],
3427
+ name_mapping={
3428
+ "certificate": "certificate",
3429
+ "domain_name": "domainName",
3430
+ "hosted_zone": "hostedZone",
3431
+ },
3432
+ )
3433
+ class CustomDomainConfig:
3434
+ def __init__(
3435
+ self,
3436
+ *,
3437
+ certificate: "_aws_cdk_aws_certificatemanager_ceddda9d.ICertificate",
3438
+ domain_name: builtins.str,
3439
+ hosted_zone: typing.Optional["_aws_cdk_aws_route53_ceddda9d.IHostedZone"] = None,
3440
+ ) -> None:
3441
+ '''(experimental) Custom domain configuration for the frontend.
3442
+
3443
+ :param certificate: (experimental) SSL certificate for the domain (required when domainName is provided).
2761
3444
  :param domain_name: (experimental) Domain name for the frontend (e.g., 'app.example.com').
2762
3445
  :param hosted_zone: (experimental) Optional hosted zone for automatic DNS record creation.
2763
3446
 
@@ -4239,6 +4922,78 @@ class FrontendProps:
4239
4922
  )
4240
4923
 
4241
4924
 
4925
+ @jsii.data_type(
4926
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.GuardrailConfiguration",
4927
+ jsii_struct_bases=[],
4928
+ name_mapping={
4929
+ "guardrail_id": "guardrailId",
4930
+ "guardrail_version": "guardrailVersion",
4931
+ },
4932
+ )
4933
+ class GuardrailConfiguration:
4934
+ def __init__(
4935
+ self,
4936
+ *,
4937
+ guardrail_id: builtins.str,
4938
+ guardrail_version: typing.Optional[builtins.str] = None,
4939
+ ) -> None:
4940
+ '''(experimental) Configuration for Bedrock Guardrails.
4941
+
4942
+ Guardrails filter content during retrieval operations to prevent
4943
+ inappropriate or sensitive content from being returned.
4944
+
4945
+ :param guardrail_id: (experimental) ID of the Bedrock Guardrail to apply. The guardrail must exist in the same region as the knowledge base.
4946
+ :param guardrail_version: (experimental) Version of the guardrail to use. Use 'DRAFT' for testing or a specific version number for production. Default: 'DRAFT'
4947
+
4948
+ :stability: experimental
4949
+ '''
4950
+ if __debug__:
4951
+ type_hints = typing.get_type_hints(_typecheckingstub__d604d1407a674dc8a1780469f6fca800816236372c95a3b5438a97e1c9faff32)
4952
+ check_type(argname="argument guardrail_id", value=guardrail_id, expected_type=type_hints["guardrail_id"])
4953
+ check_type(argname="argument guardrail_version", value=guardrail_version, expected_type=type_hints["guardrail_version"])
4954
+ self._values: typing.Dict[builtins.str, typing.Any] = {
4955
+ "guardrail_id": guardrail_id,
4956
+ }
4957
+ if guardrail_version is not None:
4958
+ self._values["guardrail_version"] = guardrail_version
4959
+
4960
+ @builtins.property
4961
+ def guardrail_id(self) -> builtins.str:
4962
+ '''(experimental) ID of the Bedrock Guardrail to apply.
4963
+
4964
+ The guardrail must exist in the same region as the knowledge base.
4965
+
4966
+ :stability: experimental
4967
+ '''
4968
+ result = self._values.get("guardrail_id")
4969
+ assert result is not None, "Required property 'guardrail_id' is missing"
4970
+ return typing.cast(builtins.str, result)
4971
+
4972
+ @builtins.property
4973
+ def guardrail_version(self) -> typing.Optional[builtins.str]:
4974
+ '''(experimental) Version of the guardrail to use.
4975
+
4976
+ Use 'DRAFT' for testing or a specific version number for production.
4977
+
4978
+ :default: 'DRAFT'
4979
+
4980
+ :stability: experimental
4981
+ '''
4982
+ result = self._values.get("guardrail_version")
4983
+ return typing.cast(typing.Optional[builtins.str], result)
4984
+
4985
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
4986
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
4987
+
4988
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
4989
+ return not (rhs == self)
4990
+
4991
+ def __repr__(self) -> str:
4992
+ return "GuardrailConfiguration(%s)" % ", ".join(
4993
+ k + "=" + repr(v) for k, v in self._values.items()
4994
+ )
4995
+
4996
+
4242
4997
  @jsii.data_type(
4243
4998
  jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.HybridConfig",
4244
4999
  jsii_struct_bases=[],
@@ -4699,6 +5454,250 @@ class _IAdapterProxy:
4699
5454
  typing.cast(typing.Any, IAdapter).__jsii_proxy_class__ = lambda : _IAdapterProxy
4700
5455
 
4701
5456
 
5457
+ @jsii.interface(jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.IKnowledgeBase")
5458
+ class IKnowledgeBase(typing_extensions.Protocol):
5459
+ '''(experimental) Interface for knowledge base implementations.
5460
+
5461
+ This interface defines the contract that all knowledge base implementations must satisfy,
5462
+ allowing different KB backends (Bedrock KB, OpenSearch, custom) to be used interchangeably
5463
+ with the agent framework.
5464
+
5465
+ Implementations of this interface are responsible for:
5466
+
5467
+ - Providing metadata about the knowledge base (name, description)
5468
+ - Generating the IAM permissions required for the agent to access the KB
5469
+ - Exporting runtime configuration for the retrieval tool
5470
+ - Optionally providing a custom retrieval tool implementation
5471
+
5472
+ :stability: experimental
5473
+ '''
5474
+
5475
+ @builtins.property
5476
+ @jsii.member(jsii_name="description")
5477
+ def description(self) -> builtins.str:
5478
+ '''(experimental) Human-readable description of what this knowledge base contains.
5479
+
5480
+ This description is included in the agent's system prompt to help
5481
+ the agent decide when to query this knowledge base. It should clearly
5482
+ indicate what type of information the KB contains and when it should
5483
+ be used.
5484
+
5485
+ :stability: experimental
5486
+
5487
+ Example::
5488
+
5489
+ 'Contains product documentation, user guides, and FAQs. Use when answering questions about product features or troubleshooting.'
5490
+ '''
5491
+ ...
5492
+
5493
+ @builtins.property
5494
+ @jsii.member(jsii_name="name")
5495
+ def name(self) -> builtins.str:
5496
+ '''(experimental) Human-readable name for this knowledge base.
5497
+
5498
+ This name is used for logging, display purposes, and to help the agent
5499
+ identify which knowledge base to query. It should be unique within
5500
+ the set of knowledge bases configured for an agent.
5501
+
5502
+ :stability: experimental
5503
+
5504
+ Example::
5505
+
5506
+ 'product-documentation'
5507
+ '''
5508
+ ...
5509
+
5510
+ @jsii.member(jsii_name="exportConfiguration")
5511
+ def export_configuration(self) -> "KnowledgeBaseRuntimeConfig":
5512
+ '''(experimental) Export configuration for runtime use by the retrieval tool.
5513
+
5514
+ This method returns a configuration object that will be serialized
5515
+ and passed to the retrieval tool via environment variables. The
5516
+ configuration includes all information needed to query the KB at runtime.
5517
+
5518
+ :return: Runtime configuration object for the retrieval tool
5519
+
5520
+ :stability: experimental
5521
+ '''
5522
+ ...
5523
+
5524
+ @jsii.member(jsii_name="generateIamPermissions")
5525
+ def generate_iam_permissions(
5526
+ self,
5527
+ ) -> typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"]:
5528
+ '''(experimental) Generate IAM policy statements required for accessing this knowledge base.
5529
+
5530
+ This method returns the IAM permissions that the agent's Lambda function
5531
+ role needs to query this knowledge base. The permissions should follow
5532
+ the principle of least privilege, scoped to the specific resources.
5533
+
5534
+ :return: Array of IAM PolicyStatement objects granting necessary permissions
5535
+
5536
+ :stability: experimental
5537
+ '''
5538
+ ...
5539
+
5540
+ @jsii.member(jsii_name="retrievalToolAsset")
5541
+ def retrieval_tool_asset(
5542
+ self,
5543
+ ) -> typing.Optional["_aws_cdk_aws_s3_assets_ceddda9d.Asset"]:
5544
+ '''(experimental) Provide the retrieval tool asset for this knowledge base type.
5545
+
5546
+ This optional method allows knowledge base implementations to provide
5547
+ a custom retrieval tool. If not implemented or returns undefined,
5548
+ the framework's default retrieval tool will be used.
5549
+
5550
+ :return: S3 Asset containing the retrieval tool code, or undefined to use the default
5551
+
5552
+ :stability: experimental
5553
+ '''
5554
+ ...
5555
+
5556
+ @jsii.member(jsii_name="retrievalToolLayers")
5557
+ def retrieval_tool_layers(
5558
+ self,
5559
+ ) -> typing.Optional[typing.List["_aws_cdk_aws_lambda_ceddda9d.LayerVersion"]]:
5560
+ '''(experimental) Provide Lambda layers required by the retrieval tool.
5561
+
5562
+ This optional method allows knowledge base implementations to provide
5563
+ Lambda layers containing dependencies needed by their retrieval tool.
5564
+ For example, a knowledge base might need specific boto3 versions,
5565
+ custom libraries, or SDK extensions.
5566
+
5567
+ The layers will be added to the agent's Lambda function, making the
5568
+ dependencies available to the retrieval tool at runtime.
5569
+
5570
+ :return: Array of Lambda LayerVersion objects, or undefined if no layers needed
5571
+
5572
+ :stability: experimental
5573
+ '''
5574
+ ...
5575
+
5576
+
5577
+ class _IKnowledgeBaseProxy:
5578
+ '''(experimental) Interface for knowledge base implementations.
5579
+
5580
+ This interface defines the contract that all knowledge base implementations must satisfy,
5581
+ allowing different KB backends (Bedrock KB, OpenSearch, custom) to be used interchangeably
5582
+ with the agent framework.
5583
+
5584
+ Implementations of this interface are responsible for:
5585
+
5586
+ - Providing metadata about the knowledge base (name, description)
5587
+ - Generating the IAM permissions required for the agent to access the KB
5588
+ - Exporting runtime configuration for the retrieval tool
5589
+ - Optionally providing a custom retrieval tool implementation
5590
+
5591
+ :stability: experimental
5592
+ '''
5593
+
5594
+ __jsii_type__: typing.ClassVar[str] = "@cdklabs/cdk-appmod-catalog-blueprints.IKnowledgeBase"
5595
+
5596
+ @builtins.property
5597
+ @jsii.member(jsii_name="description")
5598
+ def description(self) -> builtins.str:
5599
+ '''(experimental) Human-readable description of what this knowledge base contains.
5600
+
5601
+ This description is included in the agent's system prompt to help
5602
+ the agent decide when to query this knowledge base. It should clearly
5603
+ indicate what type of information the KB contains and when it should
5604
+ be used.
5605
+
5606
+ :stability: experimental
5607
+
5608
+ Example::
5609
+
5610
+ 'Contains product documentation, user guides, and FAQs. Use when answering questions about product features or troubleshooting.'
5611
+ '''
5612
+ return typing.cast(builtins.str, jsii.get(self, "description"))
5613
+
5614
+ @builtins.property
5615
+ @jsii.member(jsii_name="name")
5616
+ def name(self) -> builtins.str:
5617
+ '''(experimental) Human-readable name for this knowledge base.
5618
+
5619
+ This name is used for logging, display purposes, and to help the agent
5620
+ identify which knowledge base to query. It should be unique within
5621
+ the set of knowledge bases configured for an agent.
5622
+
5623
+ :stability: experimental
5624
+
5625
+ Example::
5626
+
5627
+ 'product-documentation'
5628
+ '''
5629
+ return typing.cast(builtins.str, jsii.get(self, "name"))
5630
+
5631
+ @jsii.member(jsii_name="exportConfiguration")
5632
+ def export_configuration(self) -> "KnowledgeBaseRuntimeConfig":
5633
+ '''(experimental) Export configuration for runtime use by the retrieval tool.
5634
+
5635
+ This method returns a configuration object that will be serialized
5636
+ and passed to the retrieval tool via environment variables. The
5637
+ configuration includes all information needed to query the KB at runtime.
5638
+
5639
+ :return: Runtime configuration object for the retrieval tool
5640
+
5641
+ :stability: experimental
5642
+ '''
5643
+ return typing.cast("KnowledgeBaseRuntimeConfig", jsii.invoke(self, "exportConfiguration", []))
5644
+
5645
+ @jsii.member(jsii_name="generateIamPermissions")
5646
+ def generate_iam_permissions(
5647
+ self,
5648
+ ) -> typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"]:
5649
+ '''(experimental) Generate IAM policy statements required for accessing this knowledge base.
5650
+
5651
+ This method returns the IAM permissions that the agent's Lambda function
5652
+ role needs to query this knowledge base. The permissions should follow
5653
+ the principle of least privilege, scoped to the specific resources.
5654
+
5655
+ :return: Array of IAM PolicyStatement objects granting necessary permissions
5656
+
5657
+ :stability: experimental
5658
+ '''
5659
+ return typing.cast(typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"], jsii.invoke(self, "generateIamPermissions", []))
5660
+
5661
+ @jsii.member(jsii_name="retrievalToolAsset")
5662
+ def retrieval_tool_asset(
5663
+ self,
5664
+ ) -> typing.Optional["_aws_cdk_aws_s3_assets_ceddda9d.Asset"]:
5665
+ '''(experimental) Provide the retrieval tool asset for this knowledge base type.
5666
+
5667
+ This optional method allows knowledge base implementations to provide
5668
+ a custom retrieval tool. If not implemented or returns undefined,
5669
+ the framework's default retrieval tool will be used.
5670
+
5671
+ :return: S3 Asset containing the retrieval tool code, or undefined to use the default
5672
+
5673
+ :stability: experimental
5674
+ '''
5675
+ return typing.cast(typing.Optional["_aws_cdk_aws_s3_assets_ceddda9d.Asset"], jsii.invoke(self, "retrievalToolAsset", []))
5676
+
5677
+ @jsii.member(jsii_name="retrievalToolLayers")
5678
+ def retrieval_tool_layers(
5679
+ self,
5680
+ ) -> typing.Optional[typing.List["_aws_cdk_aws_lambda_ceddda9d.LayerVersion"]]:
5681
+ '''(experimental) Provide Lambda layers required by the retrieval tool.
5682
+
5683
+ This optional method allows knowledge base implementations to provide
5684
+ Lambda layers containing dependencies needed by their retrieval tool.
5685
+ For example, a knowledge base might need specific boto3 versions,
5686
+ custom libraries, or SDK extensions.
5687
+
5688
+ The layers will be added to the agent's Lambda function, making the
5689
+ dependencies available to the retrieval tool at runtime.
5690
+
5691
+ :return: Array of Lambda LayerVersion objects, or undefined if no layers needed
5692
+
5693
+ :stability: experimental
5694
+ '''
5695
+ return typing.cast(typing.Optional[typing.List["_aws_cdk_aws_lambda_ceddda9d.LayerVersion"]], jsii.invoke(self, "retrievalToolLayers", []))
5696
+
5697
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the interface
5698
+ typing.cast(typing.Any, IKnowledgeBase).__jsii_proxy_class__ = lambda : _IKnowledgeBaseProxy
5699
+
5700
+
4702
5701
  @jsii.interface(jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.IObservable")
4703
5702
  class IObservable(typing_extensions.Protocol):
4704
5703
  '''(experimental) Interface providing configuration parameters for constructs that support Observability.
@@ -4781,6 +5780,247 @@ class _IObservableProxy:
4781
5780
  typing.cast(typing.Any, IObservable).__jsii_proxy_class__ = lambda : _IObservableProxy
4782
5781
 
4783
5782
 
5783
+ @jsii.enum(jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.InvokeType")
5784
+ class InvokeType(enum.Enum):
5785
+ '''(experimental) Agent invocation type enumeration.
5786
+
5787
+ Defines the processing mode for the agent.
5788
+ Must match the Python InvokeType enum in batch.py.
5789
+
5790
+ :stability: experimental
5791
+ '''
5792
+
5793
+ BATCH = "BATCH"
5794
+ '''(experimental) Batch processing mode - processes one document at a time.
5795
+
5796
+ Default mode for most agent operations.
5797
+
5798
+ :stability: experimental
5799
+ '''
5800
+ INTERACTIVE = "INTERACTIVE"
5801
+ '''(experimental) Interactive conversation mode (future).
5802
+
5803
+ For real-time chat and conversational interfaces.
5804
+
5805
+ :stability: experimental
5806
+ '''
5807
+ ATTACH_DIRECTLY = "ATTACH_DIRECTLY"
5808
+ '''(experimental) Direct invocation mode.
5809
+
5810
+ Used for RAG applications, API endpoints, and direct agent calls.
5811
+
5812
+ :stability: experimental
5813
+ '''
5814
+ CLASSIFICATION = "CLASSIFICATION"
5815
+ '''(experimental) Document classification step.
5816
+
5817
+ Used in document processing workflows for classification phase.
5818
+
5819
+ :stability: experimental
5820
+ '''
5821
+ PROCESSING = "PROCESSING"
5822
+ '''(experimental) Document processing step.
5823
+
5824
+ Used in document processing workflows for extraction/processing phase.
5825
+
5826
+ :stability: experimental
5827
+ '''
5828
+ AGGREGATION = "AGGREGATION"
5829
+ '''(experimental) Document aggregation step.
5830
+
5831
+ Used in document processing workflows for aggregating chunked results.
5832
+
5833
+ :stability: experimental
5834
+ '''
5835
+
5836
+
5837
+ @jsii.data_type(
5838
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.KnowledgeBaseRuntimeConfig",
5839
+ jsii_struct_bases=[],
5840
+ name_mapping={
5841
+ "description": "description",
5842
+ "name": "name",
5843
+ "retrieval": "retrieval",
5844
+ "acl": "acl",
5845
+ "guardrail": "guardrail",
5846
+ "knowledge_base_arn": "knowledgeBaseArn",
5847
+ "knowledge_base_id": "knowledgeBaseId",
5848
+ "type": "type",
5849
+ "vector_store": "vectorStore",
5850
+ },
5851
+ )
5852
+ class KnowledgeBaseRuntimeConfig:
5853
+ def __init__(
5854
+ self,
5855
+ *,
5856
+ description: builtins.str,
5857
+ name: builtins.str,
5858
+ retrieval: typing.Union["RetrievalConfiguration", typing.Dict[builtins.str, typing.Any]],
5859
+ acl: typing.Optional[typing.Union["AclConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
5860
+ guardrail: typing.Optional[typing.Union["GuardrailConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
5861
+ knowledge_base_arn: typing.Optional[builtins.str] = None,
5862
+ knowledge_base_id: typing.Optional[builtins.str] = None,
5863
+ type: typing.Optional[builtins.str] = None,
5864
+ vector_store: typing.Optional[typing.Union["VectorStoreConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
5865
+ ) -> None:
5866
+ '''(experimental) Runtime configuration exported for the retrieval tool.
5867
+
5868
+ This interface defines the structure of the configuration object
5869
+ that is serialized and passed to the retrieval tool via environment
5870
+ variables. It contains all information needed to query the knowledge
5871
+ base at runtime.
5872
+
5873
+ :param description: (experimental) Description of what this knowledge base contains.
5874
+ :param name: (experimental) Human-readable name for this knowledge base.
5875
+ :param retrieval: (experimental) Retrieval configuration.
5876
+ :param acl: (experimental) ACL configuration for identity-aware retrieval.
5877
+ :param guardrail: (experimental) Guardrail configuration (for Bedrock implementations).
5878
+ :param knowledge_base_arn: (experimental) Bedrock Knowledge Base ARN (for Bedrock implementations).
5879
+ :param knowledge_base_id: (experimental) Bedrock Knowledge Base ID (for Bedrock implementations).
5880
+ :param type: (experimental) Type of knowledge base implementation. Used by the retrieval tool to determine how to query the KB.
5881
+ :param vector_store: (experimental) Vector store configuration (for Bedrock implementations).
5882
+
5883
+ :stability: experimental
5884
+ '''
5885
+ if isinstance(retrieval, dict):
5886
+ retrieval = RetrievalConfiguration(**retrieval)
5887
+ if isinstance(acl, dict):
5888
+ acl = AclConfiguration(**acl)
5889
+ if isinstance(guardrail, dict):
5890
+ guardrail = GuardrailConfiguration(**guardrail)
5891
+ if isinstance(vector_store, dict):
5892
+ vector_store = VectorStoreConfiguration(**vector_store)
5893
+ if __debug__:
5894
+ type_hints = typing.get_type_hints(_typecheckingstub__eba4c5624b16f91d89be2a09eeaf9e99f078cde0dfdfdaa2d50e663d366ce5a1)
5895
+ check_type(argname="argument description", value=description, expected_type=type_hints["description"])
5896
+ check_type(argname="argument name", value=name, expected_type=type_hints["name"])
5897
+ check_type(argname="argument retrieval", value=retrieval, expected_type=type_hints["retrieval"])
5898
+ check_type(argname="argument acl", value=acl, expected_type=type_hints["acl"])
5899
+ check_type(argname="argument guardrail", value=guardrail, expected_type=type_hints["guardrail"])
5900
+ check_type(argname="argument knowledge_base_arn", value=knowledge_base_arn, expected_type=type_hints["knowledge_base_arn"])
5901
+ check_type(argname="argument knowledge_base_id", value=knowledge_base_id, expected_type=type_hints["knowledge_base_id"])
5902
+ check_type(argname="argument type", value=type, expected_type=type_hints["type"])
5903
+ check_type(argname="argument vector_store", value=vector_store, expected_type=type_hints["vector_store"])
5904
+ self._values: typing.Dict[builtins.str, typing.Any] = {
5905
+ "description": description,
5906
+ "name": name,
5907
+ "retrieval": retrieval,
5908
+ }
5909
+ if acl is not None:
5910
+ self._values["acl"] = acl
5911
+ if guardrail is not None:
5912
+ self._values["guardrail"] = guardrail
5913
+ if knowledge_base_arn is not None:
5914
+ self._values["knowledge_base_arn"] = knowledge_base_arn
5915
+ if knowledge_base_id is not None:
5916
+ self._values["knowledge_base_id"] = knowledge_base_id
5917
+ if type is not None:
5918
+ self._values["type"] = type
5919
+ if vector_store is not None:
5920
+ self._values["vector_store"] = vector_store
5921
+
5922
+ @builtins.property
5923
+ def description(self) -> builtins.str:
5924
+ '''(experimental) Description of what this knowledge base contains.
5925
+
5926
+ :stability: experimental
5927
+ '''
5928
+ result = self._values.get("description")
5929
+ assert result is not None, "Required property 'description' is missing"
5930
+ return typing.cast(builtins.str, result)
5931
+
5932
+ @builtins.property
5933
+ def name(self) -> builtins.str:
5934
+ '''(experimental) Human-readable name for this knowledge base.
5935
+
5936
+ :stability: experimental
5937
+ '''
5938
+ result = self._values.get("name")
5939
+ assert result is not None, "Required property 'name' is missing"
5940
+ return typing.cast(builtins.str, result)
5941
+
5942
+ @builtins.property
5943
+ def retrieval(self) -> "RetrievalConfiguration":
5944
+ '''(experimental) Retrieval configuration.
5945
+
5946
+ :stability: experimental
5947
+ '''
5948
+ result = self._values.get("retrieval")
5949
+ assert result is not None, "Required property 'retrieval' is missing"
5950
+ return typing.cast("RetrievalConfiguration", result)
5951
+
5952
+ @builtins.property
5953
+ def acl(self) -> typing.Optional["AclConfiguration"]:
5954
+ '''(experimental) ACL configuration for identity-aware retrieval.
5955
+
5956
+ :stability: experimental
5957
+ '''
5958
+ result = self._values.get("acl")
5959
+ return typing.cast(typing.Optional["AclConfiguration"], result)
5960
+
5961
+ @builtins.property
5962
+ def guardrail(self) -> typing.Optional["GuardrailConfiguration"]:
5963
+ '''(experimental) Guardrail configuration (for Bedrock implementations).
5964
+
5965
+ :stability: experimental
5966
+ '''
5967
+ result = self._values.get("guardrail")
5968
+ return typing.cast(typing.Optional["GuardrailConfiguration"], result)
5969
+
5970
+ @builtins.property
5971
+ def knowledge_base_arn(self) -> typing.Optional[builtins.str]:
5972
+ '''(experimental) Bedrock Knowledge Base ARN (for Bedrock implementations).
5973
+
5974
+ :stability: experimental
5975
+ '''
5976
+ result = self._values.get("knowledge_base_arn")
5977
+ return typing.cast(typing.Optional[builtins.str], result)
5978
+
5979
+ @builtins.property
5980
+ def knowledge_base_id(self) -> typing.Optional[builtins.str]:
5981
+ '''(experimental) Bedrock Knowledge Base ID (for Bedrock implementations).
5982
+
5983
+ :stability: experimental
5984
+ '''
5985
+ result = self._values.get("knowledge_base_id")
5986
+ return typing.cast(typing.Optional[builtins.str], result)
5987
+
5988
+ @builtins.property
5989
+ def type(self) -> typing.Optional[builtins.str]:
5990
+ '''(experimental) Type of knowledge base implementation.
5991
+
5992
+ Used by the retrieval tool to determine how to query the KB.
5993
+
5994
+ :stability: experimental
5995
+
5996
+ Example::
5997
+
5998
+ 'bedrock'
5999
+ '''
6000
+ result = self._values.get("type")
6001
+ return typing.cast(typing.Optional[builtins.str], result)
6002
+
6003
+ @builtins.property
6004
+ def vector_store(self) -> typing.Optional["VectorStoreConfiguration"]:
6005
+ '''(experimental) Vector store configuration (for Bedrock implementations).
6006
+
6007
+ :stability: experimental
6008
+ '''
6009
+ result = self._values.get("vector_store")
6010
+ return typing.cast(typing.Optional["VectorStoreConfiguration"], result)
6011
+
6012
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
6013
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
6014
+
6015
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
6016
+ return not (rhs == self)
6017
+
6018
+ def __repr__(self) -> str:
6019
+ return "KnowledgeBaseRuntimeConfig(%s)" % ", ".join(
6020
+ k + "=" + repr(v) for k, v in self._values.items()
6021
+ )
6022
+
6023
+
4784
6024
  class LambdaIamUtils(
4785
6025
  metaclass=jsii.JSIIMeta,
4786
6026
  jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.LambdaIamUtils",
@@ -6386,6 +7626,84 @@ class QueuedS3AdapterProps:
6386
7626
  )
6387
7627
 
6388
7628
 
7629
+ @jsii.data_type(
7630
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.RetrievalConfiguration",
7631
+ jsii_struct_bases=[],
7632
+ name_mapping={
7633
+ "number_of_results": "numberOfResults",
7634
+ "retrieval_filter": "retrievalFilter",
7635
+ },
7636
+ )
7637
+ class RetrievalConfiguration:
7638
+ def __init__(
7639
+ self,
7640
+ *,
7641
+ number_of_results: typing.Optional[jsii.Number] = None,
7642
+ retrieval_filter: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
7643
+ ) -> None:
7644
+ '''(experimental) Configuration for retrieval operations.
7645
+
7646
+ Controls how many results are returned and optional metadata filtering
7647
+ applied to all queries against the knowledge base.
7648
+
7649
+ :param number_of_results: (experimental) Number of results to return per query. Higher values provide more context but increase token usage. Lower values are faster but may miss relevant information. Default: 5
7650
+ :param retrieval_filter: (experimental) Metadata filter to apply to all queries. This filter is applied in addition to any ACL filters. Use this for static filtering based on document metadata (e.g., document type, category, or date range). Default: - No filter applied
7651
+
7652
+ :stability: experimental
7653
+ '''
7654
+ if __debug__:
7655
+ type_hints = typing.get_type_hints(_typecheckingstub__0389e881defd6b748c16712149b25f1d6a9c2415742f6287f9424ffee6d97ac9)
7656
+ check_type(argname="argument number_of_results", value=number_of_results, expected_type=type_hints["number_of_results"])
7657
+ check_type(argname="argument retrieval_filter", value=retrieval_filter, expected_type=type_hints["retrieval_filter"])
7658
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
7659
+ if number_of_results is not None:
7660
+ self._values["number_of_results"] = number_of_results
7661
+ if retrieval_filter is not None:
7662
+ self._values["retrieval_filter"] = retrieval_filter
7663
+
7664
+ @builtins.property
7665
+ def number_of_results(self) -> typing.Optional[jsii.Number]:
7666
+ '''(experimental) Number of results to return per query.
7667
+
7668
+ Higher values provide more context but increase token usage.
7669
+ Lower values are faster but may miss relevant information.
7670
+
7671
+ :default: 5
7672
+
7673
+ :stability: experimental
7674
+ '''
7675
+ result = self._values.get("number_of_results")
7676
+ return typing.cast(typing.Optional[jsii.Number], result)
7677
+
7678
+ @builtins.property
7679
+ def retrieval_filter(
7680
+ self,
7681
+ ) -> typing.Optional[typing.Mapping[builtins.str, typing.Any]]:
7682
+ '''(experimental) Metadata filter to apply to all queries.
7683
+
7684
+ This filter is applied in addition to any ACL filters. Use this
7685
+ for static filtering based on document metadata (e.g., document type,
7686
+ category, or date range).
7687
+
7688
+ :default: - No filter applied
7689
+
7690
+ :stability: experimental
7691
+ '''
7692
+ result = self._values.get("retrieval_filter")
7693
+ return typing.cast(typing.Optional[typing.Mapping[builtins.str, typing.Any]], result)
7694
+
7695
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
7696
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
7697
+
7698
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
7699
+ return not (rhs == self)
7700
+
7701
+ def __repr__(self) -> str:
7702
+ return "RetrievalConfiguration(%s)" % ", ".join(
7703
+ k + "=" + repr(v) for k, v in self._values.items()
7704
+ )
7705
+
7706
+
6389
7707
  @jsii.implements(_aws_cdk_ceddda9d.IPropertyInjector)
6390
7708
  class StateMachineObservabilityPropertyInjector(
6391
7709
  metaclass=jsii.JSIIMeta,
@@ -6598,38 +7916,130 @@ class TokenBasedConfig:
6598
7916
 
6599
7917
  Ensures no chunk exceeds model token limits.
6600
7918
 
6601
- :default: 100000
7919
+ :default: 100000
7920
+
7921
+ :stability: experimental
7922
+ '''
7923
+ result = self._values.get("max_tokens_per_chunk")
7924
+ return typing.cast(typing.Optional[jsii.Number], result)
7925
+
7926
+ @builtins.property
7927
+ def overlap_tokens(self) -> typing.Optional[jsii.Number]:
7928
+ '''(experimental) Number of overlapping tokens between consecutive chunks.
7929
+
7930
+ Provides context continuity across chunks.
7931
+
7932
+ :default: 5000
7933
+
7934
+ :stability: experimental
7935
+ '''
7936
+ result = self._values.get("overlap_tokens")
7937
+ return typing.cast(typing.Optional[jsii.Number], result)
7938
+
7939
+ @builtins.property
7940
+ def token_threshold(self) -> typing.Optional[jsii.Number]:
7941
+ '''(experimental) Threshold for triggering chunking based on token count.
7942
+
7943
+ Documents with tokens > threshold will be chunked.
7944
+
7945
+ :default: 150000
7946
+
7947
+ :stability: experimental
7948
+ '''
7949
+ result = self._values.get("token_threshold")
7950
+ return typing.cast(typing.Optional[jsii.Number], result)
7951
+
7952
+ def __eq__(self, rhs: typing.Any) -> builtins.bool:
7953
+ return isinstance(rhs, self.__class__) and rhs._values == self._values
7954
+
7955
+ def __ne__(self, rhs: typing.Any) -> builtins.bool:
7956
+ return not (rhs == self)
7957
+
7958
+ def __repr__(self) -> str:
7959
+ return "TokenBasedConfig(%s)" % ", ".join(
7960
+ k + "=" + repr(v) for k, v in self._values.items()
7961
+ )
7962
+
7963
+
7964
+ @jsii.data_type(
7965
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.VectorStoreConfiguration",
7966
+ jsii_struct_bases=[],
7967
+ name_mapping={"bucket_name": "bucketName", "prefix": "prefix", "type": "type"},
7968
+ )
7969
+ class VectorStoreConfiguration:
7970
+ def __init__(
7971
+ self,
7972
+ *,
7973
+ bucket_name: typing.Optional[builtins.str] = None,
7974
+ prefix: typing.Optional[builtins.str] = None,
7975
+ type: typing.Optional[builtins.str] = None,
7976
+ ) -> None:
7977
+ '''(experimental) Configuration for vector store used by the knowledge base.
7978
+
7979
+ Defines the type of vector store and any type-specific configuration.
7980
+ S3 Vectors is the default and recommended option for most use cases.
7981
+
7982
+ :param bucket_name: (experimental) S3 bucket name for S3 Vectors storage. Only used when type is 's3-vectors'. If not provided, the default bucket created by Bedrock will be used. Default: - Uses Bedrock's default bucket
7983
+ :param prefix: (experimental) S3 prefix for vectors within the bucket. Only used when type is 's3-vectors'. Default: 'vectors/'
7984
+ :param type: (experimental) Type of vector store. - 's3-vectors': Amazon S3 vector storage (default, recommended) - 'opensearch-serverless': Amazon OpenSearch Serverless - 'pinecone': Pinecone vector database - 'rds': Amazon RDS with pgvector Default: 's3-vectors'
7985
+
7986
+ :stability: experimental
7987
+ '''
7988
+ if __debug__:
7989
+ type_hints = typing.get_type_hints(_typecheckingstub__98230924b191ba0192b7d818a592221249c2b38f4ddd572cfc62d08a37b84b42)
7990
+ check_type(argname="argument bucket_name", value=bucket_name, expected_type=type_hints["bucket_name"])
7991
+ check_type(argname="argument prefix", value=prefix, expected_type=type_hints["prefix"])
7992
+ check_type(argname="argument type", value=type, expected_type=type_hints["type"])
7993
+ self._values: typing.Dict[builtins.str, typing.Any] = {}
7994
+ if bucket_name is not None:
7995
+ self._values["bucket_name"] = bucket_name
7996
+ if prefix is not None:
7997
+ self._values["prefix"] = prefix
7998
+ if type is not None:
7999
+ self._values["type"] = type
8000
+
8001
+ @builtins.property
8002
+ def bucket_name(self) -> typing.Optional[builtins.str]:
8003
+ '''(experimental) S3 bucket name for S3 Vectors storage.
8004
+
8005
+ Only used when type is 's3-vectors'. If not provided, the default
8006
+ bucket created by Bedrock will be used.
8007
+
8008
+ :default: - Uses Bedrock's default bucket
6602
8009
 
6603
8010
  :stability: experimental
6604
8011
  '''
6605
- result = self._values.get("max_tokens_per_chunk")
6606
- return typing.cast(typing.Optional[jsii.Number], result)
8012
+ result = self._values.get("bucket_name")
8013
+ return typing.cast(typing.Optional[builtins.str], result)
6607
8014
 
6608
8015
  @builtins.property
6609
- def overlap_tokens(self) -> typing.Optional[jsii.Number]:
6610
- '''(experimental) Number of overlapping tokens between consecutive chunks.
8016
+ def prefix(self) -> typing.Optional[builtins.str]:
8017
+ '''(experimental) S3 prefix for vectors within the bucket.
6611
8018
 
6612
- Provides context continuity across chunks.
8019
+ Only used when type is 's3-vectors'.
6613
8020
 
6614
- :default: 5000
8021
+ :default: 'vectors/'
6615
8022
 
6616
8023
  :stability: experimental
6617
8024
  '''
6618
- result = self._values.get("overlap_tokens")
6619
- return typing.cast(typing.Optional[jsii.Number], result)
8025
+ result = self._values.get("prefix")
8026
+ return typing.cast(typing.Optional[builtins.str], result)
6620
8027
 
6621
8028
  @builtins.property
6622
- def token_threshold(self) -> typing.Optional[jsii.Number]:
6623
- '''(experimental) Threshold for triggering chunking based on token count.
8029
+ def type(self) -> typing.Optional[builtins.str]:
8030
+ '''(experimental) Type of vector store.
6624
8031
 
6625
- Documents with tokens > threshold will be chunked.
8032
+ - 's3-vectors': Amazon S3 vector storage (default, recommended)
8033
+ - 'opensearch-serverless': Amazon OpenSearch Serverless
8034
+ - 'pinecone': Pinecone vector database
8035
+ - 'rds': Amazon RDS with pgvector
6626
8036
 
6627
- :default: 150000
8037
+ :default: 's3-vectors'
6628
8038
 
6629
8039
  :stability: experimental
6630
8040
  '''
6631
- result = self._values.get("token_threshold")
6632
- return typing.cast(typing.Optional[jsii.Number], result)
8041
+ result = self._values.get("type")
8042
+ return typing.cast(typing.Optional[builtins.str], result)
6633
8043
 
6634
8044
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
6635
8045
  return isinstance(rhs, self.__class__) and rhs._values == self._values
@@ -6638,7 +8048,7 @@ class TokenBasedConfig:
6638
8048
  return not (rhs == self)
6639
8049
 
6640
8050
  def __repr__(self) -> str:
6641
- return "TokenBasedConfig(%s)" % ", ".join(
8051
+ return "VectorStoreConfiguration(%s)" % ", ".join(
6642
8052
  k + "=" + repr(v) for k, v in self._values.items()
6643
8053
  )
6644
8054
 
@@ -7484,6 +8894,226 @@ class BaseDocumentProcessingProps(ObservableProps):
7484
8894
  )
7485
8895
 
7486
8896
 
8897
+ @jsii.implements(IKnowledgeBase)
8898
+ class BaseKnowledgeBase(
8899
+ _constructs_77d1e7e8.Construct,
8900
+ metaclass=jsii.JSIIAbstractClass,
8901
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.BaseKnowledgeBase",
8902
+ ):
8903
+ '''(experimental) Abstract base class for knowledge base implementations.
8904
+
8905
+ This class provides common functionality for all knowledge base implementations,
8906
+ including configuration management, validation, and default behaviors. Concrete
8907
+ implementations (like BedrockKnowledgeBase) extend this class and implement
8908
+ the abstract methods.
8909
+
8910
+ The base class handles:
8911
+
8912
+ - Props validation (name and description are required)
8913
+ - Default retrieval configuration (numberOfResults defaults to 5)
8914
+ - ACL configuration storage
8915
+ - Base runtime configuration export
8916
+
8917
+ Subclasses must implement:
8918
+
8919
+ - ``generateIamPermissions()``: Return IAM permissions specific to the KB type
8920
+
8921
+ :stability: experimental
8922
+ '''
8923
+
8924
+ def __init__(
8925
+ self,
8926
+ scope: "_constructs_77d1e7e8.Construct",
8927
+ id: builtins.str,
8928
+ *,
8929
+ description: builtins.str,
8930
+ name: builtins.str,
8931
+ acl: typing.Optional[typing.Union["AclConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
8932
+ retrieval: typing.Optional[typing.Union["RetrievalConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
8933
+ ) -> None:
8934
+ '''(experimental) Creates a new BaseKnowledgeBase instance.
8935
+
8936
+ :param scope: - The scope in which to define this construct.
8937
+ :param id: - The scoped construct ID.
8938
+ :param description: (experimental) Description of what this knowledge base contains and when to use it. This description is shown to the agent in its system prompt to help it decide when to query this knowledge base. Be specific about the type of information contained and appropriate use cases.
8939
+ :param name: (experimental) Human-readable name/identifier for this knowledge base. Used for logging, display purposes, and to help the agent identify which knowledge base to query. Should be unique within the set of knowledge bases configured for an agent.
8940
+ :param acl: (experimental) Access control configuration for identity-aware retrieval. When enabled, retrieval queries will be filtered based on user identity context to ensure users only access permitted documents. Default: - ACL disabled
8941
+ :param retrieval: (experimental) Retrieval configuration options. Controls the number of results returned and optional metadata filtering. Default: { numberOfResults: 5 }
8942
+
8943
+ :stability: experimental
8944
+ :throws: Error if description is empty or not provided
8945
+ '''
8946
+ if __debug__:
8947
+ type_hints = typing.get_type_hints(_typecheckingstub__1ffdc1300a392d74aedab074831b812725fc7d9f0b3c025e42cefd06be3e3273)
8948
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
8949
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
8950
+ props = BaseKnowledgeBaseProps(
8951
+ description=description, name=name, acl=acl, retrieval=retrieval
8952
+ )
8953
+
8954
+ jsii.create(self.__class__, self, [scope, id, props])
8955
+
8956
+ @jsii.member(jsii_name="exportConfiguration")
8957
+ def export_configuration(self) -> "KnowledgeBaseRuntimeConfig":
8958
+ '''(experimental) Export configuration for runtime use by the retrieval tool.
8959
+
8960
+ Returns a configuration object containing the base knowledge base
8961
+ settings. Subclasses should override this method to add implementation-
8962
+ specific configuration, calling super.exportConfiguration() to include
8963
+ the base configuration.
8964
+
8965
+ :return: Runtime configuration object for the retrieval tool
8966
+
8967
+ :stability: experimental
8968
+ '''
8969
+ return typing.cast("KnowledgeBaseRuntimeConfig", jsii.invoke(self, "exportConfiguration", []))
8970
+
8971
+ @jsii.member(jsii_name="generateIamPermissions")
8972
+ @abc.abstractmethod
8973
+ def generate_iam_permissions(
8974
+ self,
8975
+ ) -> typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"]:
8976
+ '''(experimental) Generate IAM policy statements required for accessing this knowledge base.
8977
+
8978
+ This abstract method must be implemented by subclasses to return the
8979
+ specific IAM permissions needed for their knowledge base type.
8980
+
8981
+ :return: Array of IAM PolicyStatement objects granting necessary permissions
8982
+
8983
+ :stability: experimental
8984
+ '''
8985
+ ...
8986
+
8987
+ @jsii.member(jsii_name="retrievalToolAsset")
8988
+ def retrieval_tool_asset(
8989
+ self,
8990
+ ) -> typing.Optional["_aws_cdk_aws_s3_assets_ceddda9d.Asset"]:
8991
+ '''(experimental) Provide the retrieval tool asset for this knowledge base type.
8992
+
8993
+ By default, returns undefined to use the framework's default retrieval
8994
+ tool. Subclasses can override this method to provide a custom retrieval
8995
+ tool implementation.
8996
+
8997
+ :return: undefined to use the default retrieval tool
8998
+
8999
+ :stability: experimental
9000
+ '''
9001
+ return typing.cast(typing.Optional["_aws_cdk_aws_s3_assets_ceddda9d.Asset"], jsii.invoke(self, "retrievalToolAsset", []))
9002
+
9003
+ @jsii.member(jsii_name="retrievalToolLayers")
9004
+ def retrieval_tool_layers(
9005
+ self,
9006
+ ) -> typing.Optional[typing.List["_aws_cdk_aws_lambda_ceddda9d.LayerVersion"]]:
9007
+ '''(experimental) Provide Lambda layers required by the retrieval tool.
9008
+
9009
+ By default, returns undefined indicating no additional layers are needed.
9010
+ Subclasses can override this method to provide Lambda layers containing
9011
+ dependencies required by their retrieval tool.
9012
+
9013
+ :return: undefined indicating no additional layers needed
9014
+
9015
+ :stability: experimental
9016
+ '''
9017
+ return typing.cast(typing.Optional[typing.List["_aws_cdk_aws_lambda_ceddda9d.LayerVersion"]], jsii.invoke(self, "retrievalToolLayers", []))
9018
+
9019
+ @jsii.member(jsii_name="validateProps")
9020
+ def _validate_props(
9021
+ self,
9022
+ *,
9023
+ description: builtins.str,
9024
+ name: builtins.str,
9025
+ acl: typing.Optional[typing.Union["AclConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
9026
+ retrieval: typing.Optional[typing.Union["RetrievalConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
9027
+ ) -> None:
9028
+ '''(experimental) Validates the provided props at construction time.
9029
+
9030
+ Ensures that required fields (name and description) are provided
9031
+ and not empty. Subclasses can override this method to add additional
9032
+ validation, but should call super.validateProps() first.
9033
+
9034
+ :param description: (experimental) Description of what this knowledge base contains and when to use it. This description is shown to the agent in its system prompt to help it decide when to query this knowledge base. Be specific about the type of information contained and appropriate use cases.
9035
+ :param name: (experimental) Human-readable name/identifier for this knowledge base. Used for logging, display purposes, and to help the agent identify which knowledge base to query. Should be unique within the set of knowledge bases configured for an agent.
9036
+ :param acl: (experimental) Access control configuration for identity-aware retrieval. When enabled, retrieval queries will be filtered based on user identity context to ensure users only access permitted documents. Default: - ACL disabled
9037
+ :param retrieval: (experimental) Retrieval configuration options. Controls the number of results returned and optional metadata filtering. Default: { numberOfResults: 5 }
9038
+
9039
+ :stability: experimental
9040
+ :throws: Error if description is empty or not provided
9041
+ '''
9042
+ props = BaseKnowledgeBaseProps(
9043
+ description=description, name=name, acl=acl, retrieval=retrieval
9044
+ )
9045
+
9046
+ return typing.cast(None, jsii.invoke(self, "validateProps", [props]))
9047
+
9048
+ @builtins.property
9049
+ @jsii.member(jsii_name="description")
9050
+ def description(self) -> builtins.str:
9051
+ '''(experimental) Human-readable description of what this knowledge base contains.
9052
+
9053
+ This description is included in the agent's system prompt to help
9054
+ the agent decide when to query this knowledge base.
9055
+
9056
+ :stability: experimental
9057
+ '''
9058
+ return typing.cast(builtins.str, jsii.get(self, "description"))
9059
+
9060
+ @builtins.property
9061
+ @jsii.member(jsii_name="name")
9062
+ def name(self) -> builtins.str:
9063
+ '''(experimental) Human-readable name for this knowledge base.
9064
+
9065
+ This name is used for logging, display purposes, and to help the agent
9066
+ identify which knowledge base to query.
9067
+
9068
+ :stability: experimental
9069
+ '''
9070
+ return typing.cast(builtins.str, jsii.get(self, "name"))
9071
+
9072
+ @builtins.property
9073
+ @jsii.member(jsii_name="retrievalConfig")
9074
+ def _retrieval_config(self) -> "RetrievalConfiguration":
9075
+ '''(experimental) Retrieval configuration for this knowledge base.
9076
+
9077
+ Contains settings like numberOfResults and optional metadata filters.
9078
+ Defaults to { numberOfResults: 5 } if not provided.
9079
+
9080
+ :stability: experimental
9081
+ '''
9082
+ return typing.cast("RetrievalConfiguration", jsii.get(self, "retrievalConfig"))
9083
+
9084
+ @builtins.property
9085
+ @jsii.member(jsii_name="aclConfig")
9086
+ def _acl_config(self) -> typing.Optional["AclConfiguration"]:
9087
+ '''(experimental) ACL configuration for identity-aware retrieval.
9088
+
9089
+ When enabled, retrieval queries will be filtered based on user
9090
+ identity context.
9091
+
9092
+ :stability: experimental
9093
+ '''
9094
+ return typing.cast(typing.Optional["AclConfiguration"], jsii.get(self, "aclConfig"))
9095
+
9096
+
9097
+ class _BaseKnowledgeBaseProxy(BaseKnowledgeBase):
9098
+ @jsii.member(jsii_name="generateIamPermissions")
9099
+ def generate_iam_permissions(
9100
+ self,
9101
+ ) -> typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"]:
9102
+ '''(experimental) Generate IAM policy statements required for accessing this knowledge base.
9103
+
9104
+ This abstract method must be implemented by subclasses to return the
9105
+ specific IAM permissions needed for their knowledge base type.
9106
+
9107
+ :return: Array of IAM PolicyStatement objects granting necessary permissions
9108
+
9109
+ :stability: experimental
9110
+ '''
9111
+ return typing.cast(typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"], jsii.invoke(self, "generateIamPermissions", []))
9112
+
9113
+ # Adding a "__jsii_proxy_class__(): typing.Type" function to the abstract class
9114
+ typing.cast(typing.Any, BaseKnowledgeBase).__jsii_proxy_class__ = lambda : _BaseKnowledgeBaseProxy
9115
+
9116
+
7487
9117
  @jsii.data_type(
7488
9118
  jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.BatchAgentProps",
7489
9119
  jsii_struct_bases=[BaseAgentProps],
@@ -7499,6 +9129,7 @@ class BaseDocumentProcessingProps(ObservableProps):
7499
9129
  "removal_policy": "removalPolicy",
7500
9130
  "prompt": "prompt",
7501
9131
  "expect_json": "expectJson",
9132
+ "invoke_type": "invokeType",
7502
9133
  },
7503
9134
  )
7504
9135
  class BatchAgentProps(BaseAgentProps):
@@ -7516,6 +9147,7 @@ class BatchAgentProps(BaseAgentProps):
7516
9147
  removal_policy: typing.Optional["_aws_cdk_ceddda9d.RemovalPolicy"] = None,
7517
9148
  prompt: builtins.str,
7518
9149
  expect_json: typing.Optional[builtins.bool] = None,
9150
+ invoke_type: typing.Optional["InvokeType"] = None,
7519
9151
  ) -> None:
7520
9152
  '''
7521
9153
  :param log_group_data_protection: (experimental) Data protection related configuration. Default: a new KMS key would be generated
@@ -7529,6 +9161,7 @@ class BatchAgentProps(BaseAgentProps):
7529
9161
  :param removal_policy: (experimental) Removal policy for resources created by this construct. Default: RemovalPolicy.DESTROY
7530
9162
  :param prompt:
7531
9163
  :param expect_json:
9164
+ :param invoke_type: (experimental) Agent invocation type. Defines how the agent is invoked and what processing mode to use. Default: InvokeType.BATCH
7532
9165
 
7533
9166
  :stability: experimental
7534
9167
  '''
@@ -7549,6 +9182,7 @@ class BatchAgentProps(BaseAgentProps):
7549
9182
  check_type(argname="argument removal_policy", value=removal_policy, expected_type=type_hints["removal_policy"])
7550
9183
  check_type(argname="argument prompt", value=prompt, expected_type=type_hints["prompt"])
7551
9184
  check_type(argname="argument expect_json", value=expect_json, expected_type=type_hints["expect_json"])
9185
+ check_type(argname="argument invoke_type", value=invoke_type, expected_type=type_hints["invoke_type"])
7552
9186
  self._values: typing.Dict[builtins.str, typing.Any] = {
7553
9187
  "agent_definition": agent_definition,
7554
9188
  "agent_name": agent_name,
@@ -7570,6 +9204,8 @@ class BatchAgentProps(BaseAgentProps):
7570
9204
  self._values["removal_policy"] = removal_policy
7571
9205
  if expect_json is not None:
7572
9206
  self._values["expect_json"] = expect_json
9207
+ if invoke_type is not None:
9208
+ self._values["invoke_type"] = invoke_type
7573
9209
 
7574
9210
  @builtins.property
7575
9211
  def log_group_data_protection(
@@ -7687,6 +9323,19 @@ class BatchAgentProps(BaseAgentProps):
7687
9323
  result = self._values.get("expect_json")
7688
9324
  return typing.cast(typing.Optional[builtins.bool], result)
7689
9325
 
9326
+ @builtins.property
9327
+ def invoke_type(self) -> typing.Optional["InvokeType"]:
9328
+ '''(experimental) Agent invocation type.
9329
+
9330
+ Defines how the agent is invoked and what processing mode to use.
9331
+
9332
+ :default: InvokeType.BATCH
9333
+
9334
+ :stability: experimental
9335
+ '''
9336
+ result = self._values.get("invoke_type")
9337
+ return typing.cast(typing.Optional["InvokeType"], result)
9338
+
7690
9339
  def __eq__(self, rhs: typing.Any) -> builtins.bool:
7691
9340
  return isinstance(rhs, self.__class__) and rhs._values == self._values
7692
9341
 
@@ -8504,6 +10153,158 @@ class BedrockDocumentProcessingProps(BaseDocumentProcessingProps):
8504
10153
  )
8505
10154
 
8506
10155
 
10156
+ class BedrockKnowledgeBase(
10157
+ BaseKnowledgeBase,
10158
+ metaclass=jsii.JSIIMeta,
10159
+ jsii_type="@cdklabs/cdk-appmod-catalog-blueprints.BedrockKnowledgeBase",
10160
+ ):
10161
+ '''(experimental) Amazon Bedrock Knowledge Base implementation.
10162
+
10163
+ This class provides integration with Amazon Bedrock Knowledge Bases,
10164
+ which use vector stores (S3 Vectors by default) for semantic search.
10165
+ It is the default knowledge base implementation when none is specified.
10166
+
10167
+ The implementation handles:
10168
+
10169
+ - ARN construction from knowledge base ID (if ARN not provided)
10170
+ - IAM permission generation for Bedrock Retrieve and RetrieveAndGenerate APIs
10171
+ - Optional guardrail configuration for content filtering
10172
+ - Runtime configuration export for the retrieval tool
10173
+
10174
+ :stability: experimental
10175
+ '''
10176
+
10177
+ def __init__(
10178
+ self,
10179
+ scope: "_constructs_77d1e7e8.Construct",
10180
+ id: builtins.str,
10181
+ *,
10182
+ knowledge_base_id: builtins.str,
10183
+ create: typing.Optional[typing.Union["CreateKnowledgeBaseConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
10184
+ guardrail: typing.Optional[typing.Union["GuardrailConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
10185
+ knowledge_base_arn: typing.Optional[builtins.str] = None,
10186
+ vector_store: typing.Optional[typing.Union["VectorStoreConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
10187
+ description: builtins.str,
10188
+ name: builtins.str,
10189
+ acl: typing.Optional[typing.Union["AclConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
10190
+ retrieval: typing.Optional[typing.Union["RetrievalConfiguration", typing.Dict[builtins.str, typing.Any]]] = None,
10191
+ ) -> None:
10192
+ '''(experimental) Creates a new BedrockKnowledgeBase instance.
10193
+
10194
+ :param scope: - The scope in which to define this construct.
10195
+ :param id: - The scoped construct ID.
10196
+ :param knowledge_base_id: (experimental) Unique identifier for the Bedrock Knowledge Base. This is the ID assigned by Bedrock when the knowledge base was created. You can find this in the Bedrock console or via the AWS CLI. Required when referencing an existing knowledge base. Not required when using the ``create`` property to create a new KB.
10197
+ :param create: (experimental) Configuration for creating a new knowledge base. When provided, a new Bedrock Knowledge Base will be created with the specified data source and embedding configuration. Note: This is an advanced feature that creates AWS resources. For most use cases, referencing an existing knowledge base by ID is recommended. Default: - Reference existing KB only (no creation)
10198
+ :param guardrail: (experimental) Guardrail configuration for content filtering. When configured, the guardrail will be applied during retrieval operations to filter inappropriate or sensitive content. Default: - No guardrail applied
10199
+ :param knowledge_base_arn: (experimental) ARN of the Bedrock Knowledge Base. If not provided, the ARN will be constructed from the knowledgeBaseId using the current region and account. Default: - Constructed from knowledgeBaseId
10200
+ :param vector_store: (experimental) Vector store configuration. Defines the type of vector store used by this knowledge base. This is informational and used for generating appropriate IAM permissions when needed. Default: - S3 Vectors (type: 's3-vectors')
10201
+ :param description: (experimental) Description of what this knowledge base contains and when to use it. This description is shown to the agent in its system prompt to help it decide when to query this knowledge base. Be specific about the type of information contained and appropriate use cases.
10202
+ :param name: (experimental) Human-readable name/identifier for this knowledge base. Used for logging, display purposes, and to help the agent identify which knowledge base to query. Should be unique within the set of knowledge bases configured for an agent.
10203
+ :param acl: (experimental) Access control configuration for identity-aware retrieval. When enabled, retrieval queries will be filtered based on user identity context to ensure users only access permitted documents. Default: - ACL disabled
10204
+ :param retrieval: (experimental) Retrieval configuration options. Controls the number of results returned and optional metadata filtering. Default: { numberOfResults: 5 }
10205
+
10206
+ :stability: experimental
10207
+ :throws: Error if knowledgeBaseId is empty or not provided
10208
+ '''
10209
+ if __debug__:
10210
+ type_hints = typing.get_type_hints(_typecheckingstub__881273bf12c7a325cf85df5cec4c868a102b3e1454218addb9ce294190f2a295)
10211
+ check_type(argname="argument scope", value=scope, expected_type=type_hints["scope"])
10212
+ check_type(argname="argument id", value=id, expected_type=type_hints["id"])
10213
+ props = BedrockKnowledgeBaseProps(
10214
+ knowledge_base_id=knowledge_base_id,
10215
+ create=create,
10216
+ guardrail=guardrail,
10217
+ knowledge_base_arn=knowledge_base_arn,
10218
+ vector_store=vector_store,
10219
+ description=description,
10220
+ name=name,
10221
+ acl=acl,
10222
+ retrieval=retrieval,
10223
+ )
10224
+
10225
+ jsii.create(self.__class__, self, [scope, id, props])
10226
+
10227
+ @jsii.member(jsii_name="exportConfiguration")
10228
+ def export_configuration(self) -> "KnowledgeBaseRuntimeConfig":
10229
+ '''(experimental) Export configuration for runtime use by the retrieval tool.
10230
+
10231
+ Returns a configuration object containing all Bedrock-specific
10232
+ settings needed to query the knowledge base at runtime, including:
10233
+
10234
+ - Base configuration (name, description, retrieval, acl)
10235
+ - Knowledge base type ('bedrock')
10236
+ - Knowledge base ID and ARN
10237
+ - Vector store configuration
10238
+ - Guardrail configuration (if present)
10239
+
10240
+ :return: Runtime configuration object for the retrieval tool
10241
+
10242
+ :stability: experimental
10243
+ '''
10244
+ return typing.cast("KnowledgeBaseRuntimeConfig", jsii.invoke(self, "exportConfiguration", []))
10245
+
10246
+ @jsii.member(jsii_name="generateIamPermissions")
10247
+ def generate_iam_permissions(
10248
+ self,
10249
+ ) -> typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"]:
10250
+ '''(experimental) Generate IAM policy statements required for accessing this Bedrock Knowledge Base.
10251
+
10252
+ Returns permissions for:
10253
+
10254
+ - bedrock:Retrieve - Query the knowledge base
10255
+ - bedrock:RetrieveAndGenerate - Query and generate responses
10256
+ - bedrock:ApplyGuardrail - Apply guardrail (if configured)
10257
+ - s3:GetObject - Access S3 vectors (if using S3 Vectors with custom bucket)
10258
+ - s3:GetObject - Access data source bucket (if create config provided)
10259
+
10260
+ All permissions are scoped to the specific knowledge base ARN
10261
+ following the principle of least privilege.
10262
+
10263
+ :return: Array of IAM PolicyStatement objects granting necessary permissions
10264
+
10265
+ :stability: experimental
10266
+ '''
10267
+ return typing.cast(typing.List["_aws_cdk_aws_iam_ceddda9d.PolicyStatement"], jsii.invoke(self, "generateIamPermissions", []))
10268
+
10269
+ @jsii.member(jsii_name="retrievalToolAsset")
10270
+ def retrieval_tool_asset(self) -> "_aws_cdk_aws_s3_assets_ceddda9d.Asset":
10271
+ '''(experimental) Provide the Bedrock-specific retrieval tool asset.
10272
+
10273
+ Returns an Asset containing the Python retrieval tool that uses
10274
+ the Amazon Bedrock Agent Runtime API to query knowledge bases.
10275
+ This tool is automatically added to agents that use Bedrock
10276
+ knowledge bases.
10277
+
10278
+ :return: Asset containing the Bedrock retrieval tool
10279
+
10280
+ :stability: experimental
10281
+ '''
10282
+ return typing.cast("_aws_cdk_aws_s3_assets_ceddda9d.Asset", jsii.invoke(self, "retrievalToolAsset", []))
10283
+
10284
+ @builtins.property
10285
+ @jsii.member(jsii_name="knowledgeBaseArn")
10286
+ def knowledge_base_arn(self) -> builtins.str:
10287
+ '''(experimental) The ARN of the Bedrock Knowledge Base.
10288
+
10289
+ If not provided in props, this is constructed from the knowledgeBaseId
10290
+ using the current region and account.
10291
+
10292
+ :stability: experimental
10293
+ '''
10294
+ return typing.cast(builtins.str, jsii.get(self, "knowledgeBaseArn"))
10295
+
10296
+ @builtins.property
10297
+ @jsii.member(jsii_name="knowledgeBaseId")
10298
+ def knowledge_base_id(self) -> builtins.str:
10299
+ '''(experimental) The unique identifier for the Bedrock Knowledge Base.
10300
+
10301
+ This is the ID assigned by Bedrock when the knowledge base was created.
10302
+
10303
+ :stability: experimental
10304
+ '''
10305
+ return typing.cast(builtins.str, jsii.get(self, "knowledgeBaseId"))
10306
+
10307
+
8507
10308
  class AgenticDocumentProcessing(
8508
10309
  BedrockDocumentProcessing,
8509
10310
  metaclass=jsii.JSIIMeta,
@@ -9101,6 +10902,7 @@ class AgenticDocumentProcessingProps(BedrockDocumentProcessingProps):
9101
10902
  __all__ = [
9102
10903
  "AccessLog",
9103
10904
  "AccessLogProps",
10905
+ "AclConfiguration",
9104
10906
  "AdditionalDistributionProps",
9105
10907
  "AgentDefinitionProps",
9106
10908
  "AgentToolsLocationDefinition",
@@ -9112,11 +10914,15 @@ __all__ = [
9112
10914
  "BaseAgentProps",
9113
10915
  "BaseDocumentProcessing",
9114
10916
  "BaseDocumentProcessingProps",
10917
+ "BaseKnowledgeBase",
10918
+ "BaseKnowledgeBaseProps",
9115
10919
  "BatchAgent",
9116
10920
  "BatchAgentProps",
9117
10921
  "BedrockCrossRegionInferencePrefix",
9118
10922
  "BedrockDocumentProcessing",
9119
10923
  "BedrockDocumentProcessingProps",
10924
+ "BedrockKnowledgeBase",
10925
+ "BedrockKnowledgeBaseProps",
9120
10926
  "BedrockModelProps",
9121
10927
  "BedrockModelUtils",
9122
10928
  "ChunkClassificationResult",
@@ -9131,6 +10937,7 @@ __all__ = [
9131
10937
  "CleanupRequest",
9132
10938
  "CleanupResponse",
9133
10939
  "CloudfrontDistributionObservabilityPropertyInjector",
10940
+ "CreateKnowledgeBaseConfiguration",
9134
10941
  "CustomDomainConfig",
9135
10942
  "DataLoader",
9136
10943
  "DataLoaderProps",
@@ -9149,9 +10956,13 @@ __all__ = [
9149
10956
  "FixedPagesConfig",
9150
10957
  "Frontend",
9151
10958
  "FrontendProps",
10959
+ "GuardrailConfiguration",
9152
10960
  "HybridConfig",
9153
10961
  "IAdapter",
10962
+ "IKnowledgeBase",
9154
10963
  "IObservable",
10964
+ "InvokeType",
10965
+ "KnowledgeBaseRuntimeConfig",
9155
10966
  "LambdaIamUtils",
9156
10967
  "LambdaIamUtilsStackInfo",
9157
10968
  "LambdaLogsPermissionsProps",
@@ -9166,9 +10977,11 @@ __all__ = [
9166
10977
  "PowertoolsConfig",
9167
10978
  "QueuedS3Adapter",
9168
10979
  "QueuedS3AdapterProps",
10980
+ "RetrievalConfiguration",
9169
10981
  "StateMachineObservabilityPropertyInjector",
9170
10982
  "TokenAnalysis",
9171
10983
  "TokenBasedConfig",
10984
+ "VectorStoreConfiguration",
9172
10985
  ]
9173
10986
 
9174
10987
  publication.publish()
@@ -9209,6 +11022,14 @@ def _typecheckingstub__b0d5807bf69e9243b9fd452b7437cfe9f4102d78752673f223f3ae140
9209
11022
  """Type checking stubs"""
9210
11023
  pass
9211
11024
 
11025
+ def _typecheckingstub__899807b7dca2d7be5f310df5984cd7a0c5fe3c612a8995f0927c15acbec703da(
11026
+ *,
11027
+ enabled: builtins.bool,
11028
+ metadata_field: typing.Optional[builtins.str] = None,
11029
+ ) -> None:
11030
+ """Type checking stubs"""
11031
+ pass
11032
+
9212
11033
  def _typecheckingstub__14d3ed5928e5166082cd47a907ab754473c20bb045dc424135b4690811543601(
9213
11034
  *,
9214
11035
  comment: typing.Optional[builtins.str] = None,
@@ -9223,7 +11044,9 @@ def _typecheckingstub__4a2d1deab0cc9bf96473ffb32138a2c564c47ae7382fe5d2d1f0e43da
9223
11044
  *,
9224
11045
  bedrock_model: typing.Union[BedrockModelProps, typing.Dict[builtins.str, typing.Any]],
9225
11046
  system_prompt: _aws_cdk_aws_s3_assets_ceddda9d.Asset,
11047
+ additional_policy_statements_for_knowledge_bases: typing.Optional[typing.Sequence[_aws_cdk_aws_iam_ceddda9d.PolicyStatement]] = None,
9226
11048
  additional_policy_statements_for_tools: typing.Optional[typing.Sequence[_aws_cdk_aws_iam_ceddda9d.PolicyStatement]] = None,
11049
+ knowledge_bases: typing.Optional[typing.Sequence[IKnowledgeBase]] = None,
9227
11050
  lambda_layers: typing.Optional[typing.Sequence[_aws_cdk_aws_lambda_ceddda9d.LayerVersion]] = None,
9228
11051
  tools: typing.Optional[typing.Sequence[_aws_cdk_aws_s3_assets_ceddda9d.Asset]] = None,
9229
11052
  ) -> None:
@@ -9278,12 +11101,23 @@ def _typecheckingstub__71b734ed2750632299f59fd7513ccde0ee5f9974b68f8c52b53e2255c
9278
11101
  """Type checking stubs"""
9279
11102
  pass
9280
11103
 
11104
+ def _typecheckingstub__40fa4a59f1a0502756f07aba8d6cba5255e1743cbc160af92ff68cb3b17fef23(
11105
+ *,
11106
+ description: builtins.str,
11107
+ name: builtins.str,
11108
+ acl: typing.Optional[typing.Union[AclConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11109
+ retrieval: typing.Optional[typing.Union[RetrievalConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11110
+ ) -> None:
11111
+ """Type checking stubs"""
11112
+ pass
11113
+
9281
11114
  def _typecheckingstub__c2677306b18b77c5114d824ae734b83ac837c5ea4a5b8805948f0388f1dd7995(
9282
11115
  scope: _constructs_77d1e7e8.Construct,
9283
11116
  id: builtins.str,
9284
11117
  *,
9285
11118
  prompt: builtins.str,
9286
11119
  expect_json: typing.Optional[builtins.bool] = None,
11120
+ invoke_type: typing.Optional[InvokeType] = None,
9287
11121
  agent_definition: typing.Union[AgentDefinitionProps, typing.Dict[builtins.str, typing.Any]],
9288
11122
  agent_name: builtins.str,
9289
11123
  enable_observability: typing.Optional[builtins.bool] = None,
@@ -9297,6 +11131,21 @@ def _typecheckingstub__c2677306b18b77c5114d824ae734b83ac837c5ea4a5b8805948f0388f
9297
11131
  """Type checking stubs"""
9298
11132
  pass
9299
11133
 
11134
+ def _typecheckingstub__fa5a5937a282e8ddfa91598805b072febd3483c7f6ad9ed8eed9f52e4f0912e9(
11135
+ *,
11136
+ description: builtins.str,
11137
+ name: builtins.str,
11138
+ acl: typing.Optional[typing.Union[AclConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11139
+ retrieval: typing.Optional[typing.Union[RetrievalConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11140
+ knowledge_base_id: builtins.str,
11141
+ create: typing.Optional[typing.Union[CreateKnowledgeBaseConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11142
+ guardrail: typing.Optional[typing.Union[GuardrailConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11143
+ knowledge_base_arn: typing.Optional[builtins.str] = None,
11144
+ vector_store: typing.Optional[typing.Union[VectorStoreConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11145
+ ) -> None:
11146
+ """Type checking stubs"""
11147
+ pass
11148
+
9300
11149
  def _typecheckingstub__e45242c855c6631d66b287b02966cc10c7006e63b282779a6fdb35ce0a2a7a67(
9301
11150
  *,
9302
11151
  cross_region_inference_prefix: typing.Optional[BedrockCrossRegionInferencePrefix] = None,
@@ -9450,6 +11299,18 @@ def _typecheckingstub__2270aedab8c9db027e16b28fd9de8610d0f7e47778cdf1d501539d0e4
9450
11299
  """Type checking stubs"""
9451
11300
  pass
9452
11301
 
11302
+ def _typecheckingstub__5a66ad6b4c71f08ad11270f15622825326a8ae23d1f4b8349ee45ee1997ed029(
11303
+ *,
11304
+ data_source_bucket_name: builtins.str,
11305
+ chunking_strategy: typing.Optional[builtins.str] = None,
11306
+ data_source_prefix: typing.Optional[builtins.str] = None,
11307
+ embedding_model_id: typing.Optional[builtins.str] = None,
11308
+ max_tokens: typing.Optional[jsii.Number] = None,
11309
+ overlap_tokens: typing.Optional[jsii.Number] = None,
11310
+ ) -> None:
11311
+ """Type checking stubs"""
11312
+ pass
11313
+
9453
11314
  def _typecheckingstub__45e622c5dc8075e1ee5cdf9df72ea9b7ca33e0a7cf348dfaf54f93e635e9dde8(
9454
11315
  *,
9455
11316
  certificate: _aws_cdk_aws_certificatemanager_ceddda9d.ICertificate,
@@ -9608,6 +11469,14 @@ def _typecheckingstub__2648a6f2c6f02177f5b324264b7de549aa23b0c1d93c8d6cccbc307a8
9608
11469
  """Type checking stubs"""
9609
11470
  pass
9610
11471
 
11472
+ def _typecheckingstub__d604d1407a674dc8a1780469f6fca800816236372c95a3b5438a97e1c9faff32(
11473
+ *,
11474
+ guardrail_id: builtins.str,
11475
+ guardrail_version: typing.Optional[builtins.str] = None,
11476
+ ) -> None:
11477
+ """Type checking stubs"""
11478
+ pass
11479
+
9611
11480
  def _typecheckingstub__d99de61f167223b9a43c96878ed271835a461896851550035527119e8b896dfb(
9612
11481
  *,
9613
11482
  max_pages_per_chunk: typing.Optional[jsii.Number] = None,
@@ -9677,6 +11546,21 @@ def _typecheckingstub__17f7e7f35ea8e49cf6ded248435aa1e1dcf416e61c549f3e7b74baad3
9677
11546
  """Type checking stubs"""
9678
11547
  pass
9679
11548
 
11549
+ def _typecheckingstub__eba4c5624b16f91d89be2a09eeaf9e99f078cde0dfdfdaa2d50e663d366ce5a1(
11550
+ *,
11551
+ description: builtins.str,
11552
+ name: builtins.str,
11553
+ retrieval: typing.Union[RetrievalConfiguration, typing.Dict[builtins.str, typing.Any]],
11554
+ acl: typing.Optional[typing.Union[AclConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11555
+ guardrail: typing.Optional[typing.Union[GuardrailConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11556
+ knowledge_base_arn: typing.Optional[builtins.str] = None,
11557
+ knowledge_base_id: typing.Optional[builtins.str] = None,
11558
+ type: typing.Optional[builtins.str] = None,
11559
+ vector_store: typing.Optional[typing.Union[VectorStoreConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11560
+ ) -> None:
11561
+ """Type checking stubs"""
11562
+ pass
11563
+
9680
11564
  def _typecheckingstub__8fea74c9846ad0c5bdddcbfe10063247cb7bcf58aac91e0be80d1226246784e4(
9681
11565
  table_arn: builtins.str,
9682
11566
  actions: typing.Optional[typing.Sequence[builtins.str]] = None,
@@ -9947,6 +11831,14 @@ def _typecheckingstub__c2db7ec0d4b3e93062e1f20f29f9821e5a0fd526ecf05f9ccaa6db663
9947
11831
  """Type checking stubs"""
9948
11832
  pass
9949
11833
 
11834
+ def _typecheckingstub__0389e881defd6b748c16712149b25f1d6a9c2415742f6287f9424ffee6d97ac9(
11835
+ *,
11836
+ number_of_results: typing.Optional[jsii.Number] = None,
11837
+ retrieval_filter: typing.Optional[typing.Mapping[builtins.str, typing.Any]] = None,
11838
+ ) -> None:
11839
+ """Type checking stubs"""
11840
+ pass
11841
+
9950
11842
  def _typecheckingstub__011b55520774139b52c951d9cc59273f686e377b5415ee42a57650da571d43e7(
9951
11843
  original_props: typing.Any,
9952
11844
  *,
@@ -9975,6 +11867,15 @@ def _typecheckingstub__a334bfb54e6a69272a4fe5b2f56f0a97d104fadd629c1aeb6ce670eb3
9975
11867
  """Type checking stubs"""
9976
11868
  pass
9977
11869
 
11870
+ def _typecheckingstub__98230924b191ba0192b7d818a592221249c2b38f4ddd572cfc62d08a37b84b42(
11871
+ *,
11872
+ bucket_name: typing.Optional[builtins.str] = None,
11873
+ prefix: typing.Optional[builtins.str] = None,
11874
+ type: typing.Optional[builtins.str] = None,
11875
+ ) -> None:
11876
+ """Type checking stubs"""
11877
+ pass
11878
+
9978
11879
  def _typecheckingstub__feb650555d9014f75886d26d16787c0c2e83a042e7e61844bf4d21c890ce479c(
9979
11880
  *,
9980
11881
  log_group_data_protection: typing.Optional[typing.Union[LogGroupDataProtectionProps, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -10038,6 +11939,18 @@ def _typecheckingstub__75e07bce24d48571be58cad69f751b10a17a738fdb9db601acdc689ff
10038
11939
  """Type checking stubs"""
10039
11940
  pass
10040
11941
 
11942
+ def _typecheckingstub__1ffdc1300a392d74aedab074831b812725fc7d9f0b3c025e42cefd06be3e3273(
11943
+ scope: _constructs_77d1e7e8.Construct,
11944
+ id: builtins.str,
11945
+ *,
11946
+ description: builtins.str,
11947
+ name: builtins.str,
11948
+ acl: typing.Optional[typing.Union[AclConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11949
+ retrieval: typing.Optional[typing.Union[RetrievalConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
11950
+ ) -> None:
11951
+ """Type checking stubs"""
11952
+ pass
11953
+
10041
11954
  def _typecheckingstub__30511d5990f52f2808903d144bad5a5c502c00b0b8c98b4fd52a3df61c18b19d(
10042
11955
  *,
10043
11956
  log_group_data_protection: typing.Optional[typing.Union[LogGroupDataProtectionProps, typing.Dict[builtins.str, typing.Any]]] = None,
@@ -10051,6 +11964,7 @@ def _typecheckingstub__30511d5990f52f2808903d144bad5a5c502c00b0b8c98b4fd52a3df61
10051
11964
  removal_policy: typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy] = None,
10052
11965
  prompt: builtins.str,
10053
11966
  expect_json: typing.Optional[builtins.bool] = None,
11967
+ invoke_type: typing.Optional[InvokeType] = None,
10054
11968
  ) -> None:
10055
11969
  """Type checking stubs"""
10056
11970
  pass
@@ -10121,6 +12035,23 @@ def _typecheckingstub__9606a6418d69bde20176ec33b27eaa22c0e0cdb6b105d382e9d038566
10121
12035
  """Type checking stubs"""
10122
12036
  pass
10123
12037
 
12038
+ def _typecheckingstub__881273bf12c7a325cf85df5cec4c868a102b3e1454218addb9ce294190f2a295(
12039
+ scope: _constructs_77d1e7e8.Construct,
12040
+ id: builtins.str,
12041
+ *,
12042
+ knowledge_base_id: builtins.str,
12043
+ create: typing.Optional[typing.Union[CreateKnowledgeBaseConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
12044
+ guardrail: typing.Optional[typing.Union[GuardrailConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
12045
+ knowledge_base_arn: typing.Optional[builtins.str] = None,
12046
+ vector_store: typing.Optional[typing.Union[VectorStoreConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
12047
+ description: builtins.str,
12048
+ name: builtins.str,
12049
+ acl: typing.Optional[typing.Union[AclConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
12050
+ retrieval: typing.Optional[typing.Union[RetrievalConfiguration, typing.Dict[builtins.str, typing.Any]]] = None,
12051
+ ) -> None:
12052
+ """Type checking stubs"""
12053
+ pass
12054
+
10124
12055
  def _typecheckingstub__b7f396236f637ec7234d81b355cf773497392b537455f3d888c4b7170ceed70a(
10125
12056
  scope: _constructs_77d1e7e8.Construct,
10126
12057
  id: builtins.str,
@@ -10179,5 +12110,5 @@ def _typecheckingstub__da9ccab0035a06d18b5aa3f2de69201b3bbd6e30f7707a291977a0e4f
10179
12110
  """Type checking stubs"""
10180
12111
  pass
10181
12112
 
10182
- for cls in [IAdapter, IObservable]:
12113
+ for cls in [IAdapter, IKnowledgeBase, IObservable]:
10183
12114
  typing.cast(typing.Any, cls).__protocol_attrs__ = typing.cast(typing.Any, cls).__protocol_attrs__ - set(['__jsii_proxy_class__', '__jsii_type__'])