Skip to main content

JVMind Community Edition — JVM diagnostics AI agent (GC logs, jstack, heapdump analysis)

Project description

JVMind Community Edition

An AI-powered JVM diagnostics agent. Single-user · local-first · open source.

中文文档 (Chinese) · Report a bug · Request a feature

JVMind CE is a JVM performance diagnostics assistant built on OpenAI-compatible LLMs. It runs the agent as a local web service, accepts uploaded logs/dumps, and streams diagnostic conclusions back over SSE.

  • 🧠 LangGraph agent — Tool orchestration via LangGraph state machines (native OpenAI function-calling).
  • 🪵 GC log analysis — JDK 8 / 11 / 17 / 21 / 25 collectors (G1, Parallel, ZGC, Shenandoah, Serial, CMS). Pure regex parsers, no external runtime deps.
  • 🧵 jstack thread analysis — Deadlock detection, lock-contention hotspots, thread-pool distribution, flame graph, per-thread drill-down.
  • 💾 Heapdump analysis (optional) — Parses GB-sized hprof files via Eclipse MAT (requires JDK 21). Ships with the bundled query-service plugin.
  • 🔌 OpenAI-compatible LLM — DeepSeek, OpenAI, Qwen, Kimi, Ollama (local), and any compatible endpoint. Hot-reloadable UI config.
  • 🏠 Ollama local inference — Run entirely offline with no data leaving your machine. Zero-cost, no API key required.

The community edition ships without billing, team management, or rate limits. For those, use a commercial offering.

JVMind CE Screenshot


Quick Start

Install from PyPI

pip install jvmind-ce
jvmind
# open http://127.0.0.1:8000

Install from source (developer mode)

git clone https://github.com/jvmind/jvmind-ce.git
cd jvmind-ce
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
jvmind

Configure the LLM

The UI prompts for an API key on first launch. Two options:

Option A — Remote LLM provider (DeepSeek, OpenAI, etc.):

cp .env.example .env
# Edit .env:
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxx
OPENAI_BASE_URL=https://api.deepseek.com/v1
OPENAI_MODEL=deepseek-chat

Option B — Local Ollama (no API key, zero-cost, fully offline):

# 1. Install & start Ollama: https://ollama.com
# 2. Pull a model:
ollama pull qwen2.5
# 3. In the JVMind UI, click "Ollama · Local" preset in Settings (⚙️)
#    or set in .env:
OPENAI_BASE_URL=http://localhost:11434/v1
OPENAI_MODEL=qwen2.5
#    Leave OPENAI_API_KEY empty — Ollama doesn't need one.

The agent uses native OpenAI function-calling, so any model supporting tools works. DeepSeek's deepseek-chat is a sensible default for remote inference; qwen2.5 or llama3.1 are good choices for local Ollama.

Privacy: When using Ollama with a local model, no data ever leaves your machine — all GC logs, thread dumps, heap dumps, and conversation content stay local.


Features

GC log analysis

Open the 📊 GC Logs tab, upload a log file. The pipeline:

  1. Stream-upload → store raw text in DB
  2. Parser (pure regex) extracts events, computes statistics, builds overview
  3. Render: 8 status cards + per-collector table + heap chart + pause histogram + top-10 slowest
  4. Trigger a streamed LLM diagnosis with the structured template (overall health, key issues, parameter tuning, follow-up metrics)

Supported collectors: G1 · Parallel · Serial · ZGC · Shenandoah · CMS. JDK 9+ unified log format and JDK 8 PrintGCDetails are both supported.

jstack thread analysis

Open the 🧵 Thread Dumps tab, upload a jstack -l dump. Features:

  • Thread state histogram (RUNNABLE / BLOCKED / WAITING / TIMED_WAITING)
  • Deadlock detection with lock chain visualization
  • Lock contention hotspots (holder + waiters list, click-to-drill)
  • Thread pool distribution, flame graph, single-thread drill-down
  • Streamed LLM diagnosis (whole dump or single thread)

Heapdump analysis (optional — requires Eclipse MAT + JDK 21)

The 🔍 Heap Dumps tab uploads GB-sized .hprof files. The architecture:

  Browser ─▶ FastAPI (upload routes) ─▶ local disk: <dump_dir>/<report_id>/
                                              │
                                              ▼
                            worker_loop ─▶ ParseHeapDump.sh
                                              │
                                              ▼
                          ┌───── query-service (HTTP) ◀─────┐
                          │   bundled in vendor/mat/         │
                          └──────────────────────────────────┘
                                              │
                                              ▼
  Browser ◀────── SSE progress / JSON query results ◀───── FastAPI proxy

Install MAT and the query-service in one step:

./scripts/install_mat.sh /opt/mat
# or: MAT_HOME=/opt/mat ./scripts/install_mat.sh

This downloads Eclipse MAT, extracts it, and copies the bundled com.jvmind.mat.query-0.1.0.jar into the MAT plugins directory. Note: MAT requires JDK 21. Configure and run:

# .env
MAT_HOME=/opt/mat
MAT_QUERY_SERVICE_URL=http://127.0.0.1:8090
# Terminal 1: query-service
/opt/mat/MemoryAnalyzer -consoleLog -nosplash \
    -application com.jvmind.mat.query.QueryServiceApp

# Terminal 2: heapdump worker (separate process)
jvmind-worker

The bundled query-service jar ships inside vendor/mat/, so users don't need to compile Java themselves.

Agent internals

The agent is a LangGraph state machine in react_agent/graph/:

  • facade.LangGraphAgent — public API for the agent
  • graph_builder.build_graph — wires nodes (Agent → Tools → Finalize)
  • nodes — tool execution + structured reasoning (cross-domain diagnosis for OOM)
  • sse_adapter — yields user / token / step / fact_added / final / error / done events
  • llm_compat — non-streaming chat helper used by the summarizer and skills route

Native OpenAI function-calling is the default. If a provider rejects the tools parameter, the agent surfaces a clear error rather than silently degrading.


Configuration

See .env.example for the full list. Key knobs:

Variable Default Purpose
HOST / PORT 127.0.0.1 / 8000 Bind address
DATABASE_URL sqlite:///./data/app.db SQLAlchemy URL; switch to PostgreSQL for prod
OPENAI_API_KEY Required for remote providers; leave empty when using local Ollama
OPENAI_BASE_URL https://api.deepseek.com/v1 Any OpenAI-compatible endpoint
OPENAI_MODEL deepseek-chat Model name
OPENAI_TIMEOUT_SECONDS 60 Per-LLM-call timeout
CONFIG_ENCRYPTION_KEY Encrypts persisted API keys at rest
HEAPDUMP_* see .env.example Only relevant if using heapdump analysis

The web UI also has a Settings (⚙️) dialog for LLM config — changes hot-reload the agent and re-encrypt stored keys.


Development

# Run dev server with auto-reload
uvicorn server:app --reload --port 8000

# Run all tests
python -m pytest _tests --no-cov

# Frontend dev (Vite hot-reload)
cd frontend && npm install && npm run dev

# Frontend production build
cd frontend && npm run build

# Heapdump worker (separate process)
jvmind-worker

Project layout:

jvmind-ce/
├── server.py              # FastAPI entry point
├── app/                   # routes, middleware, helpers
├── react_agent/
│   ├── graph/             # LangGraph agent (default)
│   ├── gc_analyzer/       # GC log parsers (JDK 8 + JDK 9+)
│   ├── jstack_analyzer.py
│   ├── mat_tools.py       # Heapdump tool wrappers
│   ├── heapdump_worker/   # Background MAT parser
│   ├── memory_db.py
│   ├── user_manager_db.py # single-user
│   └── db.py / models.py
├── frontend/              # vanilla JS + Vite
├── vendor/mat/            # bundled query-service jar
├── scripts/install_mat.sh # one-step MAT install
└── _tests/                # pytest suite (146 tests)

License

MIT — see LICENSE.

Contributing

See CONTRIBUTING.md and CONVENTIONS.md.

Credits

JVMind CE is extracted from the commercial JVMind product. The commercial edition includes multi-user auth, team workspaces, Paddle billing, PostHog analytics, and other features that this repository deliberately omits.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jvmind_ce-0.1.19.tar.gz (13.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jvmind_ce-0.1.19-py3-none-any.whl (6.7 MB view details)

Uploaded Python 3

File details

Details for the file jvmind_ce-0.1.19.tar.gz.

File metadata

  • Download URL: jvmind_ce-0.1.19.tar.gz
  • Upload date:
  • Size: 13.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jvmind_ce-0.1.19.tar.gz
Algorithm Hash digest
SHA256 8cef8db1c1c976c56ec6e258e9b72e652199490483846d66ab99edfdf00c64cd
MD5 534748cd7112d35cd36c9d6a2d2a2584
BLAKE2b-256 383ab5add8e146b4afb966add5f3cb24cdb83e148cf67cf906ecca4042737407

See more details on using hashes here.

Provenance

The following attestation bundles were made for jvmind_ce-0.1.19.tar.gz:

Publisher: release.yml on jvmind/jvmind-ce

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file jvmind_ce-0.1.19-py3-none-any.whl.

File metadata

  • Download URL: jvmind_ce-0.1.19-py3-none-any.whl
  • Upload date:
  • Size: 6.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for jvmind_ce-0.1.19-py3-none-any.whl
Algorithm Hash digest
SHA256 c9e6264ec37644b34a776d6854f1b1a28f081eabdadc50cb6830ffe65025d980
MD5 24ad275754fd90eb07d49e29064d0de0
BLAKE2b-256 9cfae409bdc6ccde27f7253d20838f01abf99e2ca14724d28a489657337db250

See more details on using hashes here.

Provenance

The following attestation bundles were made for jvmind_ce-0.1.19-py3-none-any.whl:

Publisher: release.yml on jvmind/jvmind-ce

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page