Ends in
00
days
00
hrs
00
mins
00
secs
SHOP NOW

🔔 20% OFF All Reviewers + 10% OFF PlayCloud’s First Billing Use Code: TDPLAYCLOUD-101326

Guided Lab: Creating an Amazon Bedrock AgentCore Harness

Description

Amazon Bedrock AgentCore is a managed platform designed to help you build, deploy, and run intelligent agents securely and at scale, regardless of the framework or model you choose.

An AgentCore harness is the orchestration loop. Instead of writing the loop manually, you define the agent’s configuration such as the model, system prompt, tools, memory, and operational limits. AgentCore then runs the cycle for you. The harness is powered by Strands Agents, which ensures the agent’s workflow executes smoothly and consistently.

In this lab, you will use the Amazon Bedrock AgentCore console to create a Harness that uses Amazon Nova 2 Lite as its foundation model. You will configure the Harness through the AWS Management Console, test it in the Harness playground, and verify that Nova 2 Lite responds according to the system instructions you provide.

Objectives

In this lab, you will learn how to:

  • Access Amazon Bedrock AgentCore from the AWS Management Console.
  • Create an AgentCore Harness using the Advanced create harness workflow.
  • Configure Amazon Bedrock as the model source.
  • Configure Amazon Nova 2 Lite as the Harness foundation model.
  • Define a system prompt that controls the Harness behavior.
  • Create and verify the Harness.
  • Test the Harness using the AgentCore Harness playground.
  • Verify that the Harness follows its configured system instructions.

Lab Steps

Open Amazon Bedrock AgentCore

1. In the search bar at the top of the AWS Management Console, enter: Amazon Bedrock AgentCore

2. From the search results, select Amazon Bedrock AgentCore.

3. Wait for the Amazon Bedrock AgentCore console to open.

4. In the left navigation pane, locate the Build section.

5. Select Harness.

The Harness page provides options for creating Harnesses, testing them in the playground, and reviewing their operation.

Start Creating a Harness

On the Harness page, locate Quick create harness.

Do not immediately select the main Quick create option.

Quick Create uses recommended defaults, including a default model. In this lab, you need to explicitly configure Amazon Nova 2 Lite, so you will use the advanced configuration instead.

1. Select the drop-down arrow next to Quick create harness.

2. From the menu, select: Advanced create harness

3. The Create harness configuration page opens.

The advanced creation page provides configuration sections for the model, system prompt, memory, tools, skills, advanced settings, authentication, and permissions.

 

Configure the Harness

1. At the top of the Create harness page, locate the Harness name field.

2. For Harness name, you can leave it as is, or you can enter your desired name.

3. Locate and expand the Model and system prompt section.

This section determines which foundation model the Harness will use and how that model should behave.

4. Configure the model source

  • For Model source, select: Bedrock

  • API source: Bedrock

5. Select Amazon Nova 2 Lite

  • Locate the Model field.
  • Choose the pencil icon ✏️ to select or change the model.
  • If a provider selection appears, choose: Amazon
  • Locate and select: Amazon Nova 2 Lite
  • Apply or confirm the model selection if prompted.

6. Configure the System Prompt

  • Remain in the Model and system prompt section.

  • Locate the System prompt. The system prompt defines the role, behavior, and general instructions that the Harness provides to the model.

  • Replace the default system prompt with the following:

    You are a helpful AWS cloud assistant.
    
    Your purpose is to help users understand AWS services and cloud computing concepts.
    
    Follow these guidelines:
    - Provide clear and accurate answers.
    - Explain technical concepts using beginner-friendly language.
    - Prefer concise answers unless the user asks for more detail.
    - Use bullet points when they make an explanation easier to understand.
    - When comparing AWS services, clearly explain when each service is typically used.
    - If you are uncertain about an answer, clearly state that you are uncertain.

     

  • Review the text after pasting it.

  • The Harness stores the system prompt as part of its model configuration. AgentCore uses these instructions when handling requests sent to the Harness.

Note: Leave other settings at their current default values. You do not need to modify other settings for this lab.

7. Create the Harness

  • Scroll to the bottom of the page.
  • Select Create harness.
  • The Amazon Bedrock AgentCore console begins creating the Harness and its supporting runtime configuration.
  • After creation begins, you should be taken to the Harness details page.
  • Locate the Status field. The Harness may initially show a transitional status while AgentCore prepares the resource.
  • Refresh the page if necessary until the Harness status becomes: Ready

A Harness that has completed its creation process is available for invocation and testing.

Open the Harness Playground

You will now interact with the Harness without writing any application code.

You can access it from the left navigation pane under the testing section by choosing Harness playground.

The Harness playground lets you chat with a Harness and inspect or temporarily adjust its model, system prompt, tools, skills, and invocation settings.

  1. Open Harness playground.
  2. If prompted to choose a Harness, select your recently created harness.
  3. Click the Test Harness button.
  4. Locate the configuration or Configs panel on the right side of the playground.Before submitting a prompt, inspect the playground configuration.
    • Locate Model in the configuration panel.

    • Verify that the selected model is: Nova 2 Lite

    • Locate System prompt.

    • Verify that it contains the AWS cloud assistant instructions you configured earlier.

Send Your First Prompt

In the chat input box, enter:

Explain Amazon S3 in three simple bullet points for someone who is completely new to AWS.

Submit the prompt.

Amazon Nova 2 Lite processes the request through your AgentCore Harness.

Review the generated response.

The exact wording can vary, but the response should:

  • Explain that Amazon S3 stores data or files as objects.
  • Mention S3 buckets.
  • Use beginner-friendly language.
  • Present the explanation in approximately three bullet points.

Foundation-model responses are nondeterministic, so your response does not need to match another learner’s response word-for-word.

Test the System Prompt

Next, test whether the system instructions you configured influence the model’s response.

Enter:

What is the difference between Amazon EC2 and AWS Lambda?

Submit the prompt.

Review Nova 2 Lite’s answer.

Because your system prompt instructs the Harness to explain AWS concepts using beginner-friendly language, the response should clearly distinguish concepts such as:

  • Amazon EC2 provides virtual servers that you manage.
  • AWS Lambda runs code without requiring you to manage servers.
  • EC2 is useful when you need greater control over the computing environment.
  • Lambda is useful for event-driven or short-running workloads.

The exact wording may differ.

This demonstrates how the system prompt stored in Harness controls the general behavior of the selected foundation model.

Test a Follow-Up Question

Without starting a new playground session, enter:

Which one would you recommend for a small application that only runs when a file is uploaded to Amazon S3?

Submit the prompt.

Nova 2 Lite should recognize the previous discussion and typically identify AWS Lambda as a suitable option for this event-driven scenario.

Review the explanation.

This demonstrates conversational interaction within the active Harness session.

Congratulations! You have successfully created and tested an Amazon Bedrock AgentCore Harness using Amazon Nova 2 Lite through the AWS Management Console. You now have a foundation that can later be expanded with AgentCore capabilities such as Memory, Browser, Code Interpreter, Gateway tools, Skills, authentication, and observability.

Skip to content