I actually considered doing something like this during my holiday break, but ended up fixing drawterm instead and never got around to it.
But I don’t think I could have done a better job than Jasmin did in this writeup, and the agent itself is pretty neat. If I wasn’t behind schedule on pretty much everything right now, I’d be hacking on it myself, and it’s just depressing to ponder when I’ll be on vacation again…