Print directly to System Agent from Custom Code

See below. This code should get you going.