What you describe is very interesting and I personally think this is a move into right direction, because still a lot of ppl here think “dumb servers, smart clients, outbox, alltoclient etc”
However, you describe it as API or some set of events - and at least at first sight I don’t see why this software should be a relay. At most it may have to know how to connect to relays to get data from them