A hermitian algebra is a unital associative ℂ-algebra endowed with an involution such that the spectra of self-adjoint elements are contained in ℝ. In the case of an algebra 𝒜 endowed with a Mackey-complete, locally convex topology such that the set of invertible elements is open and the inversion mapping is continuous, we construct the smooth structures on the appropriate versions of flag manifolds. Then we prove that if such a locally convex algebra 𝒜 is endowed with a continuous involution, then it is a hermitian algebra if and only if the natural action of all unitary groups Un(𝒜) on each flag manifold is transitive.