Loom is a distributed log aggregation system built with Go, gRPC, PostgreSQL, and pgvector. It features a modern, interactive Next.js web dashboard and an AI-powered natural language query engine.
It provides:
- Log Ingestion: Lightweight agents tailing log sources and sending events via gRPC.
- Centralized Storage: Log records persisted securely in PostgreSQL.
- Semantic Log Search: Context-aware log searching powered by vector embeddings and pgvector.
- Hybrid Search: Seamlessly combines vector similarity search with structured metadata filters.
- Intelligent Query Routing: Bypasses the LLM parser when structured filters are provided, routing queries dynamically to optimize latency.
- Web Dashboard: Sleek, glassmorphic UI featuring log inspectors, interactive stats, and live telemetry filtering.
+-----------------------+
| Web Dashboard UI |
| (Next.js / Tailwind) |
+-----------------------+
|
| HTTP / JSON API
v
+--------+ +-----------------------+
| Agent | | Web Server |
+--------+ | (Go API Gateway) |
| +-----------------------+
| |
| gRPC | gRPC (LogService)
v v
+--------------------------------------+
| Loom Server |
| (Core Engine / Embeddings) |
+--------------------------------------+
| |
| pgx | Ollama API
v v
+------------------------+ +-----------+
| PostgreSQL + pgvector | | Ollama LLM |
+------------------------+ +-----------+
A premium dashboard built with Next.js, Tailwind CSS, and Shadcn UI. It includes:
- Interactive telemetry metrics (filtered log count, real-time error rates, service/host statistics).
- Advanced search bar popover menu to filter logs by Severity, Service, Host, and Time window.
- Logs viewer grid featuring a sliding Log Inspector Drawer to view dynamic JSON context metadata and copy payloads.
Acts as the REST API gateway (cmd/web) serving /api/v1/query. It implements Hybrid Query Routing:
- Natural Language Queries: If a user submits a query string without any filters, it calls the LLM (Ollama) to extract fields (level, service, host, since).
- Direct Semantic Search: If query text AND filters are specified, it skips the LLM and calls
SimilarLogs(vector search). - Direct Fetch: If only filters are specified, it skips semantic search and LLM, performing a direct query (
GetLogs).
Reads logs from configured file sources, parses severity and timing, and streams entries to the core server via gRPC.
Accepts gRPC streams from agents, generates vector embeddings, stores logs, and manages subscriptions for real-time query clients.
Ensure PostgreSQL with pgvector and Ollama are running.
docker-compose up -dmake migrate-upgo run ./cmd/servergo run ./cmd/agentgo run ./cmd/webThe Go server will start serving endpoints at http://localhost:3000.
cd web
pnpm install
pnpm run devOpen http://localhost:3001 (or your terminal's allocated port) to access the interactive dashboard.
- Path:
/api/v1/query - Method:
POST - Payload:
{
"query": "connection timeout",
"level": "ERROR",
"service": "payment-gateway",
"host": "prod-ap-south-1a",
"since": "1h"
}- Web dashboard UI
- Natural language querying integration (Ollama LLM)
- Hybrid routing optimization
- Metadata extraction (JSONB enrichment)
- Similarity score exposure in UI
- Authentication and authorization