This thread is a detailed description about how I keep my snakes and about their behavior.
The short version…
You need a large enclosure. I think the minimum for an adult Spilotes (or a pair) should be 200 cm x 90 cm x 150 cm (ca. 7 x 3 x 5 ft). If you can provide more space in any dimension, go for it. Spilotes is a very active snake and will use any available inch. You might certainly keep it alive in a smaller box, but you will deprive yourself of a lot of fun watching your snake move for hours. If the enclosure is too small, the snake will not move much (where should it move to?).
You need some large branches, a large water bowl and some hiding places. You can use living plants, they will help you to keep the humidity on a high level. For more details read my older thread. If you have any additional questions I will gladly try to answer them for you.