ChrisDoesCloud
← All talks

Zero to Agent: A Beginner's Guide to AWS AgentCore and Strands SDK

Build and Deploy Your First Agent with Strands and Amazon Bedrock AgentCore

Target Audience: Developers with basic Python experience who are curious about AI agents
Prerequisites: AWS account, Python 3.11+, Node.js 20+, basic command-line familiarity
Demo code: github.com/chrismgonzalez/zero-to-agent-demo

Note: The demo uses uv as the Python package manager and the agentcore CLI (installed from npm) for running and deploying the agent.

What We Built

A weather agent that:

  • Answers questions in natural language ("What's the weather in Chattanooga?")
  • Calls the National Weather Service API for live forecasts
  • Runs on Amazon Nova Pro through Amazon Bedrock
  • Runs locally, then deploys to AWS with one command
  • Has a Streamlit chat UI that talks to the deployed agent

The talk had three steps:

  1. A plain Strands agent
  2. The same agent wrapped for AgentCore
  3. Deploy it and chat with it

You don't need ML expertise or infrastructure knowledge.

Why AI Agents Matter

Chatbots answer questions. Agents take actions.

Chatbot Agent
Responds to user messages Works toward a goal
Usually text in, text out Can call tools and APIs
Limited to conversation Can take actions
Often stateless May use sessions, memory, or context

A model alone can't tell you tomorrow's forecast in Chattanooga. It has no access to current data. Give it a tool that calls a weather API and it can look the answer up.

What Is an AI Agent?

An AI agent is an application that:

  1. Uses a foundation model to reason about a task
  2. Decides what steps to take
  3. Uses tools when needed
  4. Returns a useful result

Core Components

  • Model: the foundation model doing the reasoning (Amazon Nova Pro here)
  • System prompt: guidance on how the agent behaves
  • Tools: functions the agent can call (here, an HTTP request tool)
  • Runtime: where the agent code runs
  • Observability: logs and traces that show what the agent did

The Two Pieces

Strands Agents SDK is an open-source Python framework for building agents. You define the model, the prompt and the tools. Strands runs the loop: send the prompt to the model, execute any tool the model asks for, feed the result back, and repeat until the model has an answer.

Amazon Bedrock AgentCore is the managed platform for running agents in production. A local agent is fine for a demo. Production needs hosting, authentication, session isolation, scaling and monitoring, and AgentCore Runtime provides those so you don't build them yourself.

Strands helps you build the agent. AgentCore helps you run it.

Setup

git clone https://github.com/chrismgonzalez/zero-to-agent-demo
cd zero-to-agent-demo

uv venv --python 3.11
source .venv/bin/activate
uv pip install -e .

npm install -g @aws/agentcore

# Verify your toolchain
agentcore --version
aws sts get-caller-identity

Your AWS credentials need access to Amazon Bedrock. The demo defaults to the us.amazon.nova-pro-v1:0 model in us-east-2. Override either with the BEDROCK_MODEL_ID and BEDROCK_REGION environment variables.

Part 1: A Plain Strands Agent

Start with Strands by itself, before AgentCore is involved. This is main-strands.py:

import os
from strands import Agent
from strands.models import BedrockModel
from strands_tools import http_request

BEDROCK_MODEL_ID = os.environ.get("BEDROCK_MODEL_ID", "us.amazon.nova-pro-v1:0")
BEDROCK_REGION = os.environ.get("BEDROCK_REGION", "us-east-2")

WEATHER_SYSTEM_PROMPT = """You are a weather assistant with HTTP capabilities. You can:

1. Make HTTP requests to the National Weather Service API
2. Process and display weather forecast data
3. Provide weather information for locations in the United States

When retrieving weather information:
1. First get the coordinates or grid information using https://api.weather.gov/points/{latitude},{longitude} or https://api.weather.gov/points/{zipcode}
2. Then use the returned forecast URL to get the actual forecast

When displaying responses:
- Format weather data in a human-readable way
- Highlight important information like temperature, precipitation, and alerts
- Handle errors appropriately
- Convert technical terms to user-friendly language

Always explain the weather conditions clearly and provide context for the forecast.
"""

agent = Agent(
    system_prompt=WEATHER_SYSTEM_PROMPT,
    tools=[http_request],
    model=BedrockModel(
        model_id=BEDROCK_MODEL_ID,
        region_name=BEDROCK_REGION,
    ),
)

agent("What is the weather in Chattanooga?")

Run it:

uv run main-strands.py

What's Happening

The agent has no weather data of its own. It has a model, a prompt and one tool.

  1. The model reads the question and the system prompt
  2. It decides it needs a forecast and calls http_request against api.weather.gov/points/...
  3. The API returns grid information, including a forecast URL
  4. The model makes a second http_request call to that forecast URL
  5. It turns the raw JSON into a readable answer

The agent chose which URLs to call and in what order. Nothing in the code spells out those steps. The system prompt describes the two-step lookup, and the model works out the rest.

The System Prompt Is Part of the Design

The prompt does real work here. It:

  • Defines the role (weather assistant)
  • Tells the agent which API to use and how to use it (points endpoint first, then the forecast URL)
  • Sets the output style (human-readable, plain language)
  • Tells it to handle errors

main.py adds one more constraint: "Only use api.weather.gov to find your weather forecast data." A rule like that keeps the agent from wandering to other sources.

Gotcha: The Strands Agent parameter is system_prompt, not instructions. Using instructions= raises Agent.__init__() got an unexpected keyword argument 'instructions'.

Part 2: Make It an AgentCore Agent

To run on AgentCore, wrap the same agent in an entrypoint. This is main.py. The agent definition is unchanged, and these lines are new:

from bedrock_agentcore import BedrockAgentCoreApp

# ... same agent definition as before ...

app = BedrockAgentCoreApp()


@app.entrypoint
def invoke(payload):
    """Main entrypoint for AgentCore runtime."""
    user_message = payload.get("prompt", "Hello")
    result = agent(user_message)
    return {"result": result.message}


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

BedrockAgentCoreApp turns your Python function into an HTTP service with the contract AgentCore Runtime expects. The @app.entrypoint function receives a JSON payload and returns a JSON response. Your agent code doesn't change.

main.py also turns on telemetry so traces show up in AgentCore observability:

from strands.telemetry import StrandsTelemetry

if not os.environ.get("AGENT_OBSERVABILITY_ENABLED"):
    StrandsTelemetry().setup_otlp_exporter()

Run It Locally First

make dev        # agentcore dev, serves on :8080

From another terminal:

agentcore invoke '{"prompt": "What'\''s the weather in Seattle?"}'

This runs the same code that will run in AWS, on your machine, with hot reload. Debug here before you deploy.

Part 3: Deploy to AWS

make deploy     # agentcore deploy

The project configuration lives in agentcore/agentcore.json. The runtime definition looks like this:

{
  "runtimes": [
    {
      "name": "weather_agent",
      "build": "CodeZip",
      "entrypoint": "main.py",
      "codeLocation": "./",
      "runtimeVersion": "PYTHON_3_14",
      "networkMode": "PUBLIC",
      "protocol": "HTTP"
    }
  ]
}
  • build: CodeZip: your Python source is zipped and deployed directly, with no Dockerfile. (Container is the alternative if you need a custom image.)
  • entrypoint: the file that defines the BedrockAgentCoreApp
  • protocol: HTTP: a standard HTTP agent endpoint. AgentCore also supports MCP and A2A.
  • networkMode: PUBLIC: the runtime isn't attached to a VPC

agentcore deploy synthesizes a CDK project under agentcore/cdk/ and deploys it to your account as a CloudFormation stack. That includes the runtime, its IAM role and the supporting resources. The JSON files are the source of truth. Change the config, not the generated CDK code.

Useful commands after deploying:

make status     # agentcore status: deployment status
make invoke     # agentcore invoke: send a message to the deployed agent
make logs       # agentcore logs

agentcore traces shows traces for each invocation, so you can see the model calls and tool calls behind an answer.

Part 4: Chat With It

The last piece is a Streamlit UI (chat_app.py) that calls the deployed runtime:

make ui         # uv run --extra ui streamlit run chat_app.py

How it connects:

  • It reads the region from agentcore/aws-targets.json
  • It reads the runtime ARN from agentcore/.cli/deployed-state.json, which the CLI writes on deploy
  • It calls the runtime with boto3:
client = boto3.client("bedrock-agentcore", region_name=region)

response = client.invoke_agent_runtime(
    agentRuntimeArn=agent_arn,
    runtimeSessionId=st.session_state["session_id"],
    payload=json.dumps({"prompt": message}).encode(),
)

Two details matter:

  • Session ID. runtimeSessionId must be 33 to 256 characters. The UI generates one per chat, and AgentCore uses it to isolate sessions from each other.
  • Credentials. The UI invokes the runtime with your local AWS credentials. Keep it local and don't expose the Streamlit process publicly.

Ask it for the forecast in Seattle, whether it will rain in Denver tomorrow, or what Miami looks like this weekend.

What the Demo Showed

Step What you did What it showed
1 Ran main-strands.py An agent is a model, a prompt and a tool in a loop
2 Added BedrockAgentCoreApp Going to production doesn't change the agent code
3 Ran agentcore deploy One command builds and deploys the runtime
4 Ran the Streamlit UI A deployed agent is an endpoint any app can call

Troubleshooting

Deploy fails with "Cloud assembly schema version mismatch"

If agentcore deploy fails at Synthesize CloudFormation with Maximum schema version supported is 53.x.x, but found 54.0.0:

Cause: The generated agentcore/cdk/ project pulls in aws-cdk-lib >=2.258.0, which emits cloud assembly schema 54. The CDK toolkit bundled in the AgentCore CLI reads up to schema 53.

Fix: Pin aws-cdk-lib to 2.257.0 in agentcore/cdk/package.json, then reinstall:

cd agentcore/cdk
rm -rf node_modules package-lock.json
npm install
cd ../..
agentcore deploy

agentcore/cdk/ is generated, so re-apply the pin if the CLI regenerates it.

botocore MissingDependencyException

uv pip install "botocore[crt]"

Port 8080 already in use

lsof -ti:8080 | xargs kill -9

Agent returns nothing useful

  • Check agentcore logs and agentcore traces
  • Confirm your account has access to the Bedrock model in the configured region
  • Run main-strands.py directly to rule out the AgentCore wrapper

Cleaning Up

make delete     # agentcore remove all, then agentcore deploy

This tears down the deployed resources so the demo stops costing anything.

Where to Go Next

This agent has one tool and no memory. To extend it:

  • Add tools. Use the @tool decorator to turn any Python function into a tool. Keep the docstring clear, because the model reads it to decide when to call the tool.
  • Add memory. AgentCore Memory (agentcore add memory) keeps context across sessions.
  • Add authentication. The default is IAM. Use a JWT authorizer if end users call the endpoint directly.
  • Add a gateway. AgentCore Gateway exposes Lambda functions, OpenAPI specs and MCP servers as tools.
  • Add evaluations. agentcore eval runs evaluators against your agent.

Picking a First Agent

A good first agent is easy to explain, narrow in scope, connected to one or two tools, and safe to test with limited permissions. "Look up a forecast" fits. "Build me a digital employee" doesn't.

Key Takeaways

  1. An agent is a model, a system prompt and tools, running in a loop
  2. Strands handles that loop in a few lines of Python
  3. The system prompt shapes how the agent uses its tools
  4. Moving to AgentCore means adding an entrypoint. The agent code stays the same.
  5. agentcore dev runs locally and agentcore deploy ships to AWS
  6. Start with one task and one tool

Resources

This talk was presented at Scenic City Summit on June 5, 2026.