In Greek tragedies, the chorus fulfilled several different roles, including commentary on the actions of the play, the creation of connection between the characters and the audience, the enhancement of emotional tension and atmosphere, and the control of the play's pace. Let's see how this works in Agamemnon, Electra, and Alcestis.
In Agamemnon, the chorus offers plenty of background, commentary, and even foreshadowing. As city elders, they serve in an advisory role to the queen. They also discuss and comment on the problem of pride. They even predict the king's death.
In Electra, the chorus's primary role is consolation. They are Mycenean women who try to comfort Electra but also raise issues of sexism and the nature of grief. They offer advice as well, trying to convince Electra not to anger Aegisthus. Yet they also celebrate with Electra at the end of the play.
In Alcestis, the chorus is a group of old men, and they mediate between the audience and the characters, providing plenty of commentary and context for the events of the play. They also provide notes of grief, praise, and advice throughout the play as they grieve for Alcestis, compliment Admetos for his hospitality, and tell Admetos that he must accept both his own mortality and the suffering he experiences.