The boundary of an organism is defined by cooperation
Updated September 26, 2021
An organism is a living system maintaining both a higher level of internal cooperation and a lower level of internal conflict than either its components or any larger systems of which it is a component.
Fields, Levin, 2018, "Are Planaria Individuals? What Regenerative Biology is Telling Us About the Nature of Multicellularity".
This is a good definition for an agent.