Frank Ocean's cousin has a simple confession -- he did indeed go on the attack against Chris Brown and his entourage at a recording studio back in January ... but he did it to protect his flesh and blood.
The cousin -- Sha'keir Duarte -- is embroiled in a lawsuit with Brown, with each suing the other over the fight.
In new legal docs -- obtained by TMZ -- Durate confesses he used force, but insists it was reasonable and necessary in defense of himself and Frank. Duarte says a guy named Hood -- allegedly part of Brown's posse -- was on the attack and had to be stopped.
Duarte is suing Brown for more than $3 mil.