1{
2  "version":"2.0",
3  "metadata":{
4    "apiVersion":"2023-07-26",
5    "endpointPrefix":"bedrock-agent-runtime",
6    "jsonVersion":"1.1",
7    "protocol":"rest-json",
8    "serviceFullName":"Agents for Amazon Bedrock Runtime",
9    "serviceId":"Bedrock Agent Runtime",
10    "signatureVersion":"v4",
11    "signingName":"bedrock",
12    "uid":"bedrock-agent-runtime-2023-07-26"
13  },
14  "operations":{
15    "InvokeAgent":{
16      "name":"InvokeAgent",
17      "http":{
18        "method":"POST",
19        "requestUri":"/agents/{agentId}/agentAliases/{agentAliasId}/sessions/{sessionId}/text",
20        "responseCode":200
21      },
22      "input":{"shape":"InvokeAgentRequest"},
23      "output":{"shape":"InvokeAgentResponse"},
24      "errors":[
25        {"shape":"ConflictException"},
26        {"shape":"ResourceNotFoundException"},
27        {"shape":"ValidationException"},
28        {"shape":"InternalServerException"},
29        {"shape":"DependencyFailedException"},
30        {"shape":"BadGatewayException"},
31        {"shape":"ThrottlingException"},
32        {"shape":"AccessDeniedException"},
33        {"shape":"ServiceQuotaExceededException"}
34      ],
35      "documentation":"<p>Invokes the specified Bedrock model to run inference using the input provided in the request body.</p>"
36    },
37    "Retrieve":{
38      "name":"Retrieve",
39      "http":{
40        "method":"POST",
41        "requestUri":"/knowledgebases/{knowledgeBaseId}/retrieve",
42        "responseCode":200
43      },
44      "input":{"shape":"RetrieveRequest"},
45      "output":{"shape":"RetrieveResponse"},
46      "errors":[
47        {"shape":"ConflictException"},
48        {"shape":"ResourceNotFoundException"},
49        {"shape":"ValidationException"},
50        {"shape":"InternalServerException"},
51        {"shape":"DependencyFailedException"},
52        {"shape":"BadGatewayException"},
53        {"shape":"ThrottlingException"},
54        {"shape":"AccessDeniedException"},
55        {"shape":"ServiceQuotaExceededException"}
56      ],
57      "documentation":"<p>Retrieve from knowledge base.</p>"
58    },
59    "RetrieveAndGenerate":{
60      "name":"RetrieveAndGenerate",
61      "http":{
62        "method":"POST",
63        "requestUri":"/retrieveAndGenerate",
64        "responseCode":200
65      },
66      "input":{"shape":"RetrieveAndGenerateRequest"},
67      "output":{"shape":"RetrieveAndGenerateResponse"},
68      "errors":[
69        {"shape":"ConflictException"},
70        {"shape":"ResourceNotFoundException"},
71        {"shape":"ValidationException"},
72        {"shape":"InternalServerException"},
73        {"shape":"DependencyFailedException"},
74        {"shape":"BadGatewayException"},
75        {"shape":"ThrottlingException"},
76        {"shape":"AccessDeniedException"},
77        {"shape":"ServiceQuotaExceededException"}
78      ],
79      "documentation":"<p>RetrieveAndGenerate API</p>"
80    }
81  },
82  "shapes":{
83    "AccessDeniedException":{
84      "type":"structure",
85      "members":{
86        "message":{"shape":"NonBlankString"}
87      },
88      "documentation":"<p>This exception is thrown when a request is denied per access permissions</p>",
89      "error":{
90        "httpStatusCode":403,
91        "senderFault":true
92      },
93      "exception":true
94    },
95    "ActionGroupInvocationInput":{
96      "type":"structure",
97      "members":{
98        "actionGroupName":{"shape":"ActionGroupName"},
99        "verb":{"shape":"Verb"},
100        "apiPath":{"shape":"ApiPath"},
101        "parameters":{"shape":"Parameters"},
102        "requestBody":{"shape":"RequestBody"}
103      },
104      "documentation":"<p>input to lambda used in action group</p>"
105    },
106    "ActionGroupInvocationOutput":{
107      "type":"structure",
108      "members":{
109        "text":{"shape":"ActionGroupOutputString"}
110      },
111      "documentation":"<p>output from lambda used in action group</p>"
112    },
113    "ActionGroupName":{
114      "type":"string",
115      "documentation":"<p>Agent Trace Action Group Name</p>",
116      "sensitive":true
117    },
118    "ActionGroupOutputString":{
119      "type":"string",
120      "documentation":"<p>Agent Trace Action Group Lambda Invocation Output String</p>",
121      "sensitive":true
122    },
123    "AgentAliasId":{
124      "type":"string",
125      "documentation":"<p>Identifier of the agent alias.</p>",
126      "max":10,
127      "min":0,
128      "pattern":"[0-9a-zA-Z]+"
129    },
130    "AgentId":{
131      "type":"string",
132      "documentation":"<p>Identifier of the agent.</p>",
133      "max":10,
134      "min":0,
135      "pattern":"[0-9a-zA-Z]+"
136    },
137    "ApiPath":{
138      "type":"string",
139      "documentation":"<p>Agent Trace Action Group API path</p>",
140      "sensitive":true
141    },
142    "Attribution":{
143      "type":"structure",
144      "members":{
145        "citations":{"shape":"Citations"}
146      },
147      "documentation":"<p>Citations associated with final agent response</p>"
148    },
149    "BadGatewayException":{
150      "type":"structure",
151      "members":{
152        "message":{"shape":"NonBlankString"},
153        "resourceName":{"shape":"NonBlankString"}
154      },
155      "documentation":"<p>This exception is thrown when a request fails due to dependency like Lambda, Bedrock, STS resource</p>",
156      "error":{"httpStatusCode":502},
157      "exception":true,
158      "fault":true
159    },
160    "BedrockModelArn":{
161      "type":"string",
162      "documentation":"<p>Arn of a Bedrock model.</p>",
163      "max":1011,
164      "min":20,
165      "pattern":"arn:aws(-[^:]+)?:bedrock:[a-z0-9-]{1,20}:(([0-9]{12}:custom-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}/[a-z0-9]{12})|(:foundation-model/[a-z0-9-]{1,63}[.]{1}[a-z0-9-]{1,63}))"
166    },
167    "Boolean":{
168      "type":"boolean",
169      "box":true
170    },
171    "Citation":{
172      "type":"structure",
173      "members":{
174        "generatedResponsePart":{"shape":"GeneratedResponsePart"},
175        "retrievedReferences":{"shape":"RetrievedReferences"}
176      },
177      "documentation":"<p>Citation associated with the agent response</p>"
178    },
179    "Citations":{
180      "type":"list",
181      "member":{"shape":"Citation"},
182      "documentation":"<p>List of citations</p>"
183    },
184    "ConflictException":{
185      "type":"structure",
186      "members":{
187        "message":{"shape":"NonBlankString"}
188      },
189      "documentation":"<p>This exception is thrown when there is a conflict performing an operation</p>",
190      "error":{
191        "httpStatusCode":409,
192        "senderFault":true
193      },
194      "exception":true
195    },
196    "ContentMap":{
197      "type":"map",
198      "key":{"shape":"String"},
199      "value":{"shape":"Parameters"},
200      "documentation":"<p>Content type paramter map</p>"
201    },
202    "CreationMode":{
203      "type":"string",
204      "documentation":"<p>indicates if agent uses default prompt or overriden prompt</p>",
205      "enum":[
206        "DEFAULT",
207        "OVERRIDDEN"
208      ]
209    },
210    "DependencyFailedException":{
211      "type":"structure",
212      "members":{
213        "message":{"shape":"NonBlankString"},
214        "resourceName":{"shape":"NonBlankString"}
215      },
216      "documentation":"<p>This exception is thrown when a request fails due to dependency like Lambda, Bedrock, STS resource due to a customer fault (i.e. bad configuration)</p>",
217      "error":{
218        "httpStatusCode":424,
219        "senderFault":true
220      },
221      "exception":true
222    },
223    "Double":{
224      "type":"double",
225      "box":true
226    },
227    "FailureReasonString":{
228      "type":"string",
229      "documentation":"<p>Agent Trace Failed Reason String</p>",
230      "sensitive":true
231    },
232    "FailureTrace":{
233      "type":"structure",
234      "members":{
235        "traceId":{"shape":"TraceId"},
236        "failureReason":{"shape":"FailureReasonString"}
237      },
238      "documentation":"<p>Trace Part which is emitted when agent trace could not be generated</p>",
239      "sensitive":true
240    },
241    "FinalResponse":{
242      "type":"structure",
243      "members":{
244        "text":{"shape":"FinalResponseString"}
245      },
246      "documentation":"<p>Agent finish output</p>"
247    },
248    "FinalResponseString":{
249      "type":"string",
250      "documentation":"<p>Agent Trace Action Group Lambda Invocation Output String</p>",
251      "sensitive":true
252    },
253    "GeneratedResponsePart":{
254      "type":"structure",
255      "members":{
256        "textResponsePart":{"shape":"TextResponsePart"}
257      },
258      "documentation":"<p>Generate response part</p>"
259    },
260    "InferenceConfiguration":{
261      "type":"structure",
262      "members":{
263        "temperature":{"shape":"Temperature"},
264        "topP":{"shape":"TopP"},
265        "topK":{"shape":"TopK"},
266        "maximumLength":{"shape":"MaximumLength"},
267        "stopSequences":{"shape":"StopSequences"}
268      },
269      "documentation":"<p>Configurations for controlling the inference response of an InvokeAgent API call</p>"
270    },
271    "InputText":{
272      "type":"string",
273      "documentation":"<p>Model text input</p>",
274      "max":25000000,
275      "min":0,
276      "sensitive":true
277    },
278    "InternalServerException":{
279      "type":"structure",
280      "members":{
281        "message":{"shape":"NonBlankString"}
282      },
283      "documentation":"<p>This exception is thrown if there was an unexpected error during processing of request</p>",
284      "error":{"httpStatusCode":500},
285      "exception":true,
286      "fault":true
287    },
288    "InvocationInput":{
289      "type":"structure",
290      "members":{
291        "traceId":{"shape":"TraceId"},
292        "invocationType":{"shape":"InvocationType"},
293        "actionGroupInvocationInput":{"shape":"ActionGroupInvocationInput"},
294        "knowledgeBaseLookupInput":{"shape":"KnowledgeBaseLookupInput"}
295      },
296      "documentation":"<p>Trace Part which contains input details for action group or knowledge base</p>",
297      "sensitive":true
298    },
299    "InvocationType":{
300      "type":"string",
301      "documentation":"<p>types of invocations</p>",
302      "enum":[
303        "ACTION_GROUP",
304        "KNOWLEDGE_BASE",
305        "FINISH"
306      ]
307    },
308    "InvokeAgentRequest":{
309      "type":"structure",
310      "required":[
311        "agentId",
312        "agentAliasId",
313        "sessionId",
314        "inputText"
315      ],
316      "members":{
317        "sessionState":{
318          "shape":"SessionState",
319          "documentation":"<p>Session state passed by customer. Base64 encoded json string representation of SessionState.</p>"
320        },
321        "agentId":{
322          "shape":"AgentId",
323          "documentation":"<p>Identifier for Agent</p>",
324          "location":"uri",
325          "locationName":"agentId"
326        },
327        "agentAliasId":{
328          "shape":"AgentAliasId",
329          "documentation":"<p>Identifier for Agent Alias</p>",
330          "location":"uri",
331          "locationName":"agentAliasId"
332        },
333        "sessionId":{
334          "shape":"SessionId",
335          "documentation":"<p>Identifier used for the current session</p>",
336          "location":"uri",
337          "locationName":"sessionId"
338        },
339        "endSession":{
340          "shape":"Boolean",
341          "documentation":"<p>End current session</p>"
342        },
343        "enableTrace":{
344          "shape":"Boolean",
345          "documentation":"<p>Enable agent trace events for improved debugging</p>"
346        },
347        "inputText":{
348          "shape":"InputText",
349          "documentation":"<p>Input data in the format specified in the Content-Type request header.</p>"
350        }
351      },
352      "documentation":"<p>InvokeAgent Request</p>"
353    },
354    "InvokeAgentResponse":{
355      "type":"structure",
356      "required":[
357        "completion",
358        "contentType",
359        "sessionId"
360      ],
361      "members":{
362        "completion":{
363          "shape":"ResponseStream",
364          "documentation":"<p>Inference response from the model in the format specified in the Content-Type response header.</p>"
365        },
366        "contentType":{
367          "shape":"MimeType",
368          "documentation":"<p>streaming response mimetype of the model</p>",
369          "location":"header",
370          "locationName":"x-amzn-bedrock-agent-content-type"
371        },
372        "sessionId":{
373          "shape":"SessionId",
374          "documentation":"<p>streaming response mimetype of the model</p>",
375          "location":"header",
376          "locationName":"x-amz-bedrock-agent-session-id"
377        }
378      },
379      "documentation":"<p>InvokeAgent Response</p>",
380      "payload":"completion"
381    },
382    "KmsKeyArn":{
383      "type":"string",
384      "documentation":"<p>A KMS key ARN</p>",
385      "max":2048,
386      "min":1,
387      "pattern":"arn:aws(|-cn|-us-gov):kms:[a-zA-Z0-9-]*:[0-9]{12}:key/[a-zA-Z0-9-]{36}"
388    },
389    "KnowledgeBaseId":{
390      "type":"string",
391      "documentation":"<p>Identifier of the KnowledgeBase</p>",
392      "max":10,
393      "min":0,
394      "pattern":"[0-9a-zA-Z]+"
395    },
396    "KnowledgeBaseLookupInput":{
397      "type":"structure",
398      "members":{
399        "text":{"shape":"KnowledgeBaseLookupInputString"},
400        "knowledgeBaseId":{"shape":"TraceKnowledgeBaseId"}
401      },
402      "documentation":"<p>Input to lambda used in action group</p>"
403    },
404    "KnowledgeBaseLookupInputString":{
405      "type":"string",
406      "documentation":"<p>Agent Trace Action Group Lambda Invocation Output String</p>",
407      "sensitive":true
408    },
409    "KnowledgeBaseLookupOutput":{
410      "type":"structure",
411      "members":{
412        "retrievedReferences":{"shape":"RetrievedReferences"}
413      },
414      "documentation":"<p>Input to lambda used in action group</p>"
415    },
416    "KnowledgeBaseQuery":{
417      "type":"structure",
418      "required":["text"],
419      "members":{
420        "text":{
421          "shape":"KnowledgeBaseQueryTextString",
422          "documentation":"<p>Knowledge base input query in text</p>"
423        }
424      },
425      "documentation":"<p>Knowledge base input query.</p>",
426      "sensitive":true
427    },
428    "KnowledgeBaseQueryTextString":{
429      "type":"string",
430      "max":1000,
431      "min":0
432    },
433    "KnowledgeBaseRetrievalConfiguration":{
434      "type":"structure",
435      "required":["vectorSearchConfiguration"],
436      "members":{
437        "vectorSearchConfiguration":{"shape":"KnowledgeBaseVectorSearchConfiguration"}
438      },
439      "documentation":"<p>Search parameters for retrieving from knowledge base.</p>"
440    },
441    "KnowledgeBaseRetrievalResult":{
442      "type":"structure",
443      "required":["content"],
444      "members":{
445        "content":{"shape":"RetrievalResultContent"},
446        "location":{"shape":"RetrievalResultLocation"},
447        "score":{
448          "shape":"Double",
449          "documentation":"<p>The relevance score of a result.</p>"
450        }
451      },
452      "documentation":"<p>Result item returned from a knowledge base retrieval.</p>"
453    },
454    "KnowledgeBaseRetrievalResults":{
455      "type":"list",
456      "member":{"shape":"KnowledgeBaseRetrievalResult"},
457      "documentation":"<p>List of knowledge base retrieval results</p>",
458      "sensitive":true
459    },
460    "KnowledgeBaseRetrieveAndGenerateConfiguration":{
461      "type":"structure",
462      "required":[
463        "knowledgeBaseId",
464        "modelArn"
465      ],
466      "members":{
467        "knowledgeBaseId":{"shape":"KnowledgeBaseId"},
468        "modelArn":{"shape":"BedrockModelArn"}
469      },
470      "documentation":"<p>Configurations for retrieval and generation for knowledge base.</p>"
471    },
472    "KnowledgeBaseVectorSearchConfiguration":{
473      "type":"structure",
474      "required":["numberOfResults"],
475      "members":{
476        "numberOfResults":{
477          "shape":"KnowledgeBaseVectorSearchConfigurationNumberOfResultsInteger",
478          "documentation":"<p>Top-K results to retrieve from knowledge base.</p>"
479        }
480      },
481      "documentation":"<p>Knowledge base vector search configuration</p>"
482    },
483    "KnowledgeBaseVectorSearchConfigurationNumberOfResultsInteger":{
484      "type":"integer",
485      "box":true,
486      "max":10,
487      "min":1
488    },
489    "LambdaArn":{
490      "type":"string",
491      "documentation":"<p>ARN of a Lambda.</p>"
492    },
493    "MaximumLength":{
494      "type":"integer",
495      "documentation":"<p>Maximum length of output</p>",
496      "box":true,
497      "max":4096,
498      "min":0
499    },
500    "MimeType":{
501      "type":"string",
502      "documentation":"<p>Content type of the request</p>"
503    },
504    "ModelInvocationInput":{
505      "type":"structure",
506      "members":{
507        "traceId":{"shape":"TraceId"},
508        "text":{"shape":"PromptText"},
509        "type":{"shape":"PromptType"},
510        "inferenceConfiguration":{"shape":"InferenceConfiguration"},
511        "overrideLambda":{"shape":"LambdaArn"},
512        "promptCreationMode":{"shape":"CreationMode"},
513        "parserMode":{"shape":"CreationMode"}
514      },
515      "documentation":"<p>Trace Part which contains information used to call Invoke Model</p>",
516      "sensitive":true
517    },
518    "NextToken":{
519      "type":"string",
520      "documentation":"<p>Opaque continuation token of previous paginated response.</p>",
521      "max":2048,
522      "min":1,
523      "pattern":"\\S*"
524    },
525    "NonBlankString":{
526      "type":"string",
527      "documentation":"<p>Non Blank String</p>",
528      "pattern":"[\\s\\S]*"
529    },
530    "Observation":{
531      "type":"structure",
532      "members":{
533        "traceId":{"shape":"TraceId"},
534        "type":{"shape":"Type"},
535        "actionGroupInvocationOutput":{"shape":"ActionGroupInvocationOutput"},
536        "knowledgeBaseLookupOutput":{"shape":"KnowledgeBaseLookupOutput"},
537        "finalResponse":{"shape":"FinalResponse"},
538        "repromptResponse":{"shape":"RepromptResponse"}
539      },
540      "documentation":"<p>Trace Part which contains output details for action group or knowledge base or final response</p>",
541      "sensitive":true
542    },
543    "OrchestrationTrace":{
544      "type":"structure",
545      "members":{
546        "rationale":{"shape":"Rationale"},
547        "invocationInput":{"shape":"InvocationInput"},
548        "observation":{"shape":"Observation"},
549        "modelInvocationInput":{"shape":"ModelInvocationInput"}
550      },
551      "documentation":"<p>Trace contains intermidate response during orchestration</p>",
552      "sensitive":true,
553      "union":true
554    },
555    "OutputString":{
556      "type":"string",
557      "documentation":"<p>Agent Trace Output String</p>",
558      "sensitive":true
559    },
560    "Parameter":{
561      "type":"structure",
562      "members":{
563        "name":{
564          "shape":"String",
565          "documentation":"<p>Name of parameter</p>"
566        },
567        "type":{
568          "shape":"String",
569          "documentation":"<p>Type of parameter</p>"
570        },
571        "value":{
572          "shape":"String",
573          "documentation":"<p>Value of parameter</p>"
574        }
575      },
576      "documentation":"<p>parameters included in action group invocation</p>"
577    },
578    "Parameters":{
579      "type":"list",
580      "member":{"shape":"Parameter"},
581      "documentation":"<p>list of parameters included in action group invocation</p>"
582    },
583    "PartBody":{
584      "type":"blob",
585      "documentation":"<p>PartBody of the payload in bytes</p>",
586      "max":1000000,
587      "min":0,
588      "sensitive":true
589    },
590    "PayloadPart":{
591      "type":"structure",
592      "members":{
593        "bytes":{"shape":"PartBody"},
594        "attribution":{"shape":"Attribution"}
595      },
596      "documentation":"<p>Base 64 endoded byte response</p>",
597      "event":true,
598      "sensitive":true
599    },
600    "PostProcessingModelInvocationOutput":{
601      "type":"structure",
602      "members":{
603        "traceId":{"shape":"TraceId"},
604        "parsedResponse":{"shape":"PostProcessingParsedResponse"}
605      },
606      "documentation":"<p>Trace Part which contains information related to postprocessing</p>",
607      "sensitive":true
608    },
609    "PostProcessingParsedResponse":{
610      "type":"structure",
611      "members":{
612        "text":{"shape":"OutputString"}
613      },
614      "documentation":"<p>Trace Part which contains information if preprocessing was successful</p>",
615      "sensitive":true
616    },
617    "PostProcessingTrace":{
618      "type":"structure",
619      "members":{
620        "modelInvocationInput":{"shape":"ModelInvocationInput"},
621        "modelInvocationOutput":{"shape":"PostProcessingModelInvocationOutput"}
622      },
623      "documentation":"<p>Trace Part which contains information related to post processing step</p>",
624      "sensitive":true,
625      "union":true
626    },
627    "PreProcessingModelInvocationOutput":{
628      "type":"structure",
629      "members":{
630        "traceId":{"shape":"TraceId"},
631        "parsedResponse":{"shape":"PreProcessingParsedResponse"}
632      },
633      "documentation":"<p>Trace Part which contains information related to preprocessing</p>",
634      "sensitive":true
635    },
636    "PreProcessingParsedResponse":{
637      "type":"structure",
638      "members":{
639        "rationale":{"shape":"RationaleString"},
640        "isValid":{
641          "shape":"Boolean",
642          "documentation":"<p>Boolean value</p>"
643        }
644      },
645      "documentation":"<p>Trace Part which contains information if preprocessing was successful</p>",
646      "sensitive":true
647    },
648    "PreProcessingTrace":{
649      "type":"structure",
650      "members":{
651        "modelInvocationInput":{"shape":"ModelInvocationInput"},
652        "modelInvocationOutput":{"shape":"PreProcessingModelInvocationOutput"}
653      },
654      "documentation":"<p>Trace Part which contains information related to preprocessing step</p>",
655      "sensitive":true,
656      "union":true
657    },
658    "PromptSessionAttributesMap":{
659      "type":"map",
660      "key":{"shape":"String"},
661      "value":{"shape":"String"},
662      "documentation":"<p>Session attributes that go to the prompt</p>"
663    },
664    "PromptText":{
665      "type":"string",
666      "documentation":"<p>Prompt Message</p>",
667      "sensitive":true
668    },
669    "PromptType":{
670      "type":"string",
671      "documentation":"<p>types of prompts</p>",
672      "enum":[
673        "PRE_PROCESSING",
674        "ORCHESTRATION",
675        "KNOWLEDGE_BASE_RESPONSE_GENERATION",
676        "POST_PROCESSING"
677      ]
678    },
679    "Rationale":{
680      "type":"structure",
681      "members":{
682        "traceId":{"shape":"TraceId"},
683        "text":{"shape":"RationaleString"}
684      },
685      "documentation":"<p>Trace Part which contains information related to reasoning</p>",
686      "sensitive":true
687    },
688    "RationaleString":{
689      "type":"string",
690      "documentation":"<p>Agent Trace Rationale String</p>",
691      "sensitive":true
692    },
693    "RepromptResponse":{
694      "type":"structure",
695      "members":{
696        "text":{
697          "shape":"String",
698          "documentation":"<p>Reprompt response text</p>"
699        },
700        "source":{"shape":"Source"}
701      },
702      "documentation":"<p>Observation information if there were reprompts</p>",
703      "sensitive":true
704    },
705    "RequestBody":{
706      "type":"structure",
707      "members":{
708        "content":{"shape":"ContentMap"}
709      },
710      "documentation":"<p>Request Body Content Map</p>"
711    },
712    "ResourceNotFoundException":{
713      "type":"structure",
714      "members":{
715        "message":{"shape":"NonBlankString"}
716      },
717      "documentation":"<p>This exception is thrown when a resource referenced by the operation does not exist</p>",
718      "error":{
719        "httpStatusCode":404,
720        "senderFault":true
721      },
722      "exception":true
723    },
724    "ResponseStream":{
725      "type":"structure",
726      "members":{
727        "chunk":{"shape":"PayloadPart"},
728        "trace":{"shape":"TracePart"},
729        "internalServerException":{"shape":"InternalServerException"},
730        "validationException":{"shape":"ValidationException"},
731        "resourceNotFoundException":{"shape":"ResourceNotFoundException"},
732        "serviceQuotaExceededException":{"shape":"ServiceQuotaExceededException"},
733        "throttlingException":{"shape":"ThrottlingException"},
734        "accessDeniedException":{"shape":"AccessDeniedException"},
735        "conflictException":{"shape":"ConflictException"},
736        "dependencyFailedException":{"shape":"DependencyFailedException"},
737        "badGatewayException":{"shape":"BadGatewayException"}
738      },
739      "documentation":"<p>Response body of is a stream</p>",
740      "eventstream":true
741    },
742    "RetrievalResultContent":{
743      "type":"structure",
744      "required":["text"],
745      "members":{
746        "text":{
747          "shape":"String",
748          "documentation":"<p>Content of a retrieval result in text</p>"
749        }
750      },
751      "documentation":"<p>Content of a retrieval result.</p>"
752    },
753    "RetrievalResultLocation":{
754      "type":"structure",
755      "required":["type"],
756      "members":{
757        "type":{"shape":"RetrievalResultLocationType"},
758        "s3Location":{"shape":"RetrievalResultS3Location"}
759      },
760      "documentation":"<p>The source location of a retrieval result.</p>"
761    },
762    "RetrievalResultLocationType":{
763      "type":"string",
764      "documentation":"<p>The location type of a retrieval result.</p>",
765      "enum":["S3"]
766    },
767    "RetrievalResultS3Location":{
768      "type":"structure",
769      "members":{
770        "uri":{
771          "shape":"String",
772          "documentation":"<p>URI of S3 location</p>"
773        }
774      },
775      "documentation":"<p>The S3 location of a retrieval result.</p>"
776    },
777    "RetrieveAndGenerateConfiguration":{
778      "type":"structure",
779      "required":["type"],
780      "members":{
781        "type":{"shape":"RetrieveAndGenerateType"},
782        "knowledgeBaseConfiguration":{"shape":"KnowledgeBaseRetrieveAndGenerateConfiguration"}
783      },
784      "documentation":"<p>Configures the retrieval and generation for the session.</p>"
785    },
786    "RetrieveAndGenerateInput":{
787      "type":"structure",
788      "required":["text"],
789      "members":{
790        "text":{
791          "shape":"RetrieveAndGenerateInputTextString",
792          "documentation":"<p>Customer input of the turn in text</p>"
793        }
794      },
795      "documentation":"<p>Customer input of the turn</p>",
796      "sensitive":true
797    },
798    "RetrieveAndGenerateInputTextString":{
799      "type":"string",
800      "max":1000,
801      "min":0
802    },
803    "RetrieveAndGenerateOutput":{
804      "type":"structure",
805      "required":["text"],
806      "members":{
807        "text":{
808          "shape":"String",
809          "documentation":"<p>Service response of the turn in text</p>"
810        }
811      },
812      "documentation":"<p>Service response of the turn</p>",
813      "sensitive":true
814    },
815    "RetrieveAndGenerateRequest":{
816      "type":"structure",
817      "required":["input"],
818      "members":{
819        "sessionId":{"shape":"SessionId"},
820        "input":{"shape":"RetrieveAndGenerateInput"},
821        "retrieveAndGenerateConfiguration":{"shape":"RetrieveAndGenerateConfiguration"},
822        "sessionConfiguration":{"shape":"RetrieveAndGenerateSessionConfiguration"}
823      }
824    },
825    "RetrieveAndGenerateResponse":{
826      "type":"structure",
827      "required":[
828        "sessionId",
829        "output"
830      ],
831      "members":{
832        "sessionId":{"shape":"SessionId"},
833        "output":{"shape":"RetrieveAndGenerateOutput"},
834        "citations":{"shape":"Citations"}
835      }
836    },
837    "RetrieveAndGenerateSessionConfiguration":{
838      "type":"structure",
839      "required":["kmsKeyArn"],
840      "members":{
841        "kmsKeyArn":{
842          "shape":"KmsKeyArn",
843          "documentation":"<p>The KMS key arn to encrypt the customer data of the session.</p>"
844        }
845      },
846      "documentation":"<p>Configures common parameters of the session.</p>"
847    },
848    "RetrieveAndGenerateType":{
849      "type":"string",
850      "documentation":"<p>The type of RetrieveAndGenerate.</p>",
851      "enum":["KNOWLEDGE_BASE"]
852    },
853    "RetrieveRequest":{
854      "type":"structure",
855      "required":[
856        "knowledgeBaseId",
857        "retrievalQuery"
858      ],
859      "members":{
860        "knowledgeBaseId":{
861          "shape":"KnowledgeBaseId",
862          "location":"uri",
863          "locationName":"knowledgeBaseId"
864        },
865        "retrievalQuery":{"shape":"KnowledgeBaseQuery"},
866        "retrievalConfiguration":{"shape":"KnowledgeBaseRetrievalConfiguration"},
867        "nextToken":{"shape":"NextToken"}
868      }
869    },
870    "RetrieveResponse":{
871      "type":"structure",
872      "required":["retrievalResults"],
873      "members":{
874        "retrievalResults":{"shape":"KnowledgeBaseRetrievalResults"},
875        "nextToken":{"shape":"NextToken"}
876      }
877    },
878    "RetrievedReference":{
879      "type":"structure",
880      "members":{
881        "content":{"shape":"RetrievalResultContent"},
882        "location":{"shape":"RetrievalResultLocation"}
883      },
884      "documentation":"<p>Retrieved reference</p>"
885    },
886    "RetrievedReferences":{
887      "type":"list",
888      "member":{"shape":"RetrievedReference"},
889      "documentation":"<p>list of retrieved references</p>"
890    },
891    "ServiceQuotaExceededException":{
892      "type":"structure",
893      "members":{
894        "message":{"shape":"NonBlankString"}
895      },
896      "documentation":"<p>This exception is thrown when a request is made beyond the service quota</p>",
897      "error":{
898        "httpStatusCode":400,
899        "senderFault":true
900      },
901      "exception":true
902    },
903    "SessionAttributesMap":{
904      "type":"map",
905      "key":{"shape":"String"},
906      "value":{"shape":"String"},
907      "documentation":"<p>Session attributes are pass through attributes passed to the action group</p>"
908    },
909    "SessionId":{
910      "type":"string",
911      "documentation":"<p>Identifier of the session.</p>",
912      "max":100,
913      "min":2,
914      "pattern":"[0-9a-zA-Z._:-]+"
915    },
916    "SessionState":{
917      "type":"structure",
918      "members":{
919        "sessionAttributes":{
920          "shape":"SessionAttributesMap",
921          "documentation":"<p>Session Attributes</p>"
922        },
923        "promptSessionAttributes":{
924          "shape":"PromptSessionAttributesMap",
925          "documentation":"<p>Prompt Session Attributes</p>"
926        }
927      },
928      "documentation":"<p>Session state provided</p>"
929    },
930    "Source":{
931      "type":"string",
932      "documentation":"<p>Parsing error source</p>",
933      "enum":[
934        "ACTION_GROUP",
935        "KNOWLEDGE_BASE",
936        "PARSER"
937      ],
938      "sensitive":true
939    },
940    "Span":{
941      "type":"structure",
942      "members":{
943        "start":{
944          "shape":"SpanStartInteger",
945          "documentation":"<p>Start of span</p>"
946        },
947        "end":{
948          "shape":"SpanEndInteger",
949          "documentation":"<p>End of span</p>"
950        }
951      },
952      "documentation":"<p>Span of text</p>"
953    },
954    "SpanEndInteger":{
955      "type":"integer",
956      "box":true,
957      "min":0
958    },
959    "SpanStartInteger":{
960      "type":"integer",
961      "box":true,
962      "min":0
963    },
964    "StopSequences":{
965      "type":"list",
966      "member":{"shape":"String"},
967      "documentation":"<p>List of stop sequences</p>",
968      "max":4,
969      "min":0
970    },
971    "String":{"type":"string"},
972    "Temperature":{
973      "type":"float",
974      "documentation":"<p>Controls randomness, higher values increase diversity</p>",
975      "box":true,
976      "max":1,
977      "min":0
978    },
979    "TextResponsePart":{
980      "type":"structure",
981      "members":{
982        "text":{
983          "shape":"String",
984          "documentation":"<p>Response part in text</p>"
985        },
986        "span":{"shape":"Span"}
987      },
988      "documentation":"<p>Text response part</p>"
989    },
990    "ThrottlingException":{
991      "type":"structure",
992      "members":{
993        "message":{"shape":"NonBlankString"}
994      },
995      "documentation":"<p>This exception is thrown when the number of requests exceeds the limit</p>",
996      "error":{
997        "httpStatusCode":429,
998        "senderFault":true
999      },
1000      "exception":true
1001    },
1002    "TopK":{
1003      "type":"integer",
1004      "documentation":"<p>Sample from the k most likely next tokens</p>",
1005      "box":true,
1006      "max":500,
1007      "min":0
1008    },
1009    "TopP":{
1010      "type":"float",
1011      "documentation":"<p>Cumulative probability cutoff for token selection</p>",
1012      "box":true,
1013      "max":1,
1014      "min":0
1015    },
1016    "Trace":{
1017      "type":"structure",
1018      "members":{
1019        "preProcessingTrace":{"shape":"PreProcessingTrace"},
1020        "orchestrationTrace":{"shape":"OrchestrationTrace"},
1021        "postProcessingTrace":{"shape":"PostProcessingTrace"},
1022        "failureTrace":{"shape":"FailureTrace"}
1023      },
1024      "documentation":"<p>Trace contains intermidate response for customer</p>",
1025      "sensitive":true,
1026      "union":true
1027    },
1028    "TraceId":{
1029      "type":"string",
1030      "documentation":"<p>Identifier for trace</p>",
1031      "max":16,
1032      "min":2
1033    },
1034    "TraceKnowledgeBaseId":{
1035      "type":"string",
1036      "documentation":"<p>Agent Trace Action Group Knowledge Base Id</p>",
1037      "sensitive":true
1038    },
1039    "TracePart":{
1040      "type":"structure",
1041      "members":{
1042        "agentId":{"shape":"AgentId"},
1043        "agentAliasId":{"shape":"AgentAliasId"},
1044        "sessionId":{"shape":"SessionId"},
1045        "trace":{"shape":"Trace"}
1046      },
1047      "documentation":"<p>Trace Part which contains intermidate response for customer</p>",
1048      "event":true,
1049      "sensitive":true
1050    },
1051    "Type":{
1052      "type":"string",
1053      "documentation":"<p>types of observations</p>",
1054      "enum":[
1055        "ACTION_GROUP",
1056        "KNOWLEDGE_BASE",
1057        "FINISH",
1058        "ASK_USER",
1059        "REPROMPT"
1060      ]
1061    },
1062    "ValidationException":{
1063      "type":"structure",
1064      "members":{
1065        "message":{"shape":"NonBlankString"}
1066      },
1067      "documentation":"<p>This exception is thrown when the request's input validation fails</p>",
1068      "error":{
1069        "httpStatusCode":400,
1070        "senderFault":true
1071      },
1072      "exception":true
1073    },
1074    "Verb":{
1075      "type":"string",
1076      "documentation":"<p>Agent Trace Action Group Action verb</p>",
1077      "sensitive":true
1078    }
1079  },
1080  "documentation":"<p>Amazon Bedrock Agent</p>"
1081}
1082