Social network analysis and agent-based modeling are two approaches used to study biological and artificial multi-agent systems. However, so far there is little work integrating these two approaches. Here we present a first step toward integration. We developed a novel approach that allows the creation of a social network on the basis of measures of interactions in an agent-based model for purposes of social network analysis. We illustrate this approach by applying it to a minimalist case study in swarm robotics loosely inspired by ant foraging behavior. For simplicity, we measured a network’s inter-agent connection weights as the total number of interactions between mobile agents. This measure allowed us to construct weighted directed networks from the simulation results. We then applied standard methods from social network analysis, specifically focusing on node centralities, to find out which are the most influential nodes in the network. This revealed that task allocation emerges and induces two classes of agents, namely foragers and loafers, and that their relative frequency depends on food availability. This finding is consistent with the behavioral analysis, thereby showing the compatibility of these two approaches.