A caterpillar which attracts ants

       During a trip in the Valais in June 2010 (Switzerland) I came across this head of Onobrychis sp. To my surprise there were some caterpillars of a Lycaenid butterfly on this foodplant. Their colours were very similar to that of the flowers themselves and these larvas would have been easy to miss without the ants that were interacting frantically with them.
  This is a typical scene of myrmecophily, which is a sophisticated relationship between caterpillars of some Lycaenid species and ants.
The identification of the caterpillars is not certain but they could be of Green-underside Blue (Glaucopsyche alexi)...

The pictures above show different scenes of the association ant-caterpillar. Thanks to the help of Mr Claude Lebas and his website (http://cle.fourmis.free.fr/index.html) the ant was identified with certainty : Camponotus aethiops. The larvas were quite variable in size and they also showed different colours (greenish, yellowish, pinkinsh...)
    On each of the two pictures here , one of the caterpillars exteriorizes briefly its tentacular glands (see the close up below) ; this is something rather hard to catch with the camera because it is such an ephemeral instant.
It seems that tentacular glands release some chemicals which calm down the ants, avoiding attacks.
When stimulating the larva, the ant gets  a drop of nutritive liquid from the caterpillar ; on the picture here an ant is licking the drop which is produced by the Newcomer's gland located on the backpart of the larva.
In a way ants take care of larvas (without attacking them) and receive food as counterpart
 Close up showing the caterpillar's eversible tentacular glands when moving outwards

 Close up showing the Newcomer's gland just before releasing  the drop (a tentacular gland is still out); it seems that the ant triggered the drop releasing by touching the rear part of the caterpillar with its antennas.  Close up showing the ant eagerly licking the liquid. Fascinating...

 From time to time some ants were interacting with each other, as if they were exchanging something. The larger ant was perhaps tasked to collect liquids harvested by ant-workers.