Thanks for taking the time to reply to my comment and sorry for the short reply from my side - I am in a hurry.
In case you were looking for a similar text-based integration of a layout engine with your tool there is a textual DSL for ELK called ELKT:
http://rtsys.informatik.uni-kiel.de/elklive/
One could certainly feed that into a binary running the kernel similarly to how a DOT file is fed into graphviz.