The adverbagorefers to a period of time that is completed and goes from a point in the past up to now.Agofollows expressions of time:
It happeneda long time ago.
They arrived in Athenssix weeks ago.
Not:They arrived in Athens ago six weeks.
We normally useagowith the past simple. We don’t use it with the present perfect:
Ireceivedhis letter four daysago.
Not:I have received his letter four days ago.
If we refer to a point in time before a specific time in the past, we usebeforeorearlierorpreviously, often with the past perfect:
Wehad gottheir invitation four daysbefore.
They met on the same island where theyhad metten yearspreviously.
If we refer to how long something lasted, we usefor(notago):
When I was at school, I studied Russianforfive years.(my studies lasted for five years)