They are very smart indeed I remember watching a documentary where the scientists captured an octopus from the sea and brought it into their boat and put it in an aquarium like container with lid on top so it's sealed.
At night the Octopus opened the lid cover got out from the container and ran out of the boat into the sea

.
That one is probably good enough to work in CIA

or British intelligence...a 007 Octopus lol