Self-organisation is a promising solution for building complicated, large-scale software systems that must meet stringent adaptability and survivability requirements. At the same time, controlling self-organising software to ensure global system properties and functions is a difficult problem. This paper proposes a solution that uses architectural templates, or archetypes, replicated across a set of identical agents, and interpreted at runtime to control the agents’ self-organising behaviour and results. The solution ensures, by construction, that any resulting software system meets a set of predefined goals, or constraints, while maintaining many of the self-organisation related advantages. A framework prototype was implemented and tested to show the viability of the proposed approach, in the context of a distributed data-mediation application.