Getting Started with LogPilot
LogPilot is an AI-powered platform that transforms how you debug and monitor distributed systems. Instead of writing complex queries, you ask questions in plain English. Instead of manually tracing errors, LogPilot automatically identifies root causes and suggests fixes.
Prerequisites
Node.js 18+ or Python 3.9+. A running application or log files to analyze. An OpenAI API key (for the CLI tool's AI features).
1 Installation
Install the LogPilot CLI globally using npm or pip:
2 Quick Start
Initialize LogPilot in your project and authenticate:
Or analyze a local log file:
3 Configuration
LogPilot uses a YAML configuration file. Here's the default .logpilot/config.yaml:
Semantic Search
LogPilot's semantic search lets you query logs using natural language. Under the hood, it converts your query into vector embeddings and performs similarity search across your log data, combined with structured SQL queries for time ranges and filters.
Root Cause Analysis
When LogPilot detects an anomaly, it can perform automatic root cause analysis by tracing the failure path across services. You can also trigger RCA manually:
Pattern Discovery
The pattern engine clusters similar log events and ranks them by novelty. Known patterns are suppressed, while new or escalating patterns are surfaced as alerts.
Auto-Remediation
Enable auto-remediation to let LogPilot fix common issues automatically. When auto_remediate: true, the agent can restart pods, scale deployments, and create GitHub PRs.
Safety First
Auto-remediation only executes pre-approved actions. All changes are logged and can be rolled back. For destructive operations, LogPilot always asks for confirmation via Slack or CLI.
API Reference
The LogPilot REST API allows you to programmatically ingest logs, run queries, and manage your configuration.
/api/v1/search
Semantic log search
/api/v1/ingest
Ingest log events
/api/v1/rca
Trigger root cause analysis
/api/v1/patterns
List discovered patterns
/api/v1/health
Service health metrics
CLI Commands
logpilot init
Initialize LogPilot in the current directory, creating a config file.
logpilot auth --key <api-key>
Authenticate with your LogPilot API key.
logpilot monitor [--cluster <name>]
Start real-time log monitoring with AI anomaly detection.
logpilot analyze <file>
Analyze a local log file for patterns and anomalies.
logpilot search "<query>"
Search logs using natural language.
logpilot rca --trace-id <id>
Run root cause analysis for a specific trace.
logpilot patterns [--last <duration>]
List discovered log patterns within a time range.
logpilot report
Generate and display the latest analysis report.
SDK & Libraries
Use our SDKs to integrate LogPilot directly into your application for structured log ingestion: