Have a look at Delphi Web Script. I've added a tutorial on using it for AI but it could be used for all sorts of scripting stuff.

http://www.dwscript.com/