When you call AppleScript from Eggplant, it executes in the same user context where Eggplant is running. AppleScript doesn’t know anything about the remote system that Eggplant is connected to. So in general, AppleScript will be useful mainly for interacting with things within the local account (such as reading from an Excel spreadsheet) but not for interacting with the SUT.
Having said that, though, it is possible to get AppleScript to communicate with another system (as discussed here). I’ve never tried to use that capability to communicate with another logged-in account on the same system, so I don’t know if it’s possible or not. But you are welcome to give it a try.