Add conversation history feature with AgentCore Memory#10
Open
inoue22 wants to merge 8 commits intoaws-samples:mainfrom
Open
Add conversation history feature with AgentCore Memory#10inoue22 wants to merge 8 commits intoaws-samples:mainfrom
inoue22 wants to merge 8 commits intoaws-samples:mainfrom
Conversation
Contributor
|
thanks, I will have a look at this. |
Author
|
Thank you for looking into this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
Description
This PR adds conversation history functionality using Amazon Bedrock AgentCore Memory, enabling users to view and continue past chat sessions.
Changes
AWS CDK
AgentCoreInfraStack: Add IAM policy for agent role to access AgentCore Memory (CreateEvent, GetEvent, ListEvents, DeleteEvent, ListSessions)AgentCoreAuth: Add Cognito Identity Pool with IAM role for authenticated frontend users to access AgentCore Memory (ListSessions, ListEvents)AgentCoreRuntime: AddCfnMemoryresource with 365-day event expiry, pass Memory ID as environment variable to agent runtimeAgentCore Runtime
AgentCoreMemorySessionManagerwith Strands Agents for automatic session persistenceactorIdandsessionIdfrom request payloadFrontend
ChatHistorySidebarcomponent for displaying past sessionsuseChatHistoryhook for fetching sessions and messages from AgentCore MemorymessageParser.tsutility for parsing AgentCore Memory event payloads (handles bothconversationalandblobpayload types)App.tsxto support session selection and creationDeployment Scripts
VITE_MEMORY_IDandVITE_IDENTITY_POOL_IDenvironment variables to frontend buildBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.