agent: minor fixes

- Update comment for StateEvent
- resources() needn't return reference