The documentation [1] has details. For input they get an RGB image (i.e. what a player would see on the screen, minus the UI) and other relevant information (e.g. inventory). For output they have to specify from a list of possible actions that they can take: move forward, move back, craft an item, etc.
[1] http://minerl.io/docs/tutorials/index.html