interactions:
- request:
    body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
      15 + 27 using your add_numbers tool. Report the result."}]}], "inferenceConfig":
      {"stopSequences": ["\nObservation:"]}, "system": [{"text": "You are Calculator.
      You are a calculator assistant that uses tools to compute results.\nYour personal
      goal is: Perform calculations using available tools"}], "toolConfig": {"tools":
      [{"toolSpec": {"name": "add_numbers", "description": "Add two numbers together
      and return the sum.", "inputSchema": {"json": {"properties": {"a": {"title":
      "A", "type": "integer"}, "b": {"title": "B", "type": "integer"}}, "required":
      ["a", "b"], "type": "object", "additionalProperties": false}}}}, {"toolSpec":
      {"name": "structured_output", "description": "Use this tool to provide your
      final structured response. Call this tool when you have gathered all necessary
      information and are ready to provide the final answer in the required format.",
      "inputSchema": {"json": {"description": "Structured output for calculation results.",
      "properties": {"operation": {"description": "The mathematical operation performed",
      "title": "Operation", "type": "string"}, "result": {"description": "The result
      of the calculation", "title": "Result", "type": "integer"}, "explanation": {"description":
      "Brief explanation of the calculation", "title": "Explanation", "type": "string"}},
      "required": ["operation", "result", "explanation"], "title": "CalculationResult",
      "type": "object", "additionalProperties": false}}}}]}}'
    headers:
      Content-Length:
      - '1509'
      Content-Type:
      - !!binary |
        YXBwbGljYXRpb24vanNvbg==
      User-Agent:
      - X-USER-AGENT-XXX
      amz-sdk-invocation-id:
      - AMZ-SDK-INVOCATION-ID-XXX
      amz-sdk-request:
      - !!binary |
        YXR0ZW1wdD0x
      authorization:
      - AUTHORIZATION-XXX
      x-amz-date:
      - X-AMZ-DATE-XXX
    method: POST
    uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-sonnet-20240229-v1%3A0/converse
  response:
    body:
      string: '{"metrics":{"latencyMs":1968},"output":{"message":{"content":[{"text":"Okay,
        let''s calculate 15 + 27 using the add_numbers tool:"},{"toolUse":{"input":{"a":15,"b":27},"name":"add_numbers","toolUseId":"tooluse_pSseOamVELzpL3kQG5VukN"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"inputTokens":488,"outputTokens":91,"serverToolUsage":{},"totalTokens":579}}'
    headers:
      Connection:
      - keep-alive
      Content-Length:
      - '366'
      Content-Type:
      - application/json
      Date:
      - Thu, 12 Feb 2026 22:01:04 GMT
      x-amzn-RequestId:
      - X-AMZN-REQUESTID-XXX
    status:
      code: 200
      message: OK
- request:
    body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
      15 + 27 using your add_numbers tool. Report the result."}]}, {"role": "assistant",
      "content": [{"toolUse": {"toolUseId": "tooluse_pSseOamVELzpL3kQG5VukN", "name":
      "add_numbers", "input": {"a": 15, "b": 27}}}]}, {"role": "user", "content":
      [{"toolResult": {"toolUseId": "tooluse_pSseOamVELzpL3kQG5VukN", "content": [{"text":
      "42"}]}}]}], "inferenceConfig": {"stopSequences": ["\nObservation:"]}, "system":
      [{"text": "You are Calculator. You are a calculator assistant that uses tools
      to compute results.\nYour personal goal is: Perform calculations using available
      tools"}], "toolConfig": {"tools": [{"toolSpec": {"name": "add_numbers", "description":
      "Add two numbers together and return the sum.", "inputSchema": {"json": {"properties":
      {"a": {"title": "A", "type": "integer"}, "b": {"title": "B", "type": "integer"}},
      "required": ["a", "b"], "type": "object", "additionalProperties": false}}}},
      {"toolSpec": {"name": "structured_output", "description": "Use this tool to
      provide your final structured response. Call this tool when you have gathered
      all necessary information and are ready to provide the final answer in the required
      format.", "inputSchema": {"json": {"description": "Structured output for calculation
      results.", "properties": {"operation": {"description": "The mathematical operation
      performed", "title": "Operation", "type": "string"}, "result": {"description":
      "The result of the calculation", "title": "Result", "type": "integer"}, "explanation":
      {"description": "Brief explanation of the calculation", "title": "Explanation",
      "type": "string"}}, "required": ["operation", "result", "explanation"], "title":
      "CalculationResult", "type": "object", "additionalProperties": false}}}}]}}'
    headers:
      Content-Length:
      - '1784'
      Content-Type:
      - !!binary |
        YXBwbGljYXRpb24vanNvbg==
      User-Agent:
      - X-USER-AGENT-XXX
      amz-sdk-invocation-id:
      - AMZ-SDK-INVOCATION-ID-XXX
      amz-sdk-request:
      - !!binary |
        YXR0ZW1wdD0x
      authorization:
      - AUTHORIZATION-XXX
      x-amz-date:
      - X-AMZ-DATE-XXX
    method: POST
    uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-sonnet-20240229-v1%3A0/converse
  response:
    body:
      string: '{"metrics":{"latencyMs":7598},"output":{"message":{"content":[{"toolUse":{"input":{"operation":"Addition","result":42,"explanation":"I
        added 15 and 27 using the add_numbers tool."},"name":"structured_output","toolUseId":"tooluse_RT8uSPaM37Q8CVuo3rJLtI"}}],"role":"assistant"}},"stopReason":"tool_use","usage":{"inputTokens":571,"outputTokens":102,"serverToolUsage":{},"totalTokens":673}}'
    headers:
      Connection:
      - keep-alive
      Content-Length:
      - '387'
      Content-Type:
      - application/json
      Date:
      - Thu, 12 Feb 2026 22:01:12 GMT
      x-amzn-RequestId:
      - X-AMZN-REQUESTID-XXX
    status:
      code: 200
      message: OK
- request:
    body: '{"messages": [{"role": "user", "content": [{"text": "\nCurrent Task: Calculate
      15 + 27 using your add_numbers tool. Report the result."}]}, {"role": "assistant",
      "content": [{"toolUse": {"toolUseId": "tooluse_pSseOamVELzpL3kQG5VukN", "name":
      "add_numbers", "input": {"a": 15, "b": 27}}}]}, {"role": "user", "content":
      [{"toolResult": {"toolUseId": "tooluse_pSseOamVELzpL3kQG5VukN", "content": [{"text":
      "42"}]}}]}, {"role": "assistant", "content": [{"text": "{\"operation\":\"Addition\",\"result\":42,\"explanation\":\"I
      added 15 and 27 using the add_numbers tool.\"}"}]}], "inferenceConfig": {"stopSequences":
      ["\nObservation:"]}, "system": [{"text": "You are Calculator. You are a calculator
      assistant that uses tools to compute results.\nYour personal goal is: Perform
      calculations using available tools"}], "toolConfig": {"tools": [{"toolSpec":
      {"name": "add_numbers", "description": "Add two numbers together and return
      the sum.", "inputSchema": {"json": {"properties": {"a": {"title": "A", "type":
      "integer"}, "b": {"title": "B", "type": "integer"}}, "required": ["a", "b"],
      "type": "object", "additionalProperties": false}}}}, {"toolSpec": {"name": "structured_output",
      "description": "Use this tool to provide your final structured response. Call
      this tool when you have gathered all necessary information and are ready to
      provide the final answer in the required format.", "inputSchema": {"json": {"description":
      "Structured output for calculation results.", "properties": {"operation": {"description":
      "The mathematical operation performed", "title": "Operation", "type": "string"},
      "result": {"description": "The result of the calculation", "title": "Result",
      "type": "integer"}, "explanation": {"description": "Brief explanation of the
      calculation", "title": "Explanation", "type": "string"}}, "required": ["operation",
      "result", "explanation"], "title": "CalculationResult", "type": "object", "additionalProperties":
      false}}}}]}}'
    headers:
      Content-Length:
      - '1942'
      Content-Type:
      - !!binary |
        YXBwbGljYXRpb24vanNvbg==
      User-Agent:
      - X-USER-AGENT-XXX
      amz-sdk-invocation-id:
      - AMZ-SDK-INVOCATION-ID-XXX
      amz-sdk-request:
      - !!binary |
        YXR0ZW1wdD0x
      authorization:
      - AUTHORIZATION-XXX
      x-amz-date:
      - X-AMZ-DATE-XXX
    method: POST
    uri: https://bedrock-runtime.us-east-1.amazonaws.com/model/anthropic.claude-3-sonnet-20240229-v1%3A0/converse
  response:
    body:
      string: '{"message":"The model returned the following errors: Your API request
        included an `assistant` message in the final position, which would pre-fill
        the `assistant` response. When using tools, pre-filling the `assistant` response
        is not supported."}'
    headers:
      Connection:
      - keep-alive
      Content-Length:
      - '246'
      Content-Type:
      - application/json
      Date:
      - Thu, 12 Feb 2026 22:01:12 GMT
      x-amzn-ErrorType:
      - ValidationException:http://internal.amazon.com/coral/com.amazon.bedrock/
      x-amzn-RequestId:
      - X-AMZN-REQUESTID-XXX
    status:
      code: 400
      message: Bad Request
version: 1
