An SAP agent that is not used for ABAP connections, but only for another like PI (XI) has the PI connection object set on the agent definition in client 0, but still throws an error that it will does not have a connection assigned to the ABAP stack:
20220202/151753.172 - U02000106 Reading content of connection object 'CONN.SAP.XI'.
20220202/151753.204 - U02000107 Connection object 'CONN.SAP.XI' with time stamp '123456752000' was successfully transferred to the Agent.
20220202/151753.204 - U02004161 No connection assigned to the ABAP stack.
20220202/151753.204 - U07001001 Charset used by the Agent: 'ISO-8859-15'
20220202/151753.204 - U02000041 Shutdown Agent 'SAP_PI'.
20220202/151753.204 - U02000002 Agent 'SAP_PI' version '12.3.5+build.1613120274450' ended abnormally.
20220202/151753.204 - U02000010 Connection to Server 'AUTOMIC_SERVER/10.10.10.10:2217' terminated.
Agent does not have the SAP System connection object, it does have the PI connection object under SAP XI:
Release : 12.3
Component :
The agent requires an ABAP connection no matter what which is why it's complaining about the ABAP stack. It can point to a different system even, but it must have an ABAP connection as well as the PI/XI connection.