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.

servicescode-interpreterREADME.md

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

AgentCore Code Interpreter Service

Status: ✅ Available

Overview

Amazon Bedrock AgentCore Code Interpreter enables agents to securely execute code in isolated sandbox environments, supporting complex data analysis workflows and computational tasks.

Core Capabilities

Secure Execution

  • Isolated Sandboxes: Each code execution runs in a completely isolated environment
  • No Cross-Contamination: Sessions are independent with no shared state
  • Enterprise Security: Meets enterprise security and compliance requirements
  • Resource Controls: Configurable limits and timeout controls for execution

Framework Integration

  • Popular Frameworks: Seamless integration with LangGraph, CrewAI, Strands, and other agent frameworks
  • Multi-Language Support: Execute code in Python, JavaScript, and other languages
  • Advanced Configuration: Extensive customization options for runtime environments
  • Custom Runtimes: Support for specialized runtime configurations

Data Processing

  • File Operations: Upload and download files for processing
  • Multi-Modal Data: Handle structured and unstructured data
  • Result Formatting: Format and visualize execution results
  • Error Handling: Comprehensive error reporting and debugging support

Use Cases

Data Analysis and Transformation

Enable agents to:

  • Process and analyze datasets
  • Transform data formats
  • Perform statistical calculations
  • Generate data insights

Complex Computational Workflows

Support scenarios like:

  • Running scientific computations
  • Executing business logic calculations
  • Processing batch operations
  • Performing iterative algorithms

Visualization and Reporting

Allow agents to:

  • Generate charts and graphs
  • Create formatted reports
  • Build visualizations from data
  • Export results in various formats

Dynamic Code Testing

Enable agents to:

  • Test code snippets dynamically
  • Validate logic and algorithms
  • Debug code execution issues
  • Prototype solutions quickly

Architecture

Execution Flow

Agent Request
    ↓
┌─────────────────────────────────────────┐
│  Code Interpreter Service               │
│  - Parse code execution request         │
│  - Validate code and parameters         │
│  - Allocate isolated sandbox            │
└─────────────────────────────────────────┘
    ↓
┌─────────────────────────────────────────┐
│  Sandbox Environment                    │
│  - Execute code in isolation            │
│  - Process data and files               │
│  - Generate outputs                     │
│  - Capture errors and logs              │
└─────────────────────────────────────────┘
    ↓
┌─────────────────────────────────────────┐
│  Result Processing                      │
│  - Format execution results             │
│  - Package outputs and artifacts        │
│  - Return to agent                      │
└─────────────────────────────────────────┘

Security Model

  1. Sandbox Isolation: Each execution runs in a completely isolated environment
  2. Resource Limits: CPU, memory, and time limits prevent resource exhaustion
  3. Network Restrictions: Controlled network access from sandbox environments
  4. Data Encryption: Data at rest and in transit is encrypted
  5. Audit Logging: All code executions are logged for compliance

Configuration

Basic Setup

# Configure code interpreter for agent
aws bedrock-agentcore-control configure-code-interpreter \
  --agent-id <AGENT_ID> \
  --execution-timeout 300 \
  --memory-limit 2048 \
  --region <REGION>

Custom Runtime Configuration

# Set custom runtime environment
aws bedrock-agentcore-control update-code-interpreter-runtime \
  --agent-id <AGENT_ID> \
  --runtime-config '{
    "language": "python3.11",
    "packages": ["pandas", "numpy", "matplotlib"],
    "environment": {
      "CUSTOM_VAR": "value"
    }
  }' \
  --region <REGION>

Best Practices

Code Security

  • Validate all code inputs before execution
  • Implement input sanitization for user-provided code
  • Use resource limits to prevent denial of service
  • Monitor code execution patterns for anomalies

Performance Optimization

  • Cache common dependencies in runtime images
  • Use appropriate timeout values for expected workload
  • Optimize code for execution within timeout limits
  • Batch similar operations when possible

Error Handling

  • Implement comprehensive error catching in code
  • Provide clear error messages for debugging
  • Log execution details for troubleshooting
  • Use structured output formats for results

Data Management

  • Minimize data transfer in and out of sandboxes
  • Use streaming for large data processing
  • Clean up temporary files after execution
  • Implement data validation before processing

Integration Patterns

With Memory Service

Code Interpreter ←→ Memory Service
- Store execution results in memory
- Retrieve past computation results
- Share data across agent sessions

With Identity Service

Code Interpreter ←→ Identity Service
- Authenticate code execution requests
- Access credentials for external APIs
- Manage permissions for data access

With Observability Service

Code Interpreter ←→ Observability Service
- Trace code execution workflows
- Monitor performance metrics
- Log execution events
- Alert on execution failures

Troubleshooting

Common Issues

Execution Timeout

  • Symptom: Code execution exceeds timeout limit
  • Solution: Increase timeout or optimize code performance

Memory Limit Exceeded

  • Symptom: Code runs out of memory
  • Solution: Increase memory limit or process data in chunks

Package Import Errors

  • Symptom: Required packages not found
  • Solution: Configure custom runtime with needed packages

Permission Denied

  • Symptom: Cannot access required resources
  • Solution: Configure IAM permissions for code interpreter

Monitoring

Key Metrics

  • Execution Count: Number of code executions
  • Success Rate: Percentage of successful executions
  • Average Duration: Mean execution time
  • Error Rate: Percentage of failed executions
  • Resource Utilization: CPU and memory usage

CloudWatch Integration

# Query execution metrics
aws cloudwatch get-metric-statistics \
  --namespace AWS/BedrockAgentCore/CodeInterpreter \
  --metric-name ExecutionCount \
  --dimensions Name=AgentId,Value=<AGENT_ID> \
  --start-time <START> \
  --end-time <END> \
  --period 3600 \
  --statistics Sum

Additional Resources


Related Services:

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