LLMxRay is a local LLM observatory designed to let users see what local AI is actually doing. It requires Ollama running locally with at least one model pulled (e.g., ollama pull llama3.2). It can be started via npx llmxray or Docker, listens on port 11435 by default as a transparent proxy for Ollama, and also provides a web interface on port 5174. Users can point VS Code Copilot, Open WebUI, Continue, n8n, or their own scripts to http://localhost:11435,所有请求会被原样转发给 Ollama, while recording information such as client, model, prompt size, cache reuse, prefill and generation speed, and tool calls.
Main capabilities include: the Live page displays requests sent by other tools in real time and gives readable findings, such as the client re-reading the entire prompt every turn, the daemon silently truncating the prompt, the model partially running on CPU, and tool schemas taking up 40% of the prompt; Prompt X-ray draws the prompt composition proportionally as a bar chart, with colors distinguishing system prompts, tool schemas, history turns, and new messages, brightness indicating cache hits or re-reads, stripes indicating truncation, and clicking to locate the corresponding position in the request text; the Runs page shows a waterfall chart of a single tool's model calls from start to finish, breaking down stages such as waiting, loading the model, reading the prompt, and writing the answer, and displaying the tool's own elapsed time; Shared box ranks by the cost imposed on other tools, identifying which tool is slowing down Ollama and which settings can be adjusted; GPU map shows the weights and context overhead of loaded models in VRAM, and gives one of three judgments for all pulled models: "fits now", "fits after unloading", or "larger than the GPU"; the Tool calls page evaluates the model's ability to drive agents using 13 common request patterns for agents, giving specific sentence-level feedback for each item; Cache Lab finds values that change between turns, shows where cache reuse breaks down, and empirically measures the prefill time that can be saved by moving the changing value to the end; Protocol Observatory compares in parallel the streaming output, metrics, and wrapping differences under three protocols: Ollama native /api/chat, OpenAI-compatible /v1/chat/completions, and Anthropic-compatible /v1/messages.
In addition, LLMxRay has built-in chat functionality, coloring by token to show model probabilities, supporting Markdown, multi-turn conversations, file and image attachments, slash commands, and reasoning budget settings, and giving badge hints for anomalies such as repetition, refusal, garbled text, empty answers, and truncation; session deep dive shows first-token time, token intervals, reasoning blocks, tool calls, and the actual prompt on a timeline; side-by-side comparison of up to four slots, supporting presets such as temperature sweeps, deterministic pairing, and language comparison, as well as word-level diffs; Surgical Benchmark uses the model's real logprobs on MMLU-Pro, ARC-Challenge, HellaSwag, GSScored on suites such as M8K and TruthfulQA, with support for importing custom JSON suites; the Decision Model Lab answers multiple-choice questions, yes/no probabilities, or scale ratings with probability distribution bar charts; the Knowledge Base and Embeddings pages support chunking, embedding, and retrieval preview of PDF, DOCX, Markdown, and CSV files, and can compare the cosine similarity of two texts, visualize vectors, and view the Matryoshka truncation cost, with data stored in the browser's IndexedDB; code completion supports fill-in-the-middle mode for Qwen-Coder, CodeLlama, Codestral, DeepSeek-Coder, and StarCoder; the Tool Canvas builds tool definitions as nodes and bidirectionally syncs with TypeScript; the Analytics page provides latency percentiles, quality trends, error distribution, usage heatmaps, and the relationship between temperature and token speed, and estimates local cost savings based on cloud service pricing; the System and Models pages display hardware, runtime, inference overview, and details of installed models; the AI training pipeline can organize pairs from conversations, label them, review them, and export JSONL; the local history database archives all chats, comparisons, and benchmark tests; the education suite includes nine course modules; the interface supports English, French, Serbian (Latin and Cyrillic), Chinese, and Arabic (including RTL layout), with scaffolding reserved for Hebrew and Japanese.
For agents, LLMxRay provides a read-only MCP server containing seven tools that let agents diagnose their own call issues; an Agent Skill can also be loaded via npx skills add LogneBudo/llmxray or clawhub install llmxray-diagnose-ollama-calls. Users can name requests via the X-LLMxRay-Client request header or the client URL parameter. Records of each turn (tokens, cache, duration, client, model, excluding text) are retained locally for 30 days and can continue after a restart. If a team uses a tracing system, each model call can be sent as an OpenTelemetry span to Jaeger, Phoenix, Langfuse, or Grafana, and prompt text is included only when both options are enabled at the same time.
Limitations: Ollama must be running locally with the model already pulled; by default it is accessible only from the local machine, and network access must be opened with --host 0.0.0.0network access; prompt text is not logged by default and must be explicitly enabled; some features depend on the Ollama version (0.33.3 or newer is recommended for reporting prompt cache reuse, 0.20 and above is usable, and older versions lack think and JSON-schema format); all data is stored locally or in the browser's IndexedDB, with no cloud services involved. The project uses the Apache License 2.0, and LLMxRay is a trademark of Ivan Stankovic (LogneBudo).