Agent and websocket investigations work fine

This commit is contained in:
Harshavardhan Musanalli
2025-10-27 19:13:39 +01:00
parent 0a8b2dc202
commit 8832450a1f
8 changed files with 1694 additions and 19 deletions

14
main.go
View File

@@ -168,9 +168,21 @@ func main() {
fmt.Println("✅ Authentication successful!")
// Initialize the diagnostic agent
// Initialize the diagnostic agent for interactive CLI use
agent := NewLinuxDiagnosticAgent()
// Initialize a separate agent for WebSocket investigations using the application model
applicationAgent := NewLinuxDiagnosticAgent()
applicationAgent.model = "tensorzero::function_name::diagnose_and_heal_application"
// Start WebSocket client for backend communications and investigations
wsClient := NewWebSocketClient(applicationAgent, authManager)
go func() {
if err := wsClient.Start(); err != nil {
log.Printf("❌ WebSocket client error: %v", err)
}
}()
// Start background metrics collection in a goroutine
go func() {
fmt.Println("❤️ Starting background metrics collection and heartbeat...")