When instantiating `createDeepAgent` and defining state we're having to cast to any. Fix type issues associated with this.