知识图谱3D可视化工具

Brain Viewer 是一款用于知识图谱 MCP 服务器的 3D 交互式可视化工具,以力导向图展示实体与关系,支持点击查看详情、历史回放和实时变化监控,适用于知识图谱调试、数据探索与实时观测。

  • by mattiaTagliente
  • TypeScript
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 mattiaTagliente/Brain-viewer

使用说明

Brain Viewer

3D interactive visualizer for the Knowledge Graph MCP server. Explore entities as nodes in 3D space, inspect observations and relations, replay the graph's history as an animation, and monitor live changes in realtime.

Features

  • 3D force-directed graph: entities as nodes, relations as edges, clustered by semantic community
  • Deterministic layout: positions are persisted and only change when the data changes
  • Clickable nodes: select any entity to see its full observations, relations, and metadata
  • Community-aware selection highlighting: selecting an entity keeps its community fully visible while dimming nodes and edges from other communities
  • High-contrast community mode: selected-community nodes and edges are brightened while non-selected communities are strongly grayed out
  • Intentional reset behavior: community highlighting is cleared only by a single click on empty space, not by orbit/pan interaction
  • Replay system: watch the knowledge graph grow over time with animated node spawns and edge draws
  • Idle time compression: skip overnight gaps to see only meaningful activity
  • Realtime mode: live-poll the KG database and animate changes as they happen
  • Theme system: switch between Neural (sci-fi dark), Clean (minimal), and Organic (biological) visual presets
  • Camera controls: zoom, pan, rotate, orbit freely in 3D space
  • Responsive HUD controls: search, entity filters, and home controls remain anchored inside viewport edges across desktop and mobile resolutions
  • Taskbar launcher window persistence: app-window Chrome size is seeded once, then reuses your last manual resize on subsequent launches
  • Continuous startup splash: launcher splash now stays visually consistent through app boot (no white flash and no style swap to a separate gray loader)
  • Single startup surface: launcher keeps the animated splash visible while app loads in an embedded iframe, then dismisses on explicit brain-viewer-ready signal from frontend

Tech Stack

  • Backend: Python 3.11, FastAPI, uvicorn, numpy
  • Frontend: React 19, TypeScript, Vite, React Three Fiber, Zustand, Tailwind CSS
  • Data: reads the Sherlock KG knowledge.db from the platformdirs sherlock data dir, or KNOWLEDGE_GLOBAL_DB (SQLite, read-only)

Development

# Backend
cd backend
uv sync
uvicorn brain_viewer.main:app --reload

# Frontend
cd frontend
npm install
npm run dev

License

MIT