This is a copy from a very knowledgeable rat lover, I'm sure she wouldn't mind me coying this info here. I've asked her in the past for other info and she indeed gave me permission. I can't find her anymore so I'll just post it cause it's really good information:
Bitter almonds (Prunus dulcis amara) when raw contain amygdalin which
after contact with water (such as in the mouth or in the stomach) releases
hydrocyanide. So bitter almonds are quite toxic if not correctly prepared.
Hydrocyanic acid (aka Prussic acid) breaks down quickly when heated & is
deactivated by preparation, but when raw a single bitter almond yields one
milligram of hydrocyanide, which could kill a rat. It would take 20 raw
bitter almonds to kill an adult human, ten to kill a child or a
medium-sized dog.
Although completely safe after heating, there are nevertheless major legal
restrictions in the United States regarding sale of bitter almonds, which
makes them nearly impossible for you or I or any member of the public to
obtain. They are used in the manufacture of syrups & extracts & we can
obtain these utterly safe syrups & extracts, but the raw bitter almond
itself most of us Americans will never in our life see, because our
government doesn't trust us to not be retarded about preparation, & from
what I've seen, our government is probably right. But most other countries
assume their citizens aren't dumb enough to eat bitter almonds raw.
Sweet almonds (Prunus dulcis dulcis) are not toxic. Almonds grown in
California for the domestic market are devoid of amygdalin, hence cannot
under any circumstance produce hydrocyanide; you could even eat them raw,
though they're only sold blanched or roasted. Imported sweet almonds if
raw will have trace amounts of amygdalin if raw (insufficient to harm even
a rodent), & none whatsoever as prepared for market. But our domestic
almonds don't contain amygdalin even when raw, so lack even the most
far-out distant chance of so much as the mildest toxicity.
Sweet almonds are however 50% fat -- no nut should be a major part of a
rodent's diet, whose fat requirements are very low. On the other hand
sweet almonds do have beneficial antioxidants, plant proteins, minerals,
vitamins A & B, & other nutritious, tasty, & healthy benefits, so are a
good-health treat for rats just so long as the total daily fat intake of a
rat is monitored.
By the by, apple seeds also contain amygdaline which releases hydrocyanide
if chewed or injested. Giving a rat an apple core with seeds in it could
therefore be dangerous. Pits of cherries, plums, peaches, & apricots are
likewise harbingers of hydrocyanide, but the toxic kernel is difficult to
get at because the pit is so hard on the outside, whereas appleseeds are
more accessible. Although the amount of hydrocyanide obtainable from a
couple appleseeds isn't likely to be sufficient to kill a rodent, it's
even so a more sensible thing to avoid than sweet almonds.