sane ScriptValue
convert to shared_ptr agentClass