agent: Use getter functions instead of vars