How long you stay logged in depends on how you log in:
Username and password: you stay logged in for 30 days.
Company account (SSO): you stay logged in for 12 hours.
The time starts when you log in, and using AGOA does not make it longer. You are not logged out if you stop using AGOA for a while. When the time is up, log in again.
If you can't log in, see I can't log in to AGOA — what should I check?