Added system wrapper for agent script