It is important to remember that Cassandra famously was the lover of Apollo, but because she refused to bear him a child, she was cursed with being able to predict the future, but with nobody believing her predictions. Cassandra's role in this play, as she is brought back from Troy as the prisoner and slave to Agamemnon, is to be able to predict and see what will happen imminently, tragically being able to see openly what Clytemnestra is planning but also the wider tragedy that will befall Agamemnon's family. Note, for example, what she says in the following quote:
Ah, damned woman, will you do this thing? Your husband, the partner of your bed, when you have cheered him with the bath, will you—how shall I tell the end? Soon it will be done. Now this hand, now that, she stretches forth!
Clearly, to the audience, such predictions cannot be clearer, as they obviously point to Clytemnestra's murder of her husband. However, because of Apollo's curse, her words are dismissed as impenetrable "dark oracles" that only serve to bewilder the Chorus. Cassandra's function as a character is to therefore greatly add to the dramatic irony of the play: the audience knows the legend of Agamemnon, and knows his fate, but that sense of dramatic irony is keenly heightened when there is a character who does everything she can to alert the other characters to the impending tragedy, and yet is unsuccessful. In some ways, Cassandra provides more of a choric function than the Chorus themselves, as it is they who are unsuccessful in interpreting her prophecies. Cassandra is the only character who truly sees clearly in the play, but her tragedy is that nobody else believes what she sees.