   const endpoint = isActive ? `/api/agent/${agent}/pause` : `/api/agent/${agent}/start`;
                    
                    // Add animation
                    this.style.animation = 'pulse 0.5s';
                    
                    // Create a new XMLHttpRequest
                    const xhr = new XMLHttpRequest();
                    xhr.open('PUT', endpoint);
                    xhr.setRequestHeader('Content-Type', 'application/json');
                    
                    xhr.onload = ()