기본 제공 전략 구성
AgentCore 메모리는 일반적인 사용 사례에 맞게 사전 구성된 내장 메모리 전략을 제공합니다.
사용자 기본 설정
사용자 기본 설정(UserPreferenceMemoryStrategy) 전략은 대화에서 사용자 기본 설정, 선택 및 스타일을 자동으로 식별하고 추출하도록 설계되었습니다. 이렇게 하면 에이전트가 각 사용자의 지속적인 프로필을 구축하여 보다 개인화되고 관련성이 높은 상호 작용으로 이어집니다.
-
사용 사례 예: 전자 상거래 에이전트는 사용자가 선호하는 브랜드와 선호하는 크기를 기억하여 향후 세션에서 맞춤형 제품 추천을 제공할 수 있습니다.
구성 예제:
import boto3 # Initialize the Boto3 client for control plane operations control_client = boto3.client('bedrock-agentcore-control', region_name='us-west-2') # Create memory resource with user preference strategy response = control_client.create_memory( name="ECommerceAgentMemory", memoryStrategies=[ { 'userPreferenceMemoryStrategy': { 'name': 'UserPreferenceExtractor', 'namespaceTemplates': ['/users/{actorId}/preferences/'] } } ] )
의미 체계
의미 체계(SemanticMemoryStrategy) 메모리 전략은 대화 데이터에서 사실 정보 및 컨텍스트 지식의 주요 부분을 식별하고 추출하도록 설계되었습니다. 이를 통해 에이전트는 상호 작용 중에 논의된 중요한 엔터티, 이벤트 및 세부 정보에 대한 지속적인 지식 기반을 구축할 수 있습니다.
-
사용 사례 예: 고객 지원 에이전트는 주문 #ABC-123이 특정 지원 티켓과 관련이 있음을 기억하므로 후속 조치를 취할 때 사용자가 주문 번호를 다시 제공할 필요가 없습니다.
구성 예제:
import boto3 # Initialize the Boto3 client for control plane operations control_client = boto3.client('bedrock-agentcore-control', region_name='us-west-2') # Create memory resource with semantic strategy response = control_client.create_memory( name="SupportAgentFactMemory", memoryStrategies=[ { 'semanticMemoryStrategy': { 'name': 'FactExtractor', 'namespaceTemplates': ['/support_cases/{sessionId}/facts/'] } } ] )
세션 요약
세션 요약(SummaryMemoryStrategy) 메모리 전략은 단일 세션 내에서 발생하는 대화에 대한 요약을 요약하여 실행합니다. 이렇게 하면 주요 주제와 결정이 캡처되므로 에이전트가 전체 기록을 재처리할 필요 없이 긴 대화의 컨텍스트를 빠르게 재현할 수 있습니다.
-
사용 사례 예: 30분 문제 해결 세션 후 에이전트는 "사용자가 소프트웨어 v2.1과 관련된 문제를 보고하고 다시 시작을 시도했으며 지식 기반 문서 링크가 제공되었습니다."와 같은 요약에 액세스할 수 있습니다.
구성 예제:
import boto3 # Initialize the Boto3 client for control plane operations control_client = boto3.client('bedrock-agentcore-control', region_name='us-west-2') # Create memory resource with summary strategy response = control_client.create_memory( name="TroubleshootingAgentSummaryMemory", memoryStrategies=[ { 'summaryMemoryStrategy': { 'name': 'SessionSummarizer', 'namespaceTemplates': ['/summaries/{actorId}/{sessionId}/'] } } ] )
에피소드
간헐적(EpisodicStrategy) 메모리 전략은 시나리오, 의도, 생각, 취한 조치, 결과 및 아티팩트로 구성된 구조화된 에피소드로 상호 작용을 캡처합니다. 이 전략을 사용하면 에피소드 전반에 걸쳐 반영되어 더 광범위한 인사이트를 추출하여 에이전트가 이전 상호 작용에서 성공한 패턴을 학습하고 새 상호 작용에 적용할 수 있습니다.
-
사용 사례 예: 고객 지원 에이전트가 상호 작용을 에피소드로 기록합니다. 시스템은 성공적인 상호 작용으로 이어지는 문구와 작업을 캡처합니다.
구성 예제:
import boto3 # Initialize the Boto3 client for control plane operations control_client = boto3.client('bedrock-agentcore-control', region_name='us-west-2') # Create memory resource with episodic strategy response = control_client.create_memory( name="MyMemory", memoryStrategies=[ { 'episodicMemoryStrategy': { 'name': 'EpisodicStrategy', 'namespaceTemplates': ['/strategy/{memoryStrategyId}/actors/{actorId}/sessions/{sessionId}/'], 'reflection': { 'namespaceTemplates': ['strategy/{memoryStrategyId}/actors/{actorId}/'] } } } ] )