Anna Tang was freed by a judge in Middlesex Superior Court on Monday rather than sent to a psychiatric hospital as prosecutors requested.
Tang, who had attended Wellesley College, waived her right to a jury trial. In December, a judge found her not guilty by reason of insanity of charges including armed assault with attempt to murder.
She was sent to a mental health facility. Her lawyer tells The Boston Globe she has responded well to treatment and poses no danger.
The lawyer says she was not being properly treated for bipolar disorder and depression at the time of the attack.
Information from: The Boston Globe, http://www.boston.com/globe