Skip to main content

What is this?

You built your agent system with strands-compose — models, tools, orchestrations, all described in YAML. It works locally. Now you want it running on AWS with per-session isolation, auto-scaling, and zero infrastructure management.

strands-compose-agentcore fills the gap between strands-compose and AWS Bedrock AgentCore Runtime. It wraps your YAML config as the ASGI app that AgentCore expects, provides a CLI for local development with a built-in REPL, and ships a client for invoking deployed agents — from the terminal or from your own apps.

Same config you already have. Same agents. Test locally, deploy, invoke — all from the command line.

See it in action

You have your strands-compose config.yaml. Here's how fast you go from zero to deployed:

Create the app — one function call wraps your config as a BedrockAgentCoreApp:

# main.py
from pathlib import Path
from strands_compose_agentcore import create_app

app = create_app(Path(__file__).parent / "config.yaml")

if __name__ == "__main__":
    app.run(port=8080)

Run locally — dev server + interactive REPL in one terminal:

sca dev --config config.yaml

Deploy to AWS — register and ship it to AgentCore Runtime:

agentcore add agent \
  --type byo \
  --name my_agent \
  --code-location my_agent \
  --entrypoint main.py \
  --language Python \
  --framework Strands \
  --model-provider Bedrock
agentcore deploy

Invoke the deployed agent — interactive REPL or programmatic client:

sca client remote --arn <ARN> --region us-west-2

Your config.yaml never changed. Your agents never changed. You just moved from laptop to managed cloud infrastructure.

What this package gives you

🏭 create_app() — the core value

The real value of this package is a single factory function. AgentCore Runtime expects a specific ASGI app with /invocations and /ping endpoints, session-aware lifecycle management, event streaming, concurrency guards, and health reporting. create_app() handles all of that — you pass your YAML config and get a production-ready BedrockAgentCoreApp with zero knowledge of the runtime contract required:

from strands_compose_agentcore import create_app

app = create_app("config.yaml")  # that's it

Without this factory, you'd need to manually wire load_config, per-session load, the ASGI lifespan, session caching and teardown, event queue plumbing, streaming serialization, and concurrency guards. create_app() does all of that in one call.

🛠️ CLI for strands-compose streaming events

The AgentCore CLI provides create, add, deploy, status, logs, and more — we recommend it and don't replace or abstract any of it.

strands-compose-agentcore CLI tools dev and client use AnsiRenderer from strands-compose to render stream events with color, formatting, and progressive typewriter output. This is the only reason we ship our own CLI — we don't duplicate or replace the AgentCore CLI, we complement it for the streaming use case it doesn't cover.

📡 A client for your apps

AgentCoreClient is an async boto3 wrapper that streams SSE events from deployed agents. LocalClient (sync) and AsyncLocalClient (async, httpx) cover the local development server. All three embed cleanly into FastAPI, Django, Lambda, or background workers — one client instance, safe for concurrent multi-tenant use, with typed errors.

How you deploy

For individual developers and small teams, we recommend the AgentCore CLI. It handles project scaffolding, packaging, and deployment in a few commands. Use sca dev for local iteration, agentcore deploy to ship.

For enterprise teams, you likely have your own infrastructure-as-code (Terraform, CDK, CloudFormation) and CI/CD pipelines. In that case, create_app() is all you need from this package — build a Docker image with your main.py and config.yaml, push it to ECR, and let your pipeline update the agent runtime. Or ship as a CodeZip artifact to S3. The AgentCore CLI is optional — it's a convenient tool, not a requirement.

See Chapter 09 — Deployment Strategies for a deep dive on both paths.

How it works

┌─────────────────────────────────────────────────────────────┐
│  config.yaml                                                │  ← You write this
│  (models, agents, tools, orchestrations)                    │
├─────────────────────────────────────────────────────────────┤
│  strands-compose                                            │  ← Parses YAML,
│  (load_config, load)                                        │     resolves agents
├─────────────────────────────────────────────────────────────┤
│  strands-compose-agentcore       ◄── THIS PACKAGE           │  ← Wraps as ASGI app,
│  (app factory, CLI toolkit, AgentCoreClient)                │     CLI, client
├─────────────────────────────────────────────────────────────┤
│  AgentCore CLI + bedrock-agentcore SDK                      │  ← Project scaffold,
│  (agentcore create/deploy, BedrockAgentCoreApp)             │     deploy, ASGI server
├─────────────────────────────────────────────────────────────┤
│  AWS Bedrock AgentCore Runtime                              │  ← Managed compute
│  (per-session microVM, auto-scaling, CloudWatch)            │     (you deploy here)
└─────────────────────────────────────────────────────────────┘

Each layer does one thing. strands-compose parses your YAML and builds agents. This package wraps them as an ASGI app and provides the CLI glue. The AgentCore CLI and SDK handle project scaffolding, deployment, and the /invocations wire protocol. AgentCore Runtime runs it all on managed infrastructure. You only touch the top two layers.

Getting started

Install

pip install strands-compose-agentcore

This pulls in strands-compose and bedrock-agentcore automatically. The AgentCore CLI is a separate Node.js tool: npm install -g @aws/agentcore

Required files

Every agent needs three files:

config.yaml — your strands-compose agent definition:

models:
  default:
    provider: bedrock
    model_id: openai.gpt-oss-20b-1:0

agents:
  assistant:
    model: default
    system_prompt: "You are a helpful assistant."

entry: assistant

main.py — the entry script:

from pathlib import Path
from strands_compose_agentcore import create_app

app = create_app(Path(__file__).parent / "config.yaml")

if __name__ == "__main__":
    app.run(port=8080)

pyproject.toml — declares dependencies for deployment:

[project]
name = "my-agent"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
    "strands-compose-agentcore",
]

The full workflow

# 1. Create an AgentCore project (AgentCore CLI)
agentcore create --name project --no-agent --skip-git
cd project

# 2. Create your agent files (main.py, config.yaml, pyproject.toml)
mkdir my_agent
# → Add the three files shown above to my_agent/

# 3. Test locally (dev server + REPL in one terminal)
sca dev --config my_agent/config.yaml

# 4. Register the agent and deploy to AWS
agentcore add agent \
  --type byo \
  --name my_agent \
  --code-location my_agent \
  --entrypoint main.py \
  --language Python \
  --framework Strands \
  --model-provider Bedrock
agentcore deploy

# 5. Connect to the live agent
sca client remote --arn <ARN> --region us-west-2

That's the entire journey — from an empty directory to a deployed, production-ready agent system. The dev command runs the exact same ASGI app that will run in production, so what works locally works deployed.

The CLI toolkit

Command What it does
dev Start the ASGI server + interactive REPL in one terminal — iterate without leaving the shell
client local Connect a REPL to a local dev server
client remote Connect a REPL to a deployed agent on AgentCore Runtime

Examples

Every example is self-contained with a README.md and everything you need to run it:

# Example What you'll learn
01 Quick Start Multi-agent orchestration with tools and the dev CLI — run and test locally
02 Deploy End-to-end deployment: create files → test → deploy → connect remotely
03 Multimodal Sending images and documents alongside text prompts
# Try the quick start example right now
sca dev --config examples/01_quick_start/config.yaml

Documentation

Deep dives into every component — architecture, API reference, deployment patterns, and advanced topics:

Chapter What it covers
01 — What Is This? The problem, the solution, the tech stack
02 — Getting Started Install, configure, run your first agent
03 — The App Factory create_app() deep dive
04 — Session & Streaming Per-session lifecycle, event queues, SSE wire protocol
05 — The CLI Every command, every flag, explained
06 — Deployment CodeZip and container paths to AgentCore Runtime
07 — The Client LocalClient, AsyncLocalClient, and AgentCoreClient API + integration patterns
08 — Advanced Topics VPC, logging, timeouts, health checks, CDK
09 — Deployment Strategies Individual developers vs enterprise teams — AgentCore CLI, IaC, CI/CD
10 — Observability Logs, traces, and token usage in CloudWatch with OpenTelemetry
Quick Recipes AWS services reference — tools, packages, and patterns at a glance

Developer setup

git clone https://github.com/strands-compose/bedrock-agentcore
cd bedrock-agentcore
uv run just install      # install deps + wire git hooks (run once after clone)

uv run just check        # lint + type check + security scan
uv run just test         # pytest with coverage
uv run just format       # auto-format (Ruff)

Re-install hooks after a fresh clone or if hooks stop running: uv run just install-hooks

See CONTRIBUTING.md for the full contribution guide, AGENTS.md for coding standards, and CHANGELOG.md for release history.


License

Apache-2.0 — see LICENSE.

Metadata

Release files for strands-compose-agentcore 0.11.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for strands-compose-agentcore 0.11.0
File Size Uploaded Provenance
strands_compose_agentcore-0.11.0.tar.gz 388.7 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for strands-compose-agentcore 0.11.0
File Interpreter ABI Platform
strands_compose_agentcore-0.11.0-py3-none-any.whl Python 3 none any Details

Total release size: 432.8 kB

Release files / strands_compose_agentcore-0.11.0.tar.gz

Download URL strands_compose_agentcore-0.11.0.tar.gz
Size 388.7 kB
Tags Source
SHA-256 checksum
How to use checksums
65ebe7cb9dc64610a86805a3d683707c693c950b0b5e33ff4e79c8580bb27ade
BLAKE2b-256 checksum
How to use checksums
b132c3ab87501f15d76c2dcab71f198b1e035bdcfef2cf7741b0294910a46785
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / strands_compose_agentcore-0.11.0-py3-none-any.whl

Download URL strands_compose_agentcore-0.11.0-py3-none-any.whl
Size 44.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1c8b1264e44185d21f30b4f19ed9d1ad75cdfa773ba81ffcdf053caf0e30a86
BLAKE2b-256 checksum
How to use checksums
06d18866d87a310c9c483ad4d205794b9ce4c26a7033472a9f76964162ed3215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for strands-compose-agentcore 0.11.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for strands_compose_agentcore-0.11.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page