Send a command from one app to another

I have two AppleScriptObjC apps - I want to send text from app A to app B and have app B fill a table with the text.
Right now I have app A save a text file, then I go to app B and open it. I’ d like to eliminate the text file and the extra steps.
Is there a way for app A to call a subroutine in app B like in vanilla applescript apps? Or do I have to make app B scriptable in order to tell it what to do?

XCode 9.2
OS 10.12.6

This.

I should have known that… Chapter 25.