Various aspects of sociality in mammals (e.g., dyadic connectedness) are linked with measures of biological fitness (e.g., longevity). How within- and between-individual variation in relevant social traits arises in uncontrolled wild populations is challenging to determine but is crucial for understanding constraints on the evolution of sociality. We use an advanced statistical method, known as the ‘animal model’, which incorporates pedigree information, to look at social, genetic, and environmental influences on sociality in a long-lived wild primate. We leverage a longitudinal database spanning 20 years of observation on individually recognized white-faced capuchin monkeys (Cebus capucinus imitator), with a multi-generational pedigree. We analyze two measures of spatial association, using repeat sampling of 376 individuals (mean: 53.5 months per subject, range: 6–185 months per subject). Conditioned on the effects of age, sex, group size, seasonality, and El Niño–Southern Oscillation phases, we show low to moderate long-term repeatability (across years) of the proportion of time spent social (posterior mode [95% Highest Posterior Density interval]: 0.207 [0.169, 0.265]) and of average number of partners (0.144 [0.113, 0.181]) (latent scale). Most of this long-term repeatability could be explained by modest heritability (h2social: 0.152 [0.094, 0.207]; h2partners: 0.113 [0.076, 0.149]) with small long-term maternal effects (m2social: 0.000 [0.000, 0.045]; m2partners: 0.000 [0.000, 0.041]). Our models capture the majority of variance in our behavioral traits, with much of the variance explained by temporally changing factors, such as group of residence, highlighting potential limits to the evolvability of our trait due to social and environmental constraints.