AWS Builder Center

From Prototype to Production: Building My First Agent with Amazon Bedrock AgentCore’s Harness and CLI

A hands-on look at Amazon Bedrock AgentCore's managed harness and CLI: define an agent without orchestration code, then take it to production with CDK.

Building an agent used to mean writing the plumbing yourself: the reasoning loop, tool routing, session state, and a deployment pipeline. Amazon Bedrock AgentCore's managed harness aims to remove most of that. In this post I walk through what the harness does, how I set up an agent with the AgentCore CLI, and what to consider before taking it to production.

What's new in AgentCore

In April 2026, AgentCore added three things aimed at getting from idea to working agent faster:
  • Managed harness (preview at launch): you define an agent by choosing a model, writing a system prompt, and listing tools. The harness runs the full agent loop: reasoning, tool selection, action execution, and response streaming. You don't write orchestration code.
  • AgentCore CLI: deploys your agent as infrastructure as code, so changes are governed and auditable.
  • AgentCore skills for coding assistants: prebuilt guidance so tools like Kiro give accurate, current AgentCore instructions.
Since then, AWS CDK constructs for AgentCore have become stable, harnesses support bring-your-own file systems (Amazon S3 Files and Amazon EFS), and a Step Functions integration has been added.

How the harness works

Each session runs in its own microVM with filesystem and shell access, so the agent can run code and keep working files. The harness is model-agnostic, and every invocation can override the settings you chose at creation time, so you can try a different model or prompt without redeploying. When you want full control, you can export the setup as Strands-based code.
File system persistence externalizes a session's local state. An agent can pause mid-task and resume exactly where it stopped.

Setting it up

My agent: [ONE SENTENCE ON WHAT YOU BUILT]
  1. Install and configure the AgentCore CLI by following the current AgentCore docs.
  2. Create the agent by specifying the model, system prompt, and tools.
  3. Invoke it and inspect the response.
Issues I ran into: [YOUR REAL ERRORS AND FIXES, e.g. region availability, IAM permissions]
[Add a screenshot of your first successful invocation.]

Experimenting without redeploying

Because settings can be overridden per invocation, I compared [MODEL A] and [MODEL B] on the same task:
Model AModel B
Answer quality[yours][yours]
Latency[yours][yours]
Tool-call accuracy[yours][yours]

Moving to production

Once the prototype works, the CLI deploys it as infrastructure as code. CDK is the supported resource manager, and Terraform support was announced as coming. With the CDK constructs now stable, you can keep the agent definition in version control and review changes like any other infrastructure.
For multi-step workflows, you can invoke the harness from AWS Step Functions.

Things to check before you commit

  • Preview status and regions: the harness launched in preview in a limited set of regions. Check the current docs for availability.
  • Pricing: the launch announcement said there was no extra charge for the harness, CLI, or skills, but you still pay for the underlying resources. Verify against the pricing page.
  • Debugging and observability: [YOUR EXPERIENCE]
  • Control: if you need a custom agent loop, export to Strands.

When I'd use it

The harness is a good fit for quick prototypes, small teams that don't want to maintain orchestration code, and projects that need an infrastructure-as-code path to production. I'd skip it when [YOUR OPINION].

Wrap-up

What are you building with AgentCore? Share your setup or questions in the comments.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article