make Agent parent of ScriptEngine so they stay on same thread