agent: add Exit method
agent: test kill after grace period