Whenever any person arraigned on an indictment or information before the superior court shall appear to the court to be non compos mentis and for that reason would be unable to give recognizance, the court in its discretion may appoint a guardian ad litem to give recognizance on behalf of the accused together with sureties, and the guardian ad litem shall be personally responsible for the compliance by the accused with the terms of recognizance; provided, that this procedure shall apply only when the offense is bailable.
R.I. Gen. Laws § 12-13-3