Just generally stay away from them. If you have to go to the swamp take a tame with high torpor to battle them away as their health is rubbish.

More Titanoboa Encountering Tips