Is there a gameplay API?

As a research project, I am aiming to build a generic AI player that would be able to play general games rather than fixed scenarios similar to those preloaded AI players. I am wondering if there is a gameplay API that would allow me to test this player actions in a programmable way or if there are plans to allow something like that (similar to Starcraft). I could attempt to do screen capture but that would add one more layer of complexity to the project.