private Runnable coreThread() {
        return () -> {
            Thread.currentThread().setName("instance-manager-core-" + taskId);
            running = true;
            while (isRunnable()) {
                long currentTime = AgentUtils.getCurrentTime();
                try {
                    AgentUtils.silenceSleepInMs(CORE_THREAD_SLEEP_TIME_MS);
                    printInstanceState();
                    dealWithActionQueue();
                    dealWithAddActionQueue();
                    if (currentTime - lastTraverseTime > KEEP_PACE_INTERVAL_MS) {
                        keepPaceWithStore();
                        lastTraverseTime = currentTime;
                    }
                    String inlongGroupId = taskFromStore.getInlongGroupId();
                    String inlongStreamId = taskFromStore.getInlongStreamId();
                    AuditUtils.add(AuditUtils.AUDIT_ID_AGENT_INSTANCE_MGR_HEARTBEAT, inlongGroupId, inlongStreamId,
                            AgentUtils.getCurrentTime(), 1, 1, auditVersion);
                } catch (Throwable ex) {
                    LOGGER.error("coreThread error: ", ex);
                    ThreadUtils.threadThrowableHandler(Thread.currentThread(), ex);
                }
            }
            running = false;
        };
    }
thread for core thread.

@return runnable profile.
inlong-agent/agent-core/src/main/java/org/apache/inlong/agent/core/instance/InstanceManager.java