When building an AI agent, selecting a model is only the first step. The agent still needs tools, instructions for finishing the job, a way to manage context growth in long sessions, and guardrails before it executes any consequential actions, like issuing a refund.
We are upgrading Amazon Bedrock AgentCore harness to use Strands harness, our open-source agent harness, released earlier this year, available under an Apache 2.0 license. AgentCore harness also introduces lifecycle hooks, so you can apply your own deterministic checks and notifications at defined points in the agent loop.
With this upgrade, agents that rely on the managed defaults get a recommended model, a task-oriented system prompt, automatic prompt caching (initially for Anthropic models on Amazon Bedrock), and proactive context management. They also get additional built-in tools for planning, web retrieval, filesystem access, context offloading, and task delegation. This gives agents greater capabilities during long tasks, allowing them to keep track of subtasks, reduce context window usage, and delegate work. With hooks, you can transform non-deterministic AI behavior into predictable, safe, and governed workflows by running deterministic code at specific lifecycle checkpoints.
There’s no new resource type or integration to adopt. You automatically get both updates in the AgentCore harness you already use.
Strands capabilities, on AWS
Strands harness provides an assembled agent foundation with recommended instructions, tools, and context management. Amazon Bedrock AgentCore harness operates that foundation as a managed AWS service. The result is a production-grade default agent that doesn’t require you to assemble and operate the harness or its infrastructure yourself.
You do not need to provision compute, bundle and host the agent loop, manage session scaling, or operate tool-execution infrastructure. Each session runs in a secure, kernel-isolated microVM in AgentCore runtime, a capability of Amazon Bedrock AgentCore, with managed compute, scaling, and high availability.
AgentCore achieves this by connecting the harness to the services required for production agents, including session persistence, streaming responses, usage metadata, observability, AgentCore memory, Identity, Gateway, Browser, Code Interpreter, and customer-provided containers. You retain control over the model, instructions, tools, permissions, and lifecycle policies while AgentCore manages the underlying execution environment.
A more capable managed harness
Harness now provides a stronger experience when you use its managed defaults:
- A current recommended model. When you omit the model, Harness uses a recommended default model that evolves as new models are released, always keeping your harnesses up to date. Explicit harness-level and per-invocation model configurations continue to take precedence.
- Task-oriented instructions. The managed system prompt encourages the agent to gather relevant context, use appropriate tools, continue until the task is resolved, adapt to failures or denied actions, and verify its work before reporting completion. The default system prompt improves over time to support the latest harness behavior.
- Automatic prompt caching. For supported models using Converse on Amazon Bedrock, Harness caches the system prompt, tool definitions, and conversation history. Repeated calls with the same prompt and tool surface can use lower-priced cache-read tokens, reducing input processing latency and cost.
- Proactive context management. By default, Harness summarizes older conversation turns while retaining recent context once the context window reaches a configurable threshold. Keeping the context lean this way helps Harness run at about 34% lower token cost than other leading harnesses.
- Context offloading. Large tool results can be moved out of the immediate model context. The agent receives a preview and can retrieve the complete result when needed, reducing repeated context usage without losing access to the data.
- Planning across invocations. The
todo_writetool maintains a structured task plan that can be restored in later invocations within the same session, including after conversation summarization. - Focused delegation. The
subagenttool delegates a self-contained task to a fresh worker and returns the result to the parent agent. The worker is internal to the invocation, not a separately managed harness resource, and shares invocation limits and your tool-call lifecycle hooks. - Web retrieval. The
web_fetchtool retrieves content from a specified webpage to give your harness up-to-date external context. - Granular filesystem access. With separate
read,write, andedittools, you can grant only the granular filesystem capabilities an agent needs.
Customer-provided Model Context Protocol (MCP) servers, AgentCore Gateway (a capability of Amazon Bedrock AgentCore), Browser, Code Interpreter, inline functions, skills, memory, and customer-provided containers continue to work through the existing harness interfaces.
Recommended by default, configurable when needed
Harness manages its defaults so that agents using them receive the current AgentCore recommended experience as models, instructions, context management, and built-in capabilities improve.
Explicit configuration always takes precedence:
- Configure a model ID to keep using a specific model.
- Configure
systemPromptto completely replace the managed system prompt. - Configure
truncationto keep a specific context-management policy. - List individual
allowedToolsselectors to maintain a fixed tool surface.
When allowedTools is omitted or set to ["*"], Harness provides the current recommended built-in tool set. Because this set can gain capabilities over time, applications with a fixed security or capability boundary should list only the tools they need.
For example, the following configuration permits read-only filesystem access and web retrieval without granting shell access or file modification:
Govern consequential actions with lifecycle hooks
With lifecycle hooks, you can run your own deterministic code at defined points in the agent loop. For example, an AWS Lambda function can allow or deny a request or a tool call, and an Amazon Simple Notification Service (Amazon SNS) topic or Amazon EventBridge event bus can receive a notification to record activity or start an asynchronous workflow.
Harness supports four lifecycle events:
| Event | When it runs | Effect of a Lambda denial |
before_invocation |
Before the agent processes the request | Stops the invocation with hook_stopped |
before_tool_call |
After the model proposes a tool call and before execution | Skips the tool call. The agent loop continues |
after_tool_call |
After a tool result exists | Retains the result and stops before further inference |
after_invocation |
After the invocation completes | Reports the decision. Output already streamed cannot be retracted |
Only Lambda hooks can change the agent loop. They run synchronously and return allow or deny, with an optional reason. SNS and Amazon EventBridge hooks are notifications and don’t block the agent loop.
For example, a customer-support agent can investigate an order on its own while a before_tool_call hook checks each refund against an approval limit before the refund tool runs. The following configuration attaches that Lambda function to the harness:
The function receives the proposed tool call in the hook payload and returns a decision:
When the function denies the call, the harness skips the refund and the agent continues, so it can tell the customer that the request was escalated. Each decision also appears in the InvokeHarness response stream as a hookEvent:
Hooks also apply to subagents. When the agent delegates a task, each tool call the subagent makes runs through the same beforeToolCall and afterToolCall hooks, so delegation can’t bypass your refund policy. The invocation-level hooks (beforeInvocation, afterInvocation) run once for the whole invocation.
You configure hooks with CreateHarness or UpdateHarness. If a Lambda function times out or returns an error, the hook applies its failureMode, which defaults to deny. For timeouts, payload fields, and context limits, see Lifecycle hooks in the Amazon Bedrock AgentCore Developer Guide.
To see every event and target type working together, try the Refund Desk sample in the Amazon Bedrock AgentCore samples repository on GitHub. A six-step guided tour shows all four lifecycle events and the AWS Lambda, Amazon SNS, and Amazon EventBridge targets. It also shows validation of client-supplied inline function results and the difference between failureMode deny and allow.
Run a multi-agent research coordinator with the AgentCore CLI
Creating a harness takes a single command. You name it and set up the instructions, context policy, and limits you want. This example creates a Research Coordinator: a harness with a task-oriented system prompt and summarization-based truncation. In a single invocation, it runs a researcher, a synthesizer, and a reviewer as subagents and returns one consolidated report. You get multi-agent orchestration and context management without provisioning infrastructure or wiring the delegation yourself.
The agentcore harness commands call the harness APIs directly, so you don’t need a CLI project or a deployment step. Install the AgentCore CLI, a capability of Amazon Bedrock AgentCore, with npm:
The CLI uses your default AWS credentials. It has no --profile flag, so set the AWS_PROFILE environment variable if you want a specific profile. Save the coordinator’s instructions from the sample as system_prompt.md in your working directory.
Create the harness
This command passes the coordinator’s system prompt, a summarization policy that keeps the 30 most recent messages intact as the conversation grows, and limits high enough for the full workflow. Because it omits the model, memory, and execution role, the harness uses the current AgentCore recommended model and managed memory, and the CLI creates an execution role in IAM for you.
Creation is asynchronous. Wait for creation to finish. The last command should print READY:
Send the prompts
Invoke your harness with a new session ID. Start with a basic question. The coordinator answers it directly, without calling its subagents:
Then ask for a full research report in the same session. The coordinator plans the work and delegates to the researcher, synthesizer, and reviewer in order. It runs at most one revision cycle if the reviewer asks for it, and delivers the final report. Reusing the session ID continues the conversation in the same environment.
With --prompt, the CLI prints the completed transcript as JSON when the turn finishes. The research run takes about 10 to 15 minutes. To follow along as it works, leave out --prompt, and the CLI opens an interactive chat.
The same example in Python (boto3), including the full system prompt, is available in the AgentCore samples repository on GitHub.
Clean up
Delete the harness when you’re done. This also deletes its managed memory unless you pass --delete-managed-memory false. The execution role that the CLI created stays in your account, so delete it in the IAM console if you no longer need it.
Rollout and compatibility
On November 11, AgentCore harness began rolling out the Strands harness-backed experience to new and existing harnesses. No customer action is required.
Configuration you explicitly provide remains unchanged. Harnesses that omit the model, system prompt, or truncation configuration, or use allowedTools: ["*"], receive the upgraded managed defaults.
If your application requires fixed behavior or a fixed capability boundary, configure those settings explicitly.
Learn more
Create and invoke an AgentCore harness as you do today. Use the managed defaults for the complete current recommended experience, or configure individual settings when your application requires fixed behavior.
- Strands harness announcement.
- Get started with AgentCore harness.
- Managed system prompt.
- AgentCore harness API reference.
- Lifecycle hooks.
- Refund Desk lifecycle hooks code sample.
We look forward to seeing what you build with the upgraded AgentCore harness.






