  Canonical extension has proven to be a powerful tool in algebraic study of
propositional logics. In this paper we describe a generalization of the theory
of canonical extension to the setting of first order logic. We define a notion
of canonical extension for coherent categories. These are the categorical
analogues of distributive lattices and they provide categorical semantics for
coherent logic. We describe a universal property of our construction and show
that it generalises the existing notion of canonical extension for distributive
lattices. Our new construction for coherent categories has led us to an
alternative description of the topos of types, introduced by Makkai in the late
seventies. This allows us to give new and transparent proofs of some properties
of the action of the topos of types construction on morphisms. Furthermore, we
prove a new result relating, for a coherent category, its topos of types to its
category of models (in Sets).
