A definable groupoid over a theory is an internal groupoid in the category of definable sets and definable functions, i.e. the internal groupoid in the category of functors . Similarly, for more general notion of a definable category over .
In particular, there is much studied case of definable groups, cf. e.g. (Peterzil-Pillay)
There is a bijective correspondence between internal imaginary sorts of and definable concrete groupoids with a single isomorphism class (both up to equivalence.)
This is (Hrushovski 2006, Th.3.2).
Alessandro Berarducci, Definable groups in o-minimal structures, pdf; Cohomology of groups in o-minimal structures: acyclicity of the infinitesimal subgroup, J. Symbolic Logic 74:3 (2009), 891-900, MR2548466, euclid, doi, O-minimal spectra, infinitesimal subgroups and cohomology, J. Symbolic Logic 72 (2007), no. 4, pp. 1177–1193, MR2371198, euclid, doi
Margarita Otero, A survey on groups definable in o-minimal structures, in: Model theory with applications to algebra and analysis. Vol. 2, 177–206, London Math. Soc. Lecture Note Ser. 350, Cambridge Univ. Press 2008, MR2010b:03042, doi