All skills
zxkane avatar

/aws-agentic-ai

@e4ef2e2
by Mengxin Zhuzxkane/aws-skills365 stars
40

AWS Bedrock AgentCore comprehensive expert for deploying and managing AI agents at scale. Use when working with any AgentCore service including Gateway, Runtime, Memory, Identity, Code Interpreter, Browser, Observability, Agent Registry, or Evaluations. Covers agent deployment, MCP tool integration, credential management, agent discovery, governance workflows, and automated quality assessment. Essential when user mentions AgentCore, agent runtime, agent registry, agent evaluation, MCP gateway, deploy agent, register MCP server, discover agents, evaluate agent quality, agent credentials, or wants to build, deploy, catalog, or monitor AI agents on AWS.

Use this Skill: https://skilld.dev/gh/zxkane/aws-skills/aws-agentic-ai

This session only. Nothing lands on disk.

servicesmemoryREADME.md

≈2.1k tokens on demand. Your agent reads this file only when SKILL.md points to it.

AgentCore Memory Service

Status: ✅ Available

Overview

Amazon Bedrock AgentCore Memory is a fully managed service that gives AI agents the ability to remember past interactions, enabling more intelligent, context-aware, and personalized conversations. It addresses a fundamental challenge in agentic AI: statelessness. Without memory capabilities, AI agents treat each interaction as a new instance with no knowledge of previous conversations.

Memory Types

AgentCore Memory offers two types of memory that work together:

Short-Term Memory

Captures turn-by-turn interactions within a single session, allowing agents to maintain immediate context without requiring users to repeat information.

Example: When a user asks "What's the weather like in Seattle?" and follows up with "What about tomorrow?", the agent relies on recent conversation history to understand that "tomorrow" refers to Seattle weather.

Long-Term Memory

Automatically extracts and stores key insights from conversations across multiple sessions, including user preferences, important facts, and session summaries for persistent knowledge retention.

Example: If a customer mentions they prefer window seats during flight booking, the agent stores this preference and proactively offers window seats in future interactions.

Core Capabilities

Memory Resource Management

  • Logical Containers: Encapsulate both raw events and processed long-term memories
  • Retention Policies: Define how long data is retained
  • Security Configuration: Control access and encryption
  • Data Transformation: Transform raw interactions into meaningful insights

Short-Term Memory Features

  • Event Storage: Store conversations, system events, and state changes as immutable events
  • Session Organization: Organize by actor and session
  • Context Preservation: Maintain immediate context within sessions
  • Structured Storage: Support structured storage of interaction data

Long-Term Memory Features

  • Insight Extraction: Automatically extract insights, preferences, and knowledge
  • Asynchronous Processing: Extract memories asynchronously using memory strategies
  • Cross-Session Persistence: Retain information across multiple sessions
  • Semantic Search: Search memories by meaning and context

Memory Strategies

Define the intelligence layer that transforms raw events into meaningful memories:

Strategy Description
Semantic Extract meaningful facts and information
Summary Generate conversation summaries
User Preference Extract and store user preferences
Custom Define custom extraction logic

Advanced Features

  • Branching: Create alternative conversation paths from specific points
  • Checkpointing: Save and mark specific states for later reference
  • Memory Consolidation: Merge related memories without duplicates
  • Audit Trail: Immutable audit trail for all memory operations

Use Cases

Conversational Agents

Enable chatbots to:

  • Remember previous issues and preferences
  • Provide relevant assistance based on history
  • Create personalized customer experiences
  • Maintain context across session breaks

Task-Oriented Agents

Support workflows like:

  • Track multi-step business process status
  • Maintain workflow progress across sessions
  • Remember task context for resumption
  • Store intermediate results

Multi-Agent Systems

Allow agent teams to:

  • Share memory for synchronized operations
  • Coordinate inventory levels and logistics
  • Maintain shared context
  • Optimize collaborative workflows

Autonomous Agents

Enable agents to:

  • Plan routes based on past experiences
  • Learn from previous interactions
  • Improve decision-making over time
  • Build persistent knowledge bases

Quick Start

Create Memory Resource

aws bedrock-agentcore-control create-memory \
  --memory-name my-agent-memory \
  --memory-strategies '[{"strategyName": "SEMANTIC", "configuration": {}}]' \
  --region us-west-2

Using Memory with SDK

from bedrock_agentcore.memory import MemoryClient

# Initialize memory client
memory = MemoryClient(memory_id="my-agent-memory")

# Add short-term memory event
memory.add_event(
    session_id="session-123",
    actor_id="user-456",
    event_type="message",
    content={"role": "user", "message": "Book a flight to Seattle"}
)

# Retrieve conversation history
history = memory.get_session_events(session_id="session-123")

# Search long-term memories
memories = memory.search_memories(
    query="user flight preferences",
    limit=5
)

Store and Retrieve Memories

# Store long-term memory
memory.store_memory(
    memory_type="user_preference",
    content={"preference": "window_seat", "context": "flights"}
)

# Retrieve relevant memories
relevant = memory.search_memories(
    query="seating preferences for flights",
    actor_id="user-456"
)

Common Operations

List Memories

aws bedrock-agentcore-control list-memories \
  --region us-west-2

Get Memory Details

aws bedrock-agentcore-control get-memory \
  --memory-id <MEMORY_ID> \
  --region us-west-2

Update Memory Configuration

aws bedrock-agentcore-control update-memory \
  --memory-id <MEMORY_ID> \
  --memory-strategies '[{"strategyName": "SEMANTIC"}, {"strategyName": "USER_PREFERENCE"}]' \
  --region us-west-2

Delete Memory

aws bedrock-agentcore-control delete-memory \
  --memory-id <MEMORY_ID> \
  --region us-west-2

Memory Strategies Configuration

Built-in Strategies

# Use semantic strategy
aws bedrock-agentcore-control create-memory \
  --memory-name semantic-memory \
  --memory-strategies '[{
    "strategyName": "SEMANTIC",
    "configuration": {}
  }]'

Custom Strategies

# Create custom strategy with specific model
aws bedrock-agentcore-control create-memory \
  --memory-name custom-memory \
  --memory-strategies '[{
    "strategyName": "CUSTOM",
    "configuration": {
      "modelId": "anthropic.claude-3-sonnet",
      "extractionPrompt": "Extract key user preferences from this conversation"
    }
  }]'

Best Practices

Memory Architecture

  • Design memory architecture intentionally
  • Choose appropriate strategies for use case
  • Implement proper retention policies
  • Consider memory costs and storage

Performance

  • Use appropriate time-to-live settings
  • Extract only relevant information
  • Implement rhythm of memory operations
  • Monitor memory search latency

Security

  • Implement proper access controls
  • Encrypt sensitive memories
  • Audit memory access
  • Follow data privacy regulations (GDPR, HIPAA)

Operations

  • Monitor memory usage and costs
  • Set up alerts for memory failures
  • Implement backup strategies
  • Test memory operations regularly

Troubleshooting

Issue Cause Solution
Memory not found Incorrect memory ID Verify memory ID with list command
Search returns empty No matching memories Check query and memory content
Slow memory retrieval Large memory size Implement pagination and filters
Strategy extraction fails Invalid configuration Check strategy configuration

Related Services

References

Source: SKILL.md on GitHub

1 alert16d4 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    The skill provides a comprehensive AWS Bedrock AgentCore orchestration guide with documentation, templates, and reference materials. No security issues, prompt injections, malicious dependencies, or obfuscation layers were detected.

  • Socket16d

    1 alert: gptAnomaly

  • Snyk16d

    Risk: MEDIUM · 1 issue

  • Runlayer6mo

    10/13 files flagged

Signed by skilld at e4ef2e2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 6 months ago
What it can do
Network Runs commands
MCP servers
aws-mcpawsdocsacdocs
Modelsonnet
aliases
[
  "bedrock-agentcore"
]
context
fork
model
sonnet
All 12 allowed tools
mcp__aws-mcp__*mcp__awsdocs__*mcp__acdocs__search_agentcore_docsmcp__acdocs__fetch_agentcore_docBash(aws bedrock-agentcore *)Bash(aws bedrock-agentcore-control *)Bash(aws bedrock-agentcore-runtime *)Bash(aws bedrock *)Bash(aws s3 cp *)Bash(aws s3 ls *)Bash(aws secretsmanager *)Bash(aws sts get-caller-identity)
Other metadata
skills
[
  "aws-mcp-setup"
]
hooks
{
  "PreToolUse": [
    {
      "matcher": "Bash(aws bedrock-agentcore-control create-*)",
      "command": "aws sts get-caller-identity --query Account --output text",
      "once": true
    }
  ]
}

README badge

README badge for zxkane/aws-skills/aws-agentic-ai