You can create the state that you want, then store the state. After evaluating code, restore the state, which will put the engine back in the state it was prior to the evaluation. After creating your state by doing all of the chai.add() stuff that you want, do something like the following:
// save the state
const auto base_state = chai.get_state();
const auto base_locals = chai.get_locals();
// evaluate whatever...
// restore the state