Quickwit Log Exploration Guide
This guide covers how to use Terraphim AI with Quickwit to explore and analyze log data from your applications and infrastructure.
Overview
Quickwit is a cloud-native search engine optimized for log and trace data. When integrated with Terraphim AI, it provides:
- Full-text search across millions of log entries
- Field-specific filtering (level, service, timestamp)
- Multiple index discovery modes for different use cases
- Graceful degradation when services are unavailable
Quick Start
Prerequisites
- Quickwit server running (default:
http://localhost:7280) - Terraphim server or agent installed
- Logs indexed in Quickwit
Minimal Configuration
Add a Quickwit haystack to your role configuration:
First Search
# Start terraphim-agent
# In REPL, switch to a role with Quickwit configured
# Search for errors
Configuration Modes
Quickwit haystack supports three discovery modes, each with different performance characteristics.
1. Explicit Index Mode (Fastest)
Best for: Production monitoring, known indexes
| Metric | Value | |--------|-------| | API Calls | 1 | | Latency | ~100ms | | Use Case | Production monitoring |
2. Auto-Discovery Mode (Most Convenient)
Best for: Log exploration, discovering new indexes
| Metric | Value | |--------|-------| | API Calls | N+1 (fetch indexes + search each) | | Latency | ~300-500ms | | Use Case | Exploration, unfamiliar instances |
3. Filtered Discovery Mode (Balanced)
Best for: Multi-service monitoring with control
| Metric | Value | |--------|-------| | API Calls | N+1 (filtered) | | Latency | ~200-400ms | | Use Case | Multi-service with patterns |
Supported Filter Patterns:
workers-*- Prefix match*-logs- Suffix match*logs*- Contains match*- All indexes
Authentication
Bearer Token
For services requiring token authentication:
Basic Authentication
For username/password authentication:
Using 1Password
Securely inject credentials from 1Password:
# Set password from 1Password
# Start agent
Query Syntax
Quickwit uses a Lucene-like query syntax.
Basic Queries
# Simple text search
# Phrase search
# Wildcard
Field-Specific Queries
# Log level
# Service name
# Combined
Time Range Queries
# After a date
# Between dates
# Last hour (relative)
Boolean Operators
# AND (both required)
# OR (either matches)
# NOT (exclude)
# Grouping
Common Workflows
Incident Investigation
- Start with broad search:
- Narrow by time window:
- Focus on specific service:
- Look for patterns:
Error Pattern Analysis
- Find all error types:
- Group by message patterns:
Performance Troubleshooting
- Find slow requests:
- Identify bottlenecks:
- Check specific endpoints:
Configuration Parameters
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| default_index | string | none | Explicit index to search |
| index_filter | string | none | Glob pattern for auto-discovery |
| max_hits | string | "100" | Maximum results per index |
| sort_by | string | "-timestamp" | Sort field (- for descending) |
| timeout_seconds | string | "10" | HTTP request timeout |
| auth_token | string | none | Bearer token (include "Bearer " prefix) |
| auth_username | string | none | Basic auth username |
| auth_password | string | none | Basic auth password |
Pre-configured Role
Terraphim AI includes a pre-configured "Quickwit Logs" role in terraphim_engineer_config.json:
# Switch to Quickwit Logs role
# Search logs
Role Features:
- Auto-discovery mode (searches all indexes)
- BM25 relevance function
- LLM summarization disabled (faster results)
- Dark theme optimized for log viewing
- Specialized system prompt for log analysis
Performance Tips
-
Use explicit index mode for production monitoring where you know the target index
-
Limit max_hits to what you need - 50-100 is usually sufficient for investigation
-
Add time constraints to queries to reduce search scope
-
Use filtered discovery instead of full auto-discovery when you have many indexes
-
Enable graceful degradation - Quickwit haystack returns empty results on network failure rather than crashing
Integration with Other Haystacks
Combine Quickwit log search with other data sources:
This allows searching both logs and documentation in a single query.
Troubleshooting
See Troubleshooting Guide for common issues and solutions.
Related Documentation
Last Updated: January 22, 2026 Version: Terraphim AI v1.6.0