1
Raspberry Pis 3-5 are essentially tiny 4 core computers so a network solution would be fine .
Depending on what kind of data you want to send it might be the best approach.
It might be overkill for controlling motors.
2
Another search term you could explore is interrupts.
For example,
Agent A and Agent B share a “BUS” which contains 1 byte of data (which is usually enough ).
Agent A leaves a message in the BUS for agent B.
If Agent A wants to talk to Angent B then A would send a HIGH signal to one of B’s GPIO pins which triggers a HARDWARE interupt.
Agent B stops what it’s doing and reads whatever Agent A put on the BUS.
3
I haven’t personally replicated this but @James46717 is a respected regular here.
4
Some search terms for light weight requirements are “UART” and “Serial”