This paper deals with the integration of robotic milking in the dairy farm and focusses on the following aspects: (a) required milking capacity of robotic milking units, (b) cow traffic and visits to the milking units and (c) design of total systems. The capacity of a milking stall in milkings per hour depends on the milking time per milking, the occupation time of the milking stall and the accessability of the milking parlour. Based on milk yields of 14.1, 10.7 and 8.1 kg per milking at 2, 3 or 4 times daily milking, milking stall occupation times of 8.5, 8.1 and 7.0 min per milking were established. It is expected that because of cows loitering at or obstructing the entry or exit and because of a certain daily pattern in the AMS visits, an effective occupation of about 60% of the milking stall will be possible. The capacity is then 4.2: 4.5 and 5.2 milkings per hour. It was assumed that an AMS-stall is available 20 h per day for milking and 4 h per day for cleaning. For a herd of 100 lactating cows, three times daily milking and an occupation time of the milking stall of 60% of the available 20 h, four milking stalls are needed. Based on experiences gained in various experiments a lay out is suggested for an automatic milking system with automatic voluntary cow traffic. For automatic milking in a milking parlour with milking of cows in batches (human controlled cow traffic) the number of milking stalls will depend mainly on the chosen group size. For labour reasons this group size should not be too small and may vary between 50 and 100 cows. Based on the requirement that a group of cows has to be milked within approximately 1 h and an automatic milking stall with a 100% occupation time, the required number of milking stalls for three times per day milking and for herd sizes of 50, 100 and 200 cows are respectively 6, 6 and 8. Plans for cubicle houses with automatic cow traffic are provided. (C) 1997 Elsevier Science B.V.