Amber Portwood has a chance to avoid jail time in her domestic violence case after striking a plea deal ... TMZ has learned.
According to new legal docs obtained by TMZ ... the "Teen Mom OG" star has agreed to plead guilty to 2 felonies -- domestic battery and intimidation. As part of the deal, she'll get 906 days of probation and if she successfully completes it ... the domestic battery charge will be dismissed and the intimidation charge will be reduced to a misdemeanor.
Amber must also take 26 weeks of a Batterers' Intervention Program, submit to random urine and breath testing. She's also been ordered not to contact her ex-BF, Andrew Glennon, EXCEPT for arranging custody exchanges of their 1-year-old son, James.
TMZ broke the story ... Amber was busted back in July in Indianapolis after Andrew claimed she attacked him while he was holding their son. Andrew said she came after him with a machete during the attack.