They almost always will go for a n-ap when I play impossible, which is all I do play. About 1/4 of the time, they will agree right off, without trading or gifting them a tech. If I do tech trading or gift them, they will go for the n-ap maybe 90%. Once I got a n-ap, about half the time they will go for a trade or research treaty. Sometimes both, although in the early part of a game, I may not be able to afford starting both at once. If they are not interested in a tt or rt right away, I just wait a few turns and they usually will go for one of them. Sometimes, I've forgotten about getting the tt and rt and the aliens ring me up and offer one. Once in a while, there will be one stubborn race not interested in anything, and then I treat them like I do a repulsive race. Which means I will probably attack them first.
I don't really worry much about giving the AI techs, unless it's something very powerful like an Orion tech. I may hold off on a way unbalanced or useless trade if I don't need to make that AI race more friendly. Since the AI often trade among themselves, I figure if I trade a tech to one, I might as well trade it to all of them that I can. If I'm not planning on war right away, I'll usually make the necessary trades for the treaties so I don't have to worry as much about that race attacking while I build up.
The AI usually go to war against the player over a spy frame or because the player is weaker and the AI want to take a system from them. But like a lot of the game, it's pretty much random. Having treaties with the AI race often buys one an extra spy framing event, they'll often dump the treaties, instead of go to war. A lot of this depends on the AI's traits, which I think the game randomly assigns at the start. Those that are xenophobic usually are hard to get along with and are very likely to be aggressive, or war over the slightest perceived insult. They are usually harder to get treaties with, and break them easily. Expansionist is another to watch out for. Xenophobic expansionist.
Edit. - ironically, I just started a game to test out an idea for a mod and the first race I ran into were Klakons. And they were xenophobic expansionist.
But they only wanted 1 tech for a nap, which is surprising, so I gave it to them. Didn't get around to the other treaties till around 20 turns later because I forgot. By then they were happy and willing. Usually within half a dozen turns of a nap, the AI is ready to do a tt or rt. About 40 turns after meeting the Klakon, I met the Meklars and Humans. Both were willing to do a nap straight off with no bribes.