◈ AWS AGENTCORE BLUEPRINTS
PART I · FOUNDATIONS · CHAPTER 04 / 36
TOCCONSULTING.FR
AMAZON BEDROCK / AGENT EXECUTION DETAIL

INSIDE AN AGENTCORE AGENT

CHAPTER 04 / 36
TOPIC harness, loop, a Strands call
REV 2026.07
New to these words? Read chapter 02 "Key terms". It defines agent, model, tool, the loop, session, and microVM.
[ 1 ] WHAT THE HARNESS IS
AGENTCORE HARNESSGA

Every agent runs a loop: the model thinks, picks a tool, the tool runs, the result comes back, and it thinks again, until it has an answer. To run that loop you also need a computer to run on, a safe place to run code, secure links to tools, memory, identity, and a way to see what happened. All of that together is the harness. The managed harness in AgentCore turns it into settings, not code: you declare the model, the tools (functions and APIs the agent can call), and the instructions, and AgentCore provides the environment, compute, sandbox, memory, identity, networking, and the ability to see what happened. Swapping a model or adding a tool is a config change. Each session (one conversation, possibly many invocations; reuse the same session id to continue it) keeps its state and runs in an isolated microVM (a tiny private computer for that one session) with its own filesystem and shell. The harness is powered by Strands Agents, the open-source framework from AWS.

YOU DECLARE
model + instructions + tools (functions and APIs it can call)
AGENTCORE RUNS
the loop, plus the computer, a safe code sandbox, the tools, memory, identity, networking, and the traces that show what happened
[ 2 ] THE AGENTIC LOOP, ONE TURN AT A TIME
L01

INPUT

A user message enters the agent.

==>
L02

MODEL THINKS

The model reads the instructions, the available tools, and the chat so far, then decides: answer, or use a tool.

==>
L03

PICK A TOOL

The model asks for one tool, and the inputs to pass it.

==>
L04

RUN THE TOOL

The matching function runs. You can check or log it as it runs.

==>
L05

TOOL RESULT

The output is captured.

repeat: the result is fed back to the model, until it stops calling tools
when the model needs no tool ==>
L06 FINAL RESPONSE. The model returns the answer. The loop ends.
[ 3 ] WHAT A STRANDS CALL LOOKS LIKE
from strands import Agent, tool

@tool
def search_logs(query: str) -> list:
    """Search application logs."""  # the docstring tells the model
    return log_api.search(query)        # what this tool is for

agent = Agent(tools=[search_logs])     # wire a model + tools into one agent
agent("Find timeout errors from the last 6 hours")
#  ^ this single call runs the whole loop above
CODE TO LOOP
@tool marks a plain function as a tool the model may choose at L03, and runs at L04.
Agent(...) binds the model and the tools. Add a system prompt for the instructions.
agent("...") sends the input at L01 and drives L02 to L05 until the L06 answer.
Tools can also come from Gateway and MCP servers, or the built-in Browser and Code Interpreter.
SRC: AWS AgentCore Developer Guide (harness, runtime), strandsagents.com
DRAWN 2026.06, REV 2026.07.26
◄ PREVIOUS · CH 03
AgentCore, Common Mistakes Explained
NEXT · CH 05 ►
Harness, Practical 1, Strands Path
AWS AGENTCORE BLUEPRINTS · CONTENTS
Back to tocconsulting.fr Cover & Table of Contents
PART I · FOUNDATIONS
01AgentCore Overview, Plain LanguageCONCEPT02AgentCore, Key Terms in Plain LanguageCONCEPT03AgentCore, Common Mistakes ExplainedCONCEPT04Inside an AgentCore Agent, BlueprintCONCEPT05Harness, Practical 1, Strands PathPRACTICAL06Harness, Practical 2, Managed HarnessPRACTICAL
PART II · CORE SERVICES
07AgentCore Runtime, Plain LanguageCONCEPT08AgentCore Runtime, PracticalPRACTICAL09AgentCore Memory, Plain LanguageCONCEPT10AgentCore Memory, PracticalPRACTICAL11AgentCore Gateway, Plain LanguageCONCEPT12AgentCore Gateway, PracticalPRACTICAL13AgentCore Identity, Plain LanguageCONCEPT14AgentCore Identity, PracticalPRACTICAL
PART III · TOOLS AND OPERATIONS
15AgentCore Code Interpreter, Plain LanguageCONCEPT16AgentCore Code Interpreter, PracticalPRACTICAL17AgentCore Browser, Plain LanguageCONCEPT18AgentCore Browser, PracticalPRACTICAL19AgentCore Observability, Plain LanguageCONCEPT20AgentCore Observability, PracticalPRACTICAL21AgentCore Evaluations, Plain LanguageCONCEPT22AgentCore Evaluations, PracticalPRACTICAL
PART IV · GOVERNANCE AND TRANSACTIONS
23AgentCore Policy, Plain LanguageCONCEPT24AgentCore Policy, PracticalPRACTICAL25AgentCore Registry, Plain LanguageCONCEPT26AgentCore Registry, PracticalPRACTICAL27AgentCore Payments, Plain LanguageCONCEPT28AgentCore Payments, PracticalPRACTICAL
PART V · MULTI-AGENT AND ARCHITECTURE
29A2A and Multi-Agent, Plain LanguageCONCEPT30A2A and Multi-Agent, PracticalPRACTICAL31Architecture Patterns, Plain LanguageCONCEPT32Multi-Tenant Agents, Plain LanguageCONCEPT33Agent Security and Threat Model, Plain LanguageCONCEPT34Governance at Org Scale, Plain LanguageCONCEPT35Governance at Org Scale, PracticalPRACTICAL36Multi-Region and Distribution, Plain LanguageCONCEPT