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.
A user message enters the agent.
The model reads the instructions, the available tools, and the chat so far, then decides: answer, or use a tool.
The model asks for one tool, and the inputs to pass it.
The matching function runs. You can check or log it as it runs.
The output is captured.
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