AI agents

Amazon Bedrock AgentCore integrates Strands harness and lifecycle hooks

AWS updates AgentCore with Strands defaults, built-in tools for planning and retrieval, and deterministic lifecycle hooks for safer agent execution.

A glass cube with glowing circuits and gears on a desk with notes and a tablet
Illustration generated for this article

Amazon Web Services has upgraded its Amazon Bedrock AgentCore harness to incorporate the open-source Strands harness. Released on November 19, 2026, this update introduces managed defaults for model selection and context management, new built-in tools for task delegation, and lifecycle hooks that allow developers to enforce deterministic checks during agent execution.

What happened

The core change involves merging the capabilities of Strands, an open-source agent framework released earlier in the year under an Apache 2.0 license, into the managed AWS service. This integration means that agents using AgentCore no longer require developers to manually assemble the underlying infrastructure for session scaling, tool execution, or compute provisioning. Instead, the service now provides a production-grade default agent foundation that runs in secure, kernel-isolated microVMs within the AgentCore runtime.

This upgrade is automatic for existing and new harnesses. Developers who rely on managed defaults will immediately benefit from updated recommended models, task-oriented system prompts, and proactive context management strategies. Those who have explicitly configured specific models, prompts, or tool sets will see no change to their current behavior, ensuring backward compatibility while offering enhanced capabilities for those who choose to adopt the new defaults.

How it works

The updated harness operates by connecting the Strands foundation to various AWS services required for production agents, including session persistence, observability, and identity management. A key technical improvement is the introduction of automatic prompt caching for supported Anthropic models via the Converse API. This mechanism caches system prompts, tool definitions, and conversation history, allowing repeated calls to use lower-priced cache-read tokens. Additionally, the harness employs proactive context management by summarizing older conversation turns once a configurable threshold is reached, which reportedly reduces token costs by approximately 34% compared to other leading harnesses.

To handle complex tasks, the harness includes several built-in tools. The todo_write tool maintains a structured task plan across invocations, while the subagent tool delegates self-contained tasks to internal workers without creating separate managed resources. Context offloading allows large tool results to be moved out of the immediate model context, providing only a preview to the agent until full retrieval is necessary. These mechanisms help manage context window limits and improve efficiency during long-running sessions.

Key details

  • Lifecycle hooks: Developers can attach AWS Lambda functions to four specific events: before_invocation, before_tool_call, after_tool_call, and after_invocation. These hooks run synchronously and can allow or deny actions, enabling deterministic governance over non-deterministic AI behavior.
  • Built-in tools: New default tools include web_fetch for external context, granular filesystem access (read, write, edit), and subagent for task delegation. Tools are accessible via the allowedTools configuration.
  • Context management: The harness automatically summarizes older messages while preserving recent context. It also supports context offloading to reduce immediate memory usage without losing data access.
  • Cost efficiency: Automatic prompt caching and proactive summarization contribute to a reported 34% lower token cost compared to other harnesses, primarily by reducing input processing latency and reusing cached tokens.
  • Security and isolation: Each session runs in a secure, kernel-isolated microVM. Hooks apply to subagents as well, ensuring that delegated tasks cannot bypass policies such as refund limits.
  • CLI support: The AgentCore CLI allows users to create and invoke harnesses directly. A sample "Research Coordinator" demonstrates multi-agent orchestration using subagents for research, synthesis, and review.

Why it matters

For software engineers building AI agents, the primary challenge has often been bridging the gap between probabilistic model outputs and deterministic business logic. The introduction of lifecycle hooks addresses this by allowing developers to insert hard-coded checks at critical points in the agent loop. For instance, a customer support agent can be prevented from issuing refunds above a certain threshold by a Lambda function that evaluates the request before execution. This transforms AI agents from unpredictable black boxes into governed workflows that align with enterprise safety standards.

Furthermore, the managed defaults reduce the operational overhead of maintaining agent infrastructure. By handling session scaling, compute provisioning, and context management automatically, AWS enables teams to focus on agent logic rather than infrastructure plumbing. The ability to delegate tasks to subagents and offload context also means that agents can handle more complex, multi-step workflows without hitting context window limits or incurring excessive token costs. This makes it feasible to deploy sophisticated agents in production environments where reliability and cost control are paramount.

What you can do

  • Review your harness configuration: If you rely on managed defaults, test your agents to ensure they behave as expected with the new Strands-based prompts and tools. Explicitly configure allowedTools if you need to restrict capabilities.
  • Implement lifecycle hooks: Identify high-risk actions in your agent workflows, such as database writes or financial transactions, and attach Lambda functions to the before_tool_call event to validate inputs.
  • Optimize for cost: Enable automatic prompt caching if you are using supported Anthropic models. Adjust the summarization threshold in the truncation configuration to balance context retention with token usage.
  • Experiment with subagents: Use the subagent tool to break down complex tasks into smaller, manageable units. Test the delegation workflow using the AgentCore CLI to understand how context is shared and maintained.
  • Update your CLI tools: Install or update the @aws/agentcore npm package to access the latest CLI features. Use the provided samples, such as the Refund Desk or Research Coordinator, to learn how to configure hooks and multi-agent workflows.
  • Monitor hook decisions: Check the InvokeHarness response stream for hookEvent entries to audit when and why specific actions were denied or allowed by your lifecycle hooks.
  • #aws
  • #ai-agents
  • #bedrock
  • #machine-learning
  • #cloud-computing

Tools from the Bytechap store

Keep reading

All stories