It needs updating for my flow control and on-line reconfiguration enhancements, but this is what I have got documented at the moment: https://pagekite.net/wiki/Floss/PageKiteProtocol/
If I were starting from scratch today, I'd base off websockets instead of the HTTP chunked encoding as I did, but other than that I have been very happy with it.