AWS Security ChangesHomeSearch

AWS bedrock documentation change

Service: bedrock · 2025-03-10 · Documentation low

File: bedrock/latest/userguide/agents-returncontrol.md

Summary

Added detailed examples for returning control between collaborator agents in multi-agent scenarios

Security assessment

Changes demonstrate feature usage patterns for agent collaboration without security-specific context or vulnerability mitigation

Diff

diff --git a/bedrock/latest/userguide/agents-returncontrol.md
index 366bd225d..34f44b169 100644
--- a/bedrock/latest/userguide/agents-returncontrol.md
+++ b/bedrock/latest/userguide/agents-returncontrol.md
@@ -167,0 +168,128 @@ OpenAPI schema
+### Example for returning control to the collaborator agent
+
+If you are using [multi-agent collaboration](./agents-multi-agent-collaboration.html) and if an agent collaborator chooses to return control by sending the information in the [InvokeAgent](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_InvokeAgent.html) response, the information is returned in supervisor agent response with additional identifiers `agentId` and `collaboratorName`. Select a tab to see examples for an action group defined with that method: 
+
+Function details
+    
+    
+    
+    HTTP/1.1 200
+    x-amzn-bedrock-agent-content-type: application/json
+    x-amz-bedrock-agent-session-id: session0
+    Content-type: application/json
+     
+    {
+        "returnControl": {
+            "invocationInputs": [{
+                "functionInvocationInput": {
+                    "agentId": "AGENTID",
+                    "collaboratorName": "WeatherAgent"
+                    "actionGroup": "WeatherAPIs",
+                    "function": "getWeather",
+                    "parameters": [
+                        {
+                            "name": "location",
+                            "type": "string",
+                            "value": "seattle"
+                        },
+                        {
+                            "name": "date",
+                            "type": "string",
+                            "value": "2024-09-15"
+                        }
+                    ]
+                }
+            }],
+            "invocationId": "79e0feaa-c6f7-49bf-814d-b7c498505172"
+        }
+    }
+
+OpenAPI Schema
+    
+    
+    
+    HTTP/1.1 200
+    x-amzn-bedrock-agent-content-type: application/json
+    x-amz-bedrock-agent-session-id: session0
+    Content-type: application/json
+    
+    {
+        "invocationInputs": [{
+            "apiInvocationInput": {
+                "actionGroup": "WeatherAPIs",
+                "agentId": "AGENTID",
+                "collaboratorName": "WeatherAgent"
+                "apiPath": "/get-weather",
+                "httpMethod": "get",
+                "parameters": [
+                    {
+                        "name": "location",
+                        "type": "string",
+                        "value": "seattle"
+                    },
+                    {
+                        "name": "date",
+                        "type": "string",
+                        "value": "2024-09-15"
+                    }
+                ]
+            }
+        }],
+        "invocationId": "337cb2f6-ec74-4b49-8141-00b8091498ad"
+    }
+
+Invoker of supervisor agent sends the results in the `sessionState` field back to supervisor agent with the corresponding `agentId` for it to be propagated to the right agent collaborator.
+
+Function details
+    
+    
+    
+    POST https://bedrock-agent-runtime.us-east-1.amazonaws.com/agents/AGENT12345/agentAliases/TSTALIASID/sessions/abb/text
+                
+    {
+        "enableTrace": true,
+        "sessionState": {
+            "invocationId": "79e0feaa-c6f7-49bf-814d-b7c498505172",
+            "returnControlInvocationResults": [{
+                "functionResult": {
+                    "agentId": "AGENTID",
+                    "actionGroup": "WeatherAPIs",
+                    "function": "getWeather",
+                    "responseBody": {
+                        "TEXT": {
+                            "body": "It's rainy in Seattle today."
+                        }
+                    }
+                }
+            }]
+        }
+    }
+                            
+
+OpenAPI Schema
+    
+    
+    
+    POST https: //bedrock-agent-runtime.us-east-1.amazonaws.com/agents/AGENT12345/agentAliases/TSTALIASID/sessions/abb/text
+     
+    {
+        "enableTrace": true,
+        "sessionState": {
+            "invocationId": "337cb2f6-ec74-4b49-8141-00b8091498ad",
+            "returnControlInvocationResults": [{
+                "apiResult": {
+                    "agentId": "AGENTID",
+                    "actionGroup": "WeatherAPIs",
+                    "httpMethod": "get",
+                    "apiPath": "/get-weather",
+                    "responseBody": {
+                        "application/json": {
+                            "body": "It's rainy in Seattle today."
+                        }
+                    }
+                }
+            }]
+        }
+    }
+                            
+