Skip to content

Feature request: Add support for the Bedrock Agent event and response formats #3261

Closed
@rubenfonseca

Description

@rubenfonseca

Use case

As a user, I want to create a Bedrock Agent using Lambda. I will receive a new payload type specific for this integration, and Bedrock expects my Lambda function to output a certain format.

https://docs.aws.amazon.com/bedrock/latest/userguide/agents-create.html

NOTE: As of October 26, 2023, the payload structure of the Lambda input event and response format is changing.

Current payload

Input

{
    "messageVersion": "1.0",
    "agent": {
        "name": "string",
        "id": "string",
        "alias": "string",
        "version": "string"
    },
    "inputText": "string",
    "sessionId": "string",
    "actionGroup": "string",
    "apiPath": "string",
    "httpMethod": "string",
    "parameters": [
        {
            "name": "string",
            "type": "string",
            "value": "string"
        },
    ...
    ],
    "requestBody": {
        "content": {
            "<content_type>": {
                "properties": [
                   {
                       "name": "string",
                       "type": "string",
                       "value": "string"
                    },
                            ...
                ]
            }
        }
    },
    "sessionAttributes": {
        "string": "string",
    }
}

Output

{
    "messageVersion": "1.0",
    "response": {
        "actionGroup": "string",
        "apiPath": "string",
        "httpMethod": "string",
        "httpStatusCode": number,
        "responseBody": {
            "<contentType>": {
                "body": "string" 
            }
        }
    }
}

Solution/User Experience

Add event source data class and parser support for the input and output events.

Alternative solutions

No response

Acknowledgment

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Shipped

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions