npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

simple-agentcore-runtime-patterns

v0.0.1

Published

AWS CDK construct library for deploying Bedrock AgentCore Runtime

Readme

Simple AgentCore Runtime Patterns

An AWS CDK construct library for deploying AWS Bedrock AgentCore runtimes.

This library helps you deploy containerized AI agents to AWS Bedrock AgentCore using AWS CDK. It handles Docker image building, ECR deployment, IAM roles, and runtime configuration automatically.

Requirements

  • Node.js 22 or later
  • Docker or Finch (for building container images)
  • AWS CDK v2.221.0 or later

Quick Start

AWS CDK(TypeScript)

Install

npm install simple-agentcore-runtime-patterns

Example

import {
  SimpleAgentCoreRuntime,
  HttpApiAgentCoreRuntimePattern,
  WebsocketAgentCoreRuntimePattern,
  LambdaUrlStreamingAgentCoreRuntimePattern,
} from "simple-agentcore-runtime-patterns";

// Create AgentCore Runtime
const acr = new SimpleAgentCoreRuntime(stack, "MyAgent", {
  agentName: "my_bedrock_agent", // Required: snake_case, max 40 chars
  agentSrcPath: "./my-agent-code", // Required: path to your agent code
});

// [Pattern 1] HTTP API
const httpApi = new HttpApiAgentCoreRuntimePattern(this, "HttpApiPattern", {
  runtimes: [{ runtimeArn: acr.runtimeArn, routePath: "/sync" }],
  authApiKey: "prototype",
});

// [Pattern 2] WebSocket for streaming response
const websocket = new WebsocketAgentCoreRuntimePattern(
  this,
  "WebsocketPattern",
  {
    runtimeArn: acr.runtimeArn,
    authApiKey: "prototype",
  }
);

// [Pattern 3] Lambda URL for streaming response
const lambdaUrl = new LambdaUrlStreamingAgentCoreRuntimePattern(
  this,
  "LambdaUrlPattern",
  {
    runtimeArn: acr.runtimeArn,
  }
);

AWS CDK(Python)

Install

pip install simple-agentcore-runtime-patterns

Example

from simple_agentcore_runtime_patterns import SimpleAgentCoreRuntime
from simple_agentcore_runtime_patterns import HttpApiAgentCoreRuntimePattern, WebsocketAgentCoreRuntimePattern, LambdaUrlStreamingAgentCoreRuntimePattern

# Create AgentCore Runtime
acr = SimpleAgentCoreRuntime(stack, "MyAgent",
    agent_name="my_bedrock_agent",      # Required: snake_case, max 40 chars
    agent_src_path="./my-agent-code",   # Required: path to your agent code
)

# [Pattern 1] HTTP API
http_api = HttpApiAgentCoreRuntimePattern(self, "HttpApiPattern", runtimes=[{"runtimeArn": acr.runtime_arn, "routePath": "/sync"}], auth_api_key="prototype")

# [Pattern 2] WebSocket for streaming response
websocket = WebsocketAgentCoreRuntimePattern(self, "WebsocketPattern", runtime_arn=acr.runtime_arn, auth_api_key="prototype")

# [Pattern 3] Lambda URL for streaming response
lambda_url = LambdaUrlStreamingAgentCoreRuntimePattern(self, "LambdaUrlPattern", runtime_arn=acr.runtime_arn)

Architecture

Input Properties                                                         Outputs
─────────────────                                                        ───────
• agentName                                                              • runtimeId
• agentSrcPath       ┌────────────────────────────────────────────┐     • runtimeVersion
                 ───▶│ SimpleAgentCoreRuntime Construct           │────▶• runtimeArn
                     │                                             │     • runtimeExecutionRole
                     │  ┌──────────────────────────────────────┐  │
                     │  │ IAM Role                             │  │
                     │  │ (AgentCoreRuntimeExecutionRole)      │  │
                     │  │  • ECR access                        │  │
                     │  │  • CloudWatch Logs                   │  │
                     │  │  • Bedrock model invocation          │  │
                     │  └──────────────────┬───────────────────┘  │
                     │                     │                       │
                     │  ┌──────────────────▼───────────────────┐  │
Docker Image ────────┼─▶│ ECR Repository                       │  │
(from agentSrcPath)  │  │  • Stores container image            │  │
                     │  │  • Tag: latest                       │  │
                     │  └──────────────────┬───────────────────┘  │
                     │                     │                       │
                     │  ┌──────────────────▼───────────────────┐  │
                     │  │ Bedrock AgentCore Runtime            │  │
                     │  │  • Runs your agent container         │  │
                     │  │  • Network: PUBLIC (default)         │  │
                     │  │  • Environment variables             │  │
                     │  └──────────────────────────────────────┘  │
                     │                                             │
                     └────────────────────────────────────────────┘
                                      │
                                      │ checks & creates if needed
                                      ▼
                     ┌────────────────────────────────────────────┐
                     │ Service-Linked Roles (Outside Construct)   │
                     │  • Network SLR                             │
                     │  • Runtime Identity SLR                    │
                     └────────────────────────────────────────────┘

Documentation

License

MIT-0