The words “agent” and “subject” perform different functions. Linguists distinguish between two ways of looking at language: (1) you can look at the semantic role a word is performing, or (2) you can look at the grammatical relationship between words in a sentence.Semantic relationships are functions like agent, recipient, patient, and location.Grammatical relationships are things like subject, indirect object, direct object, and prepositional phrase.Let’s take the sentence: “Alex gave Robin a pineapple in London.Alex is the agent — Alex is the one who is acting.Robin is the recipient — Robin is the one who gets the pineapple.The pineapple is the patient — the pineapple is the thing that is affected by the action of the verb.London is the location — London is where the whole thing took place.Now, let’s try a few variants.Robin was given a pineapple by Alex in London.The pineapple was given to Robin by Alex in London.London is where Alex gave Robin the pineapple.In all of these sentences, Alex, Robin, the pineapple, and London have the same semantic roles. So they remain, respectively, the agent, the recipient, the patient, and the location.Moving forward, let’s look at the grammatical roles these words play, we will look at the superficial sentence structure.In the sentence, “Robin was given a pineapple . . .” Robin is the grammatical subject.In the sentence, “Alex gave Robin a pineapple . . .” Robin is the indirect object.In the sentence, “Alex gave a pineapple to Robin . . .” Robin is the object of a preposition.What does all of this have to do with your question?When you’re looking at the structure of a western Indo-European language, concepts like “subject” and “direct object” make a lot of sense. Western Indo-European languages tend to have reasonably analogous surface structures.But when the language you’re looking at is non-Indo-European, sometimes it makes more sense to analyze sentences by looking at the semantic roles that words play in them, rather than trying to force concepts like “direct object” onto a language that may not have that particular surface structure. Basque is a non-Indo-European language, despite the fact that it is spoken in Europe.I don’t speak Basque, and I know very little about that language. My specialty area is American Sign Language (ASL), which is also a non-Indo-European language whose surface structures are very different from the ones that are common in most Indo-European languages. I use a semantic grammar all the time when I look at ASL, because I always feel like I’m trying to force a square peg into a round hole with concepts like “direct object” and “indirect object” that don’t make any sense for the language I’m analyzing.