AWS bedrock-agentcore documentation change
Summary
Restructured protocol documentation, added A2A protocol support, and created comparison table for protocols
Security assessment
Added documentation about authentication methods (SigV4 and OAuth 2.0) in protocol comparison table. While this documents security features, there's no evidence of addressing a specific security vulnerability.
Diff
diff --git a/bedrock-agentcore/latest/devguide/runtime-service-contract.md b/bedrock-agentcore/latest/devguide/runtime-service-contract.md index 6e4a93ea6..3b1bf2739 100644 --- a//bedrock-agentcore/latest/devguide/runtime-service-contract.md +++ b//bedrock-agentcore/latest/devguide/runtime-service-contract.md @@ -5 +5 @@ -Supported protocolsHTTP protocol contractMCP protocol contract +Supported protocolsCompare supported protocols @@ -7 +7 @@ Supported protocolsHTTP protocol contractMCP protocol contract -# Understanding the AgentCore Runtime service contract +# Understand the AgentCore Runtime service contract @@ -11,11 +10,0 @@ The AgentCore Runtime service contract defines the standardized communication pr -###### Topics - - * Supported protocols - - * HTTP protocol contract - - * MCP protocol contract - - - - @@ -24,96 +13 @@ The AgentCore Runtime service contract defines the standardized communication pr -The AgentCore Runtime service contract supports two communication protocols: - - * **HTTP Protocol** : Direct REST API endpoints for traditional request/response patterns - - * **MCP Protocol** : Model Context Protocol for tools and agent servers - - - - -## HTTP protocol contract - -### Container requirements - -Your agent must be deployed as a containerized application meeting these specifications: - - * **Host** : `0.0.0.0` - - * **Port** : `8080` \- Standard port for HTTP-based agent communication - - * **Platform** : ARM64 container - Required for compatibility with the AgentCore Runtime environment - - - - -### Path requirements - -#### /invocations - POST - -This is the primary agent interaction endpoint with JSON input and JSON/SSE output. - -###### Purpose - -Receives incoming requests from users or applications and processes them through your agent's business logic - -###### Use cases - -The `/invocations` endpoint serves several key purposes: - - * Direct user interactions and conversations - - * API integrations with external systems - - * Batch processing of multiple requests - - * Real-time streaming responses for long-running operations - - - - -###### Example Request format - - - Content-Type: application/json - - { - "prompt": "What's the weather today?" - } - -###### Response formats - -Your agent can respond using either of the following formats depending on the use case: - -##### JSON response (non-streaming) - -###### Purpose - -Provides complete responses for requests that can be processed quickly - -###### Use cases - -JSON responses are ideal for: - - * Simple question-answering scenarios - - * Deterministic computations - - * Quick data lookups - - * Status confirmations - - - - -###### Example JSON response format - - - Content-Type: application/json - - { - "response": "Your agent's response here", - "status": "success" - } - -##### SSE response (streaming) - -Server-sent events (SSE) let you deliver real-time streaming responses. For more information, see the [Server-sent events](https://html.spec.whatwg.org/multipage/server-sent-events.html#server-sent-events) specification. +The AgentCore Runtime service contract supports the following communication protocols: @@ -121 +15 @@ Server-sent events (SSE) let you deliver real-time streaming responses. For more -###### Purpose + * [HTTP](./runtime-http-protocol-contract.html): Direct REST API endpoints for traditional request/response patterns @@ -123 +17 @@ Server-sent events (SSE) let you deliver real-time streaming responses. For more -Enables incremental response delivery for long-running operations and improved user experience + * [MCP](./runtime-mcp-protocol-contract.html): Model Context Protocol for tools and agent servers @@ -125 +19 @@ Enables incremental response delivery for long-running operations and improved u -###### Use cases + * [A2A](./runtime-a2a-protocol-contract.html): Agent-to-Agent protocol for multi-agent communication and discovery @@ -127 +20,0 @@ Enables incremental response delivery for long-running operations and improved u -SSE responses are ideal for: @@ -129 +21,0 @@ SSE responses are ideal for: - * Real-time conversational experiences @@ -131 +22,0 @@ SSE responses are ideal for: - * Progressive content generation @@ -133 +24 @@ SSE responses are ideal for: - * Long-running computations with intermediate results +## Compare supported protocols @@ -135 +26 @@ SSE responses are ideal for: - * Live data feeds and updates +Compare the A2A, HTTP, and MCP protocols to understand the differences and use cases. @@ -136,0 +28,8 @@ SSE responses are ideal for: +Protocol Comparison Feature | HTTP Protocol | MCP Protocol | A2A Protocol +---|---|---|--- +**Port** | 8080 | 8000 | 9000 +**Mount Path** | /invocations | /mcp | / (root) +**Message Format** | REST JSON/SSE | JSON-RPC | JSON-RPC 2.0 +**Discovery** | N/A | Tool listing | Agent Cards +**Authentication** | SigV4 | SigV4 | SigV4, OAuth 2.0 +**Use Case** | Direct API calls | Tool servers | Agent-to-agent communication @@ -137,0 +37 @@ SSE responses are ideal for: +###### Topics @@ -138,0 +39 @@ SSE responses are ideal for: + * [HTTP protocol contract](./runtime-http-protocol-contract.html) @@ -140,106 +41 @@ SSE responses are ideal for: -###### Example SSE response format - - - Content-Type: text/event-stream - - data: {"event": "partial response 1"} - data: {"event": "partial response 2"} - data: {"event": "final response"} - -#### /ping - GET - -###### Purpose - -Verifies that your agent is operational and ready to handle requests - -###### Use cases - -The `/ping` endpoint serves several key purposes: - - * Service monitoring to detect and remediate issues - - * Automated recovery through AWS's managed infrastructure - - - - -###### Response format - -Returns a status code indicating your agent's health: - - * **Content-Type** : `application/json` - - * **HTTP Status Code** : `200` for healthy, appropriate error codes for unhealthy states - - - - -If your agent needs to process background tasks, you can indicate it with the `/ping` status. If the ping status is `HealthyBusy`, the runtime session is considered active. - -###### Example Ping response format - - - { - "status": "<status_value>", - "time_of_last_update": <unix_timestamp>