I didn't understand this, Duoas. Please would you elaborate a bit? Terms like basic language interpreter and sandbox environment are completely new to me.
For example, you could embed a Tcl interpreter in your program (TCL or Tool Command Language is a script language). Or, you could link a Python interpreter into your application.
In either case, you can extend the interpreted language itself to provide functionality specific to your application. Once done, the end-users could write their AI scripts in the embedded language (e.g. Tcl or Python), and your program will execute the end-user's code as needed.
The end-user's code would be a simple text file (just like all code files).
However, executing code you didn't write is a security concern, so you will need to implement the interpreter such that the end-user's code cannot do anything it shouldn't (like access files, or create sockets, etc.) Such an interpreter is said to exist in a sandbox --basically a controlled environment. Sand stays in; foreign material stays out.
Fortunately, this is very easy to do in Tcl and Python (and Scheme :-).
Socket programming is a pain in C/C++. If you were to embed Tcl or Python, you could use the embedded language's facilities to open and manage the socket. Both Tcl and Python make handling sockets trivial.
Whether you choose to do this or not you've got a lot of homework ahead of you. Good …