AWS Bedrock agentcore vs harness coding perspective
In bedrock agentcore, we have harness and runtime. We going to look at the code differences trying to invoke them. Whenever possible, ry to use 'bedrock-agentcore' as it is the newer package atleast for now. Older library typically uses bedrock-agent-runtime . https://docs.aws.amazon.com/boto3/latest/reference/services/bedrock-agent-runtime.html Harness Notice that everything is the same except we need to update harnessArn and we invoke the method invoke_harness(). Notice we are instantiating 'bedrick-agentcore'. There's also a client called 'bedrock-agent-runtime. And when you see the word harness - you know you're in a good seat. :) import boto3 import json import uuid client = boto3.client( 'bedrock-agentcore' , region_name = 'ap-southeast-2' ) session_id = str (uuid.uuid4()) response = client.invoke_harness( harnessArn = 'your-harness-arn' , runtimeSessionId = session_id, messages = [ { ...