Which file ? admin/includes/functions.php or shared/includes/functions.php ?
See below the result from find linux command :
find . -name “*.php” -print -exec grep “\$agent_id” {} \;
./admin/includes/functions.php
$agent_id = get_current_user_id();
$convos = $wpdb->get_results(“SELECT DISTINCT $convos_table.* FROM $convos_table INNER JOIN $messages_table ON $convos_table.token = $messages_table.convo_token WHERE $convos_table.agent_id = ‘$agent_id’ AND $messages_table.created_at >= ‘$start’ AND $messages_table.created_at <= ‘$finish'”);
./shared/includes/functions.php
$agent_id = 0;
$agent_id = get_current_user_id();
$messages = $wpdb->get_results(“SELECT * FROM $messages_table INNER JOIN $convos_table ON $convos_table.token = $messages_table.convo_token WHERE $convos_table.agent_id = ‘$agent_id’ AND $messages_table.id > ‘$id'”);
“agent_id” => $agent_id,