Interactions with other responsive agents lie at the core of all social exchange. During a social exchange with a partner, one fundamental variable that must be computed correctly is who gets credit for a shared outcome; this assignment is crucial for deciding on an optimal level of cooperation that avoids simple exploitation. We carried out an iterated, two-person economic exchange and made simultaneous hemodynamic measurements from each player's brain. These joint measurements revealed agent-specific responses in the social domain ("me" and "not me") arranged in a systematic spatial pattern along the cingulate cortex. This systematic response pattern did not depend on metrical aspects of the exchange, and it disappeared completely in the absence of a responding partner.