1) How long does a grayed out agent goes away?
2) Is it possible to get it back?
1) This would vary depending on the time range and resolution selected for the metric view. The agent instance would go away when the agent metric data corresponding to the selected time range and resolution could no longer be retrieved.
2) Changing the time range and resolution to the time period still having the agent metric data should get the corresponding agent instances displayed.