ASP.NET Core application for visualizing knowledge graphs from the multi-memory-mcp project using 3D Force Graph
- Interactive Graph Visualization - 3D Force Graph with zoom, pan, and drag-and-drop
- Multiple Layouts - COSE (force-directed), Circle, Grid, Breadthfirst, Concentric
- Entity Type Coloring - Automatic color-coding by entity type
- Node Details Panel - View observations, timestamps, sources, and connections
- Search & Filter - Find nodes by name or type
- Export to PNG - Save graph as an image
- Directional Edges - Arrows showing relationship direction (source → target)
- Responsive Design - Works on desktop and mobile
- .NET 8.0 SDK or later
- A modern web browser (Chrome, Firefox, Safari, Edge)
Edit MemoryGraphVisualizer/appsettings.json:
{
"MemoryGraph": {
"MemoryFolderPath": "./.aim/",
"MaxGraphNodes": 10000,
"DefaultLayout": "cose"
}
}cd MemoryGraphVisualizer
dotnet restore
dotnet runThe application starts at https://localhost:5001 (or http://localhost:5000).
- Open the application in your browser
- Select a database from the dropdown
- Interact with the graph:
- Scroll/Pinch - Zoom in/out
- Drag canvas - Pan the view
- Drag nodes - Reposition nodes
- Click node - View details and highlight connections
In Development mode, the application creates sample databases:
software-project.db- 30 entities, 40 relations (software architecture)team-knowledge.db- 15 entities, 16 relations (team/project knowledge)empty.db- Empty database (edge case)nodes-only.db- 5 entities, 0 relations (disconnected nodes)
| Option | Description | Default |
|---|---|---|
MemoryFolderPath |
Path to folder containing .db files | ./.aim/ |
MaxGraphNodes |
Maximum nodes to load | 10000 |
DefaultLayout |
Default layout algorithm | cose |
| Key | Action |
|---|---|
F |
Fit graph to screen |
R |
Reset view |
/ |
Focus search box |
Esc |
Clear search |
| Endpoint | Method | Description |
|---|---|---|
/api/databases |
GET | List available databases |
/api/graph?database={name} |
GET | Load graph data |
MemoryGraph/
├── MemoryGraph.slnx # Solution file
├── README.md
├── FEATURE_REQUEST_NODE_EDITING.md # Planned editing features
└── MemoryGraphVisualizer/
├── MemoryGraphVisualizer.csproj # Project file
├── Program.cs # Entry point and API endpoints
├── appsettings.json # Configuration
├── Configuration/ # Options classes
├── Models/ # GraphNode, GraphEdge, Observation, etc.
├── Pages/ # Razor pages (Index)
├── Services/ # Business logic and data access
└── wwwroot/
├── css/ # Custom styles
└── js/ # Graph visualization JavaScript
The visualizer expects SQLite databases with this schema:
CREATE TABLE entities (
name TEXT PRIMARY KEY,
entityType TEXT NOT NULL,
observations TEXT -- JSON array
);
CREATE TABLE relations (
id INTEGER PRIMARY KEY AUTOINCREMENT,
fromEntity TEXT NOT NULL,
toEntity TEXT NOT NULL,
relationType TEXT NOT NULL
);[
{
"text": "Observation text",
"timestamp": "2025-01-15T10:30:00Z",
"source": "code-analysis"
}
]Backend:
- ASP.NET Core 8.0 (Razor Pages)
- Microsoft.Data.Sqlite
- Serilog
Frontend:
- 3d force graph
- Bootstrap 5.3
- Vanilla JavaScript (ES6+)
Future editing capabilities:
- Add/remove nodes
- Draw connections between nodes
- Edit properties and observations
MIT