Just remember this: the agent of a sentence is the one doing the action of the verb. Consider the following sentences:
(1) The car struck the fence.
(2) The fence was struck by the car.
In both (1) and (2) it is the car that is doing striking, even though in (2) it is NOT the subject. It is the subject that does the action of the active sentence, and the noun of the prepositional phrase in the passive (if the sentence has a prepositional phrase at all) that is the agent.