Skip to content

Commit 2ce3dee

Browse files
author
AWS
committed
Agents for Amazon Bedrock Runtime Update: Introduce model invocation output traces for orchestration traces, which contain the model's raw response and usage.
1 parent 0dd4801 commit 2ce3dee

File tree

2 files changed

+79
-13
lines changed

2 files changed

+79
-13
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": "Introduce model invocation output traces for orchestration traces, which contain the model's raw response and usage."
6+
}

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

Lines changed: 73 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
{"shape":"AccessDeniedException"},
100100
{"shape":"ServiceQuotaExceededException"}
101101
],
102-
"documentation":"<p>Invokes an alias of a flow to run the inputs that you specify and return the output of each node as a stream. If there's an error, the error is returned. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-test.html\">Test a flow in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p>"
102+
"documentation":"<p>Invokes an alias of a flow to run the inputs that you specify and return the output of each node as a stream. If there's an error, the error is returned. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/flows-test.html\">Test a flow in Amazon Bedrock</a> in the Amazon Bedrock User Guide.</p> <note> <p>The CLI doesn't support streaming operations in Amazon Bedrock, including <code>InvokeFlow</code>.</p> </note>"
103103
},
104104
"Retrieve":{
105105
"name":"Retrieve",
@@ -822,25 +822,25 @@
822822
"members":{
823823
"content":{
824824
"shape":"FlowInputContent",
825-
"documentation":"<p>Contains information about an input into the flow.</p>"
825+
"documentation":"<p>Contains information about an input into the prompt flow.</p>"
826826
},
827827
"nodeName":{
828828
"shape":"NodeName",
829-
"documentation":"<p>A name for the input of the flow input node.</p>"
829+
"documentation":"<p>The name of the flow input node that begins the prompt flow.</p>"
830830
},
831831
"nodeOutputName":{
832832
"shape":"NodeOutputName",
833-
"documentation":"<p>A name for the output of the flow input node.</p>"
833+
"documentation":"<p>The name of the output from the flow input node that begins the prompt flow.</p>"
834834
}
835835
},
836-
"documentation":"<p>Contains information about an input into the flow and what to do with 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>"
836+
"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>"
837837
},
838838
"FlowInputContent":{
839839
"type":"structure",
840840
"members":{
841841
"document":{
842842
"shape":"Document",
843-
"documentation":"<p>The input for the flow input node.</p>"
843+
"documentation":"<p>The input to send to the prompt flow input node.</p>"
844844
}
845845
},
846846
"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>",
@@ -858,10 +858,10 @@
858858
"members":{
859859
"document":{
860860
"shape":"Document",
861-
"documentation":"<p>A name for the output of the flow.</p>"
861+
"documentation":"<p>The content in the output.</p>"
862862
}
863863
},
864-
"documentation":"<p>Contains information about the output node.</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>",
864+
"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>",
865865
"union":true
866866
},
867867
"FlowOutputEvent":{
@@ -874,18 +874,18 @@
874874
"members":{
875875
"content":{
876876
"shape":"FlowOutputContent",
877-
"documentation":"<p>The output of the node.</p>"
877+
"documentation":"<p>The content in the output.</p>"
878878
},
879879
"nodeName":{
880880
"shape":"NodeName",
881-
"documentation":"<p>The name of the node to which input was provided.</p>"
881+
"documentation":"<p>The name of the flow output node that the output is from.</p>"
882882
},
883883
"nodeType":{
884884
"shape":"NodeType",
885-
"documentation":"<p>The type of node to which input was provided.</p>"
885+
"documentation":"<p>The type of the node that the output is from.</p>"
886886
}
887887
},
888-
"documentation":"<p>Contains information about an output from 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>",
888+
"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>",
889889
"event":true,
890890
"sensitive":true
891891
},
@@ -1510,7 +1510,7 @@
15101510
},
15111511
"topP":{
15121512
"shape":"TopP",
1513-
"documentation":"<p>While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for <code>Top P</code> determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set <code>topP</code> to 80, the model only selects the next token from the top 80% of the probability distribution of next tokens.</p>"
1513+
"documentation":"<p>While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for <code>Top P</code> determines the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set <code>topP</code> to 0.8, the model only selects the next token from the top 80% of the probability distribution of next tokens.</p>"
15141514
}
15151515
},
15161516
"documentation":"<p>Specifications about the inference parameters that were provided alongside the prompt. These are specified in the <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html\">PromptOverrideConfiguration</a> object that was set when the agent was created or updated. For more information, see <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters.html\">Inference parameters for foundation models</a>.</p>"
@@ -1997,6 +1997,17 @@
19971997
"type":"string",
19981998
"enum":["SESSION_SUMMARY"]
19991999
},
2000+
"Metadata":{
2001+
"type":"structure",
2002+
"members":{
2003+
"usage":{
2004+
"shape":"Usage",
2005+
"documentation":"<p>Contains details of the foundation model usage.</p>"
2006+
}
2007+
},
2008+
"documentation":"<p>Provides details of the foundation model.</p>",
2009+
"sensitive":true
2010+
},
20002011
"MimeType":{"type":"string"},
20012012
"ModelInvocationInput":{
20022013
"type":"structure",
@@ -2109,6 +2120,25 @@
21092120
},
21102121
"documentation":"<p>Settings for how the model processes the prompt prior to retrieval and generation.</p>"
21112122
},
2123+
"OrchestrationModelInvocationOutput":{
2124+
"type":"structure",
2125+
"members":{
2126+
"metadata":{
2127+
"shape":"Metadata",
2128+
"documentation":"<p>Contains information about the foundation model output.</p>"
2129+
},
2130+
"rawResponse":{
2131+
"shape":"RawResponse",
2132+
"documentation":"<p>Contains details of the raw response from the foundation model output.</p>"
2133+
},
2134+
"traceId":{
2135+
"shape":"TraceId",
2136+
"documentation":"<p>The unique identifier of the trace.</p>"
2137+
}
2138+
},
2139+
"documentation":"<p>The foundation model output from the orchestration step.</p>",
2140+
"sensitive":true
2141+
},
21122142
"OrchestrationTrace":{
21132143
"type":"structure",
21142144
"members":{
@@ -2120,6 +2150,10 @@
21202150
"shape":"ModelInvocationInput",
21212151
"documentation":"<p>The input for the orchestration step.</p> <ul> <li> <p>The <code>type</code> is <code>ORCHESTRATION</code>.</p> </li> <li> <p>The <code>text</code> contains the prompt.</p> </li> <li> <p>The <code>inferenceConfiguration</code>, <code>parserMode</code>, and <code>overrideLambda</code> values are set in the <a href=\"https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent_PromptOverrideConfiguration.html\">PromptOverrideConfiguration</a> object that was set when the agent was created or updated.</p> </li> </ul>"
21222152
},
2153+
"modelInvocationOutput":{
2154+
"shape":"OrchestrationModelInvocationOutput",
2155+
"documentation":"<p>Contains information pertaining to the output from the foundation model that is being invoked.</p>"
2156+
},
21232157
"observation":{
21242158
"shape":"Observation",
21252159
"documentation":"<p>Details about the observation (the output of the action group Lambda or knowledge base) made by the agent.</p>"
@@ -2381,6 +2415,17 @@
23812415
"type":"string",
23822416
"sensitive":true
23832417
},
2418+
"RawResponse":{
2419+
"type":"structure",
2420+
"members":{
2421+
"content":{
2422+
"shape":"String",
2423+
"documentation":"<p>The foundation model's raw output content.</p>"
2424+
}
2425+
},
2426+
"documentation":"<p>Contains the raw output from the foundation model.</p>",
2427+
"sensitive":true
2428+
},
23842429
"RepromptResponse":{
23852430
"type":"structure",
23862431
"members":{
@@ -3156,6 +3201,21 @@
31563201
"REPROMPT"
31573202
]
31583203
},
3204+
"Usage":{
3205+
"type":"structure",
3206+
"members":{
3207+
"inputTokens":{
3208+
"shape":"Integer",
3209+
"documentation":"<p>Contains information about the input tokens from the foundation model usage.</p>"
3210+
},
3211+
"outputTokens":{
3212+
"shape":"Integer",
3213+
"documentation":"<p>Contains information about the output tokens from the foundation model usage.</p>"
3214+
}
3215+
},
3216+
"documentation":"<p>Contains information of the usage of the foundation model.</p>",
3217+
"sensitive":true
3218+
},
31593219
"ValidationException":{
31603220
"type":"structure",
31613221
"members":{

0 commit comments

Comments
 (0)