Greetings, and welcome to the forums!!
A few questions to help us give the best advice! What species, sex, ( if known) age, and how long you have had this bird? It is possible, given the right conditions, your bird may either be entering adolescence or hormonal, a temporary event that can twist the most mellow bird into a rampaging bundle of offense!
Has the bird recently visited a certified avian vet to check health? You mention a rescue; it may be impossible to learn the possible horrors he has endured. There is often a "honeymoon" during which time the bird is fairly placid as it assesses the new environment.