AWS Security ChangesHomeSearch

AWS nova documentation change

Service: nova · 2025-12-16 · Documentation low

File: nova/latest/nova2-userguide/building-ai-agents.md

Summary

Updated documentation with code examples, parameter adjustments, grammatical fixes, streaming response handling, and added AWS Strands reference for agent state management

Security assessment

The change adds a reference to AWS Strands for managing agent context and tool state, which appears to be a security-related feature for secure state management. It also maintains existing security documentation about Amazon Bedrock Guardrails for content filtering. However, there is no direct evidence of addressing a specific security vulnerability in the changes.

Diff

diff --git a/nova/latest/nova2-userguide/building-ai-agents.md b/nova/latest/nova2-userguide/building-ai-agents.md
index 1fb13ad70..136cd0ec6 100644
--- a//nova/latest/nova2-userguide/building-ai-agents.md
+++ b//nova/latest/nova2-userguide/building-ai-agents.md
@@ -28 +28 @@ When designing agents with Nova:
-  * Enable reasoning on medium or high for best results for extended thinking for complex multi-step workflows requiring planning and verification
+  * Enable reasoning on medium or high for best results for complex multi-step workflows requiring planning and verification
@@ -32,2 +31,0 @@ When designing agents with Nova:
-  * Leverage built-in tools (Code Interpreter, Web Grounding) alongside custom tools
-
@@ -38 +36 @@ When designing agents with Nova:
-  * Implement robust content filtering and moderation mechanisms across uncontrolled content that your agent system consumes. For example, Amazon offers Amazon Bedrock Guardrails, a feature designed to apply safeguards across multiple foundation models, knowledge bases and agents. These guardrails can filter harmful content, block denied topics and redact sensitive information such as personally identifiable information.
+  * Implement robust content filtering and moderation mechanisms across uncontrolled content that your agent system consumes. For example, Amazon offers Amazon Bedrock Guardrails, a feature designed to apply safeguards across multiple foundation models, knowledge bases and agents. These guardrails can filter harmful content, block denied topics, and redact sensitive information such as personally identifiable information.
@@ -46,6 +43,0 @@ When designing agents with Nova:
-    import boto3
-    import json
-     
-    # Create the client
-    client = boto3.client('bedrock-runtime', region_name='us-east-1')
-     
@@ -53,38 +45,38 @@ When designing agents with Nova:
-        "tools": [
-            {
-                "toolSpec": {
-                    "name": "calculator",
-                    "description": "Perform mathematical calculations",
-                    "inputSchema": {
-                        "json": {
-                            "type": "object",
-                            "properties": {
-                                "expression": {
-                                    "type": "string",
-                                    "description": "Mathematical expression to evaluate"
-                                }
-                            },
-                            "required": ["expression"]
-                        }
-                    }
-                }
-            },
-            {
-                "toolSpec": {
-                    "name": "database_query",
-                    "description": "Query financial database for historical data",
-                    "inputSchema": {
-                        "json": {
-                            "type": "object",
-                            "properties": {
-                                "query": {
-                                    "type": "string",
-                                    "description": "SQL query to execute"
-                                }
-                            },
-                            "required": ["query"]
-                        }
-                    }
-                }
-            }
-        ]
+        "tools": [ 
+            { 
+                "toolSpec": { 
+                    "name": "calculator", 
+                    "description": "Perform mathematical calculations", 
+                    "inputSchema": { 
+                        "json": { 
+                            "type": "object", 
+                            "properties": { 
+                                "expression": { 
+                                    "type": "string", 
+                                    "description": "Mathematical expression to evaluate" 
+                                } 
+                            }, 
+                            "required": ["expression"] 
+                        } 
+                    } 
+                } 
+            }, 
+            { 
+                "toolSpec": { 
+                    "name": "database_query", 
+                    "description": "Query financial database for historical data", 
+                    "inputSchema": { 
+                        "json": { 
+                            "type": "object", 
+                            "properties": { 
+                                "query": { 
+                                    "type": "string", 
+                                    "description": "SQL query to execute" 
+                                } 
+                            }, 
+                            "required": ["query"] 
+                        } 
+                    } 
+                } 
+            } 
+        ] 
@@ -94,15 +86,15 @@ When designing agents with Nova:
-        modelId="us.amazon.nova-2-lite-v1:0",
-        messages=[{
-            "role": "user",
-            "content": [{
-                "text": "Analyze our Q3 financial performance across all business units, calculate year-over-year growth rates with statistical significance testing and recommend budget allocation strategies for Q4."
-            }]
-        }],
-        toolConfig=tool_config,
-        inferenceConfig={"maxTokens": 10000, "temperature": 1},
-        additionalModelRequestFields={
-            "reasoningConfig": {
-                "type": "enabled",
-                "maxReasoningEffort": "low"
-            }
-        }
+        modelId=" us.amazon.nova-2-lite-v1:0", 
+        messages=[{ 
+            "role": "user", 
+            "content": [{ 
+                "text": "Analyze our Q3 financial performance across all business units, calculate year-over-year growth rates with statistical significance testing, and recommend budget allocation strategies for Q4." 
+            }] 
+        }], 
+        toolConfig=tool_config, 
+        inferenceConfig={"maxTokens": 10000, "temperature": 1, “topP”: 0.9}, 
+        additionalModelRequestFields={ 
+            "reasoningConfig": { 
+                "type": "enabled", 
+                "maxReasoningEffort": "low" 
+            } 
+        } 
@@ -111,2 +102,0 @@ When designing agents with Nova:
-    # Print the response
-    print(json.dumps(response['output']['message'], indent=2))
@@ -116 +106 @@ When designing agents with Nova:
-Agent invocation involves managing the conversation flow, processing tool calls and maintaining state across multiple interactions.
+Agent invocation involves managing the conversation flow, processing tool calls, and maintaining state across multiple interactions.
@@ -118 +108 @@ Agent invocation involves managing the conversation flow, processing tool calls
-### Stream agent responses
+### Streaming agent responses
@@ -124,21 +114,15 @@ Stream responses to provide real-time visibility into the agent's reasoning and
-    import json
-     
-    # Create the client first
-    bedrock = boto3.client('bedrock-runtime', region_name='us-east-1')
-     
-    # Then call converse_stream on the client instance
-    response = bedrock.converse_stream(
-        modelId="us.amazon.nova-2-lite-v1:0",
-        messages=[{
-            "role": "user",
-            "content": [{
-                "text": "Design a scalable microservices architecture for an e-commerce platform handling 1M+ daily transactions. Consider data consistency, fault tolerance, performance, security and cost optimization."
-            }]
-        }],
-        inferenceConfig={"maxTokens": 10000, "temperature": 1},
-        additionalModelRequestFields={
-            "reasoningConfig": {
-                "type": "enabled",
-                "maxReasoningEffort": "low"
-            }
-        }
+    response = client.converse_stream( 
+        modelId=" us.amazon.nova-2-lite-v1:0", 
+        messages=[{ 
+            "role": "user", 
+            "content": [{ 
+                "text": "Design a scalable microservices architecture for an e-commerce platform handling 1M+ daily transactions. Consider data consistency, fault tolerance, performance, security, and cost optimization." 
+            }] 
+        }], 
+        inferenceConfig={"maxTokens": 10000, "temperature": 10}, 
+        additionalModelRequestFields={ 
+            "reasoningConfig": { 
+                "type": "enabled", 
+                "maxReasoningEffort": "low" 
+            } 
+        } 
@@ -148,5 +132,11 @@ Stream responses to provide real-time visibility into the agent's reasoning and
-    for event in response['stream']:
-        if 'contentBlockDelta' in event:
-            delta = event['contentBlockDelta']['delta']
-            if 'text' in delta:
-                print(delta['text'], end='', flush=True)
+    reasoning_complete = False 
+    for event in response["stream"]: 
+        if "contentBlockDelta" in event: 
+            delta = event["contentBlockDelta"]["delta"] 
+             
+            if "reasoningContent" in delta: 
+                reasoning_text = delta["reasoningContent"]["reasoningText"]["text"] 
+                print(f"{reasoning_text}", end="", flush=True) 
+            elif "text" in delta: 
+                if not reasoning_complete: 
+                    print(f" 
@@ -154 +144,4 @@ Stream responses to provide real-time visibility into the agent's reasoning and
-### Manage agent state
+    Final Architecture Design: 
+    ") 
+                    reasoning_complete = True 
+                print(f"{delta['text']}", end="", flush=True) 
@@ -156 +149,4 @@ Stream responses to provide real-time visibility into the agent's reasoning and
-Maintain conversation history and tool results to preserve context:
+