AgentCore harness with Amazon Ergo: switch model for one turn, keep the session
One harness, one session: the model changes per invocation, the conversation does not.
AWS Cloud
Region us-east-1
Presenter
quickstart.py
three turns, one session ID
IAM execution role
trusts bedrock-agentcore.amazonaws.com
AgentCore harness
default model: Nova Micro
memory disabled
Session microVM
AgentCore Runtime
agent loop, holds the turns
Amazon Nova Micro
us.amazon.nova-micro-v1:0
turns 1 and 3
Amazon Ergo
global.amazon.ergo-1.0
turn 2 only
1
2
3
4
5
6
1
2
3
4
5
6
LINES
InvokeHarness turns and default model calls
Model call overridden to Ergo
Create and delete
Assume role
FLOW
The script creates the execution role, scoped to the two inference profiles.
CreateHarness sets Nova Micro as the default model. READY takes about 4 minutes.
Turn 1 starts a session microVM. It is told a codeword.
The session assumes the role and calls the default model through Converse.
Turn 2 passes model in InvokeHarness: that one call goes to Ergo, with the history.
Turn 3 omits model and returns to the default. The script then deletes everything.