{
  "version": 1,
  "metadata": {
    "name": "bedrock-converse/drives-a-tool-loop",
    "recordedAt": "2026-05-03T20:01:48.334Z",
    "tags": [
      "prefix:bedrock-converse",
      "provider:amazon-bedrock",
      "protocol:bedrock-converse",
      "tool",
      "tool-loop",
      "golden"
    ]
  },
  "interactions": [
    {
      "transport": "http",
      "request": {
        "method": "POST",
        "url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/us.amazon.nova-micro-v1%3A0/converse-stream",
        "headers": {
          "content-type": "application/json"
        },
        "body": "{\"modelId\":\"us.amazon.nova-micro-v1:0\",\"messages\":[{\"role\":\"user\",\"content\":[{\"text\":\"What is the weather in Paris?\"}]}],\"system\":[{\"text\":\"Use the get_weather tool, then answer in one short sentence.\"}],\"inferenceConfig\":{\"maxTokens\":80,\"temperature\":0},\"toolConfig\":{\"tools\":[{\"toolSpec\":{\"name\":\"get_weather\",\"description\":\"Get current weather for a city.\",\"inputSchema\":{\"json\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false}}}}]}}"
      },
      "response": {
        "status": 200,
        "headers": {
          "content-type": "application/vnd.amazon.eventstream"
        },
        "body": "[encoded data, 9040 characters]",
        "bodyEncoding": "base64"
      }
    },
    {
      "transport": "http",
      "request": {
        "method": "POST",
        "url": "https://bedrock-runtime.us-east-1.amazonaws.com/model/us.amazon.nova-micro-v1%3A0/converse-stream",
        "headers": {
          "content-type": "application/json"
        },
        "body": "{\"modelId\":\"us.amazon.nova-micro-v1:0\",\"messages\":[{\"role\":\"user\",\"content\":[{\"text\":\"What is the weather in Paris?\"}]},{\"role\":\"assistant\",\"content\":[{\"text\":\"<thinking> To determine the weather in Paris, I will use the get_weather tool and provide the city as \\\"Paris\\\". </thinking>\\n\"},{\"toolUse\":{\"toolUseId\":\"tooluse_a8nlf2bqGLcZvaSoBpQ1sH\",\"name\":\"get_weather\",\"input\":{\"city\":\"Paris\"}}}]},{\"role\":\"user\",\"content\":[{\"toolResult\":{\"toolUseId\":\"tooluse_a8nlf2bqGLcZvaSoBpQ1sH\",\"content\":[{\"json\":{\"temperature\":22,\"condition\":\"sunny\"}}],\"status\":\"success\"}}]}],\"system\":[{\"text\":\"Use the get_weather tool, then answer in one short sentence.\"}],\"inferenceConfig\":{\"maxTokens\":80,\"temperature\":0},\"toolConfig\":{\"tools\":[{\"toolSpec\":{\"name\":\"get_weather\",\"description\":\"Get current weather for a city.\",\"inputSchema\":{\"json\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false}}}}]}}"
      },
      "response": {
        "status": 200,
        "headers": {
          "content-type": "application/vnd.amazon.eventstream"
        },
        "body": "[encoded data, 4696 characters]",
        "bodyEncoding": "base64"
      }
    }
  ]
}
