Guide to Integrate AWS Strands Agent with AgentCore Runtime using SDK Integration

Published: (December 26, 2025 at 02:38 AM EST)
1 min read
Source: Dev.to

Source: Dev.to

Prerequisites

There are two deployment approaches with AgentCore:

  • SDK Integration – with automatic HTTP setup and built‑in deployment options.
  • Custom – manual configuration.

SDK Integration

Use the SDK to integrate the AWS Strands Agent with the AgentCore runtime.

Installation

pip install bedrock-agentcore

Create the Agent

from bedrock_agentcore.runtime import BedrockAgentCoreApp
from strands import Agent

app = BedrockAgentCoreApp()
agent = Agent()

@app.entrypoint
def invoke(payload):
    """Process user input and return a response."""
    user_message = payload.get("prompt", "Hello")
    result = agent(user_message)
    return {"result": result.message}

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

Test the Agent

Run the script locally:

python my_agent.py

Test the endpoint with curl:

curl -X POST http://localhost:8080/invocations \
  -H "Content-Type: application/json" \
  -d '{"prompt": "Hello world!"}'

Choose Your Deployment Method

Using StarterToolkit (Method 1 – Quick Prototyping)

Directory layout:

your_project_directory/
│   __init__.py      # Makes the directory a Python package
│   requirements.txt

Note: The agentcore launch --local command requires a container engine (Docker, Finch, or Podman) for local testing. This step is optional; you can skip directly to agentcore launch for AWS deployment if local testing isn’t needed.

Using Boto3 (Method 2 – Manual Deployment)

For more control over the deployment process:

  1. Package your code as a container image.
  2. Push the image to Amazon Elastic Container Registry (ECR).
  3. Deploy using Boto3 scripts or AWS SDK calls.
Back to Blog

Related posts

Read more »

Perl 🐪 Weekly #753 - Happy New Year!

Originally published at Perl Weekly 753 Hi there! There wasn’t a lot of action this week, but I ran a live session on contributing to a Perl project and another...

Jupyter NoteBook

!Cover image for Jupyter NoteBookhttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.am...

Binaries

The 2 GiB “Relocation Barrier” – Why Massive Binaries Break on x86‑64 A problem I ran into while pursuing my PhD and submitting academic articles was that I ha...