Skip to content

Commit 3b2eb43

Browse files
author
AWS
committed
Agents for Amazon Bedrock Runtime Update: This release adds trace functionality to Bedrock Prompt Flows
1 parent da9ac47 commit 3b2eb43

File tree

2 files changed

+222
-9
lines changed

2 files changed

+222
-9
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Agents for Amazon Bedrock Runtime",
4+
"contributor": "",
5+
"description": "This release adds trace functionality to Bedrock Prompt Flows"
6+
}

services/bedrockagentruntime/src/main/resources/codegen-resources/service-2.json

Lines changed: 216 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@
394394
"type":"string",
395395
"max":2048,
396396
"min":1,
397-
"pattern":"^(arn:aws(-[^:]{1,10})?:bedrock:[a-z0-9-]{1,20}:([0-9]{12})?:([a-z-]{1,20}/)?)?([a-z0-9.-]{1,63}){0,2}(([:][a-z0-9-]{1,63}){0,2})?(/[a-z0-9]{1,12})?$"
397+
"pattern":"^(arn:aws(-[^:]+)?:(bedrock|sagemaker):[a-z0-9-]{1,20}:([0-9]{12})?:([a-z-]+/)?)?([a-z0-9.-]{1,63}){0,2}(([:][a-z0-9-]{1,63}){0,2})?(/[a-z0-9]{1,12})?$"
398398
},
399399
"Boolean":{
400400
"type":"boolean",
@@ -823,7 +823,7 @@
823823
"documentation":"<p>The reason that the flow completed.</p>"
824824
}
825825
},
826-
"documentation":"<p>Contains information about why a flow completed.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_ResponseSyntax\">InvokeFlow response</a> </p> </li> </ul>",
826+
"documentation":"<p>Contains information about why a flow completed.</p>",
827827
"event":true,
828828
"sensitive":true
829829
},
@@ -858,7 +858,7 @@
858858
"documentation":"<p>The name of the output from the flow input node that begins the prompt flow.</p>"
859859
}
860860
},
861-
"documentation":"<p>Contains information about an input into the prompt flow and where to send it.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_RequestSyntax\">InvokeFlow request</a> </p> </li> </ul>"
861+
"documentation":"<p>Contains information about an input into the prompt flow and where to send it.</p>"
862862
},
863863
"FlowInputContent":{
864864
"type":"structure",
@@ -868,7 +868,7 @@
868868
"documentation":"<p>The input to send to the prompt flow input node.</p>"
869869
}
870870
},
871-
"documentation":"<p>Contains information about an input into the flow.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_RequestSyntax\">InvokeFlow request</a> </p> </li> </ul>",
871+
"documentation":"<p>Contains information about an input into the flow.</p>",
872872
"sensitive":true,
873873
"union":true
874874
},
@@ -886,7 +886,7 @@
886886
"documentation":"<p>The content in the output.</p>"
887887
}
888888
},
889-
"documentation":"<p>Contains information about the content in an output from prompt flow invocation.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_RequestSyntax\">InvokeFlow request</a> </p> </li> </ul>",
889+
"documentation":"<p>Contains information about the content in an output from prompt flow invocation.</p>",
890890
"union":true
891891
},
892892
"FlowOutputEvent":{
@@ -910,7 +910,7 @@
910910
"documentation":"<p>The type of the node that the output is from.</p>"
911911
}
912912
},
913-
"documentation":"<p>Contains information about an output from prompt flow invoction.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_ResponseSyntax\">InvokeFlow response</a> </p> </li> </ul>",
913+
"documentation":"<p>Contains information about an output from prompt flow invoction.</p>",
914914
"event":true,
915915
"sensitive":true
916916
},
@@ -941,6 +941,10 @@
941941
"shape":"FlowOutputEvent",
942942
"documentation":"<p>Contains information about an output from flow invocation.</p>"
943943
},
944+
"flowTraceEvent":{
945+
"shape":"FlowTraceEvent",
946+
"documentation":"<p>Contains information about a trace, which tracks an input or output for a node in the flow.</p>"
947+
},
944948
"internalServerException":{
945949
"shape":"InternalServerException",
946950
"documentation":"<p>An internal server error occurred. Retry your request.</p>"
@@ -962,9 +966,204 @@
962966
"documentation":"<p>Input validation failed. Check your request parameters and retry the request.</p>"
963967
}
964968
},
965-
"documentation":"<p>The output of the flow.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeFlow.html#API_agent_InvokeFlow_ResponseSyntax\">InvokeFlow response</a> </p> </li> </ul>",
969+
"documentation":"<p>The output of the flow.</p>",
966970
"eventstream":true
967971
},
972+
"FlowTrace":{
973+
"type":"structure",
974+
"members":{
975+
"conditionNodeResultTrace":{
976+
"shape":"FlowTraceConditionNodeResultEvent",
977+
"documentation":"<p>Contains information about an output from a condition node.</p>"
978+
},
979+
"nodeInputTrace":{
980+
"shape":"FlowTraceNodeInputEvent",
981+
"documentation":"<p>Contains information about the input into a node.</p>"
982+
},
983+
"nodeOutputTrace":{
984+
"shape":"FlowTraceNodeOutputEvent",
985+
"documentation":"<p>Contains information about the output from a node.</p>"
986+
}
987+
},
988+
"documentation":"<p>Contains information about an input or output for a node in the flow. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>",
989+
"sensitive":true,
990+
"union":true
991+
},
992+
"FlowTraceCondition":{
993+
"type":"structure",
994+
"required":["conditionName"],
995+
"members":{
996+
"conditionName":{
997+
"shape":"String",
998+
"documentation":"<p>The name of the condition.</p>"
999+
}
1000+
},
1001+
"documentation":"<p>Contains information about a condition that was satisfied. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>",
1002+
"sensitive":true
1003+
},
1004+
"FlowTraceConditionNodeResultEvent":{
1005+
"type":"structure",
1006+
"required":[
1007+
"nodeName",
1008+
"satisfiedConditions",
1009+
"timestamp"
1010+
],
1011+
"members":{
1012+
"nodeName":{
1013+
"shape":"NodeName",
1014+
"documentation":"<p>The name of the condition node.</p>"
1015+
},
1016+
"satisfiedConditions":{
1017+
"shape":"FlowTraceConditions",
1018+
"documentation":"<p>An array of objects containing information about the conditions that were satisfied.</p>"
1019+
},
1020+
"timestamp":{
1021+
"shape":"DateTimestamp",
1022+
"documentation":"<p>The date and time that the trace was returned.</p>"
1023+
}
1024+
},
1025+
"documentation":"<p>Contains information about an output from a condition node. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>",
1026+
"sensitive":true
1027+
},
1028+
"FlowTraceConditions":{
1029+
"type":"list",
1030+
"member":{"shape":"FlowTraceCondition"},
1031+
"max":5,
1032+
"min":1
1033+
},
1034+
"FlowTraceEvent":{
1035+
"type":"structure",
1036+
"required":["trace"],
1037+
"members":{
1038+
"trace":{
1039+
"shape":"FlowTrace",
1040+
"documentation":"<p>The trace object containing information about an input or output for a node in the flow.</p>"
1041+
}
1042+
},
1043+
"documentation":"<p>Contains information about a trace, which tracks an input or output for a node in the flow. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>",
1044+
"event":true
1045+
},
1046+
"FlowTraceNodeInputContent":{
1047+
"type":"structure",
1048+
"members":{
1049+
"document":{
1050+
"shape":"Document",
1051+
"documentation":"<p>The content of the node input.</p>"
1052+
}
1053+
},
1054+
"documentation":"<p>Contains the content of the node input. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>",
1055+
"sensitive":true,
1056+
"union":true
1057+
},
1058+
"FlowTraceNodeInputEvent":{
1059+
"type":"structure",
1060+
"required":[
1061+
"fields",
1062+
"nodeName",
1063+
"timestamp"
1064+
],
1065+
"members":{
1066+
"fields":{
1067+
"shape":"FlowTraceNodeInputFields",
1068+
"documentation":"<p>An array of objects containing information about each field in the input.</p>"
1069+
},
1070+
"nodeName":{
1071+
"shape":"NodeName",
1072+
"documentation":"<p>The name of the node that received the input.</p>"
1073+
},
1074+
"timestamp":{
1075+
"shape":"DateTimestamp",
1076+
"documentation":"<p>The date and time that the trace was returned.</p>"
1077+
}
1078+
},
1079+
"documentation":"<p>Contains information about the input into a node. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>",
1080+
"sensitive":true
1081+
},
1082+
"FlowTraceNodeInputField":{
1083+
"type":"structure",
1084+
"required":[
1085+
"content",
1086+
"nodeInputName"
1087+
],
1088+
"members":{
1089+
"content":{
1090+
"shape":"FlowTraceNodeInputContent",
1091+
"documentation":"<p>The content of the node input.</p>"
1092+
},
1093+
"nodeInputName":{
1094+
"shape":"NodeInputName",
1095+
"documentation":"<p>The name of the node input.</p>"
1096+
}
1097+
},
1098+
"documentation":"<p>Contains information about a field in the input into a node. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>",
1099+
"sensitive":true
1100+
},
1101+
"FlowTraceNodeInputFields":{
1102+
"type":"list",
1103+
"member":{"shape":"FlowTraceNodeInputField"},
1104+
"max":5,
1105+
"min":1
1106+
},
1107+
"FlowTraceNodeOutputContent":{
1108+
"type":"structure",
1109+
"members":{
1110+
"document":{
1111+
"shape":"Document",
1112+
"documentation":"<p>The content of the node output.</p>"
1113+
}
1114+
},
1115+
"documentation":"<p>Contains the content of the node output. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>",
1116+
"union":true
1117+
},
1118+
"FlowTraceNodeOutputEvent":{
1119+
"type":"structure",
1120+
"required":[
1121+
"fields",
1122+
"nodeName",
1123+
"timestamp"
1124+
],
1125+
"members":{
1126+
"fields":{
1127+
"shape":"FlowTraceNodeOutputFields",
1128+
"documentation":"<p>An array of objects containing information about each field in the output.</p>"
1129+
},
1130+
"nodeName":{
1131+
"shape":"NodeName",
1132+
"documentation":"<p>The name of the node that yielded the output.</p>"
1133+
},
1134+
"timestamp":{
1135+
"shape":"DateTimestamp",
1136+
"documentation":"<p>The date and time that the trace was returned.</p>"
1137+
}
1138+
},
1139+
"documentation":"<p>Contains information about the output from a node. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>",
1140+
"sensitive":true
1141+
},
1142+
"FlowTraceNodeOutputField":{
1143+
"type":"structure",
1144+
"required":[
1145+
"content",
1146+
"nodeOutputName"
1147+
],
1148+
"members":{
1149+
"content":{
1150+
"shape":"FlowTraceNodeOutputContent",
1151+
"documentation":"<p>The content of the node output.</p>"
1152+
},
1153+
"nodeOutputName":{
1154+
"shape":"NodeOutputName",
1155+
"documentation":"<p>The name of the node output.</p>"
1156+
}
1157+
},
1158+
"documentation":"<p>Contains information about a field in the output from a node. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>",
1159+
"sensitive":true
1160+
},
1161+
"FlowTraceNodeOutputFields":{
1162+
"type":"list",
1163+
"member":{"shape":"FlowTraceNodeOutputField"},
1164+
"max":2,
1165+
"min":1
1166+
},
9681167
"Function":{
9691168
"type":"string",
9701169
"sensitive":true
@@ -1068,7 +1267,7 @@
10681267
},
10691268
"promptTemplate":{
10701269
"shape":"PromptTemplate",
1071-
"documentation":"<p>Contains the template for the prompt that's sent to the model for response generation.</p>"
1270+
"documentation":"<p>Contains the template for the prompt that's sent to the model for response generation. Generation prompts must include the <code>$search_results$</code> variable. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html\">Use placeholder variables</a> in the user guide.</p>"
10721271
}
10731272
},
10741273
"documentation":"<p>Contains configurations for response generation based on the knowledge base query results.</p> <p>This data type is used in the following API operations:</p> <ul> <li> <p> <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_RetrieveAndGenerate.html#API_agent-runtime_RetrieveAndGenerate_RequestSyntax\">RetrieveAndGenerate request</a> </p> </li> </ul>"
@@ -1756,6 +1955,10 @@
17561955
"inputs"
17571956
],
17581957
"members":{
1958+
"enableTrace":{
1959+
"shape":"Boolean",
1960+
"documentation":"<p>Specifies whether to return the trace for the flow or not. Traces track inputs and outputs for nodes in the flow. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-trace.html\">Track each step in your prompt flow by viewing its trace in Amazon Bedrock</a>.</p>"
1961+
},
17591962
"flowAliasIdentifier":{
17601963
"shape":"FlowAliasIdentifier",
17611964
"documentation":"<p>The unique identifier of the flow alias.</p>",
@@ -2083,6 +2286,10 @@
20832286
"min":1,
20842287
"pattern":"^\\S*$"
20852288
},
2289+
"NodeInputName":{
2290+
"type":"string",
2291+
"pattern":"^[a-zA-Z]([_]?[0-9a-zA-Z]){0,99}$"
2292+
},
20862293
"NodeName":{
20872294
"type":"string",
20882295
"pattern":"^[a-zA-Z]([_]?[0-9a-zA-Z]){0,99}$"
@@ -2155,7 +2362,7 @@
21552362
},
21562363
"promptTemplate":{
21572364
"shape":"PromptTemplate",
2158-
"documentation":"<p>Contains the template for the prompt that's sent to the model for response generation.</p>"
2365+
"documentation":"<p>Contains the template for the prompt that's sent to the model. Orchestration prompts must include the <code>$conversation_history$</code> and <code>$output_format_instructions$</code> variables. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html\">Use placeholder variables</a> in the user guide.</p>"
21592366
},
21602367
"queryTransformationConfiguration":{
21612368
"shape":"QueryTransformationConfiguration",

0 commit comments

Comments
 (0)