The Tanakh contains the rule that Jewish slaves would be released following seven years of service, but that was replaced in the Talmud with potentially indefinite slavery, accompanied by a process whereby slaves could be freed, called manumission [REF].
Scholars are unsure to what extent the laws encouraging humane treatment were followed.