# shubhamkunwartiwari/engramgraph architecture

> Architecture diagram of the GitHub repository shubhamkunwartiwari/engramgraph, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/shubhamkunwartiwari/engramgraph
- Repository: https://github.com/shubhamkunwartiwari/engramgraph

## Overview

EngramGraph is an interactive multi-agent graph-memory workspace and evaluation tool. Users work with agents that inspect a summary index, page relevant subtopics into working memory, update graph facts and relationships, and release context; the workspace also supports workflows, document-to-graph ingestion, saved paths, and benchmark runs. The server routes requests to the graph engine and agent orchestrator, while the React app presents graph and working-memory views. The README documents comparative retrieval benchmarks and OCC; some of those implementations are unsampled, so their internal relationships are not expanded here.

Main entry points: [`server/graphStore.ts`](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server/graphStore.ts) (Graph memory engine), [`src/App.tsx`](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/App.tsx) (Workspace app), [`src/types/memory.ts`](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/types/memory.ts) (Memory data model), [`server/agentOrchestrator.ts`](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server/agentOrchestrator.ts) (Agent orchestrator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workspace["Workspace UI"]
  node_app["Workspace app<br/>[App.tsx]"]
  node_graph_view["Graph canvas"]
  node_working_memory["Memory inspector"]
  node_paging_ui["Paging controls"]
  node_dialogs["Memory dialogs"]
end

subgraph group_service["API and agents"]
  node_api["HTTP API<br/>[server.ts]"]
  node_orchestrator["Agent orchestrator"]
  node_llm{{"Google Gemini"}}
end

subgraph group_memory["Graph memory"]
  node_engine[("Graph memory engine<br/>[graphStore.ts]")]
  node_seed["Initial graph data"]
  node_fallback["Browser fallback"]
  node_types["Memory data model<br/>[memory.ts]"]
end

subgraph group_evaluation["Evaluation"]
  node_benchmark["Benchmark suite<br/>[graphStore.ts]"]
  node_paper["Paper generator"]
end

node_user(("Workspace user"))
node_falkordb[("FalkorDB")]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_graph_view
node_app -->|"renders"| node_dialogs
node_app -->|"falls back to"| node_fallback
node_graph_view -.->|"shows"| node_working_memory
node_paging_ui -->|"uses types"| node_types
node_app -->|"uses types"| node_types
node_api -->|"routes requests"| node_engine
node_api -->|"runs agents"| node_orchestrator
node_orchestrator -->|"reads and updates"| node_engine
node_orchestrator -->|"calls"| node_llm
node_engine -->|"loads initial state"| node_seed
node_fallback -->|"creates workspace"| node_seed
node_engine -->|"connects"| node_falkordb
node_engine -->|"runs"| node_benchmark
node_benchmark -.->|"supplies results"| node_paper
node_engine -->|"uses model"| node_types
node_seed -->|"uses model"| node_types

click node_app "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/App.tsx"
click node_graph_view "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/components/HierarchicalGraphCanvas.tsx"
click node_working_memory "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/components/AgentWorkingMemoryInspector.tsx"
click node_paging_ui "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/components/AutonomousPagingOrchestrator.tsx"
click node_dialogs "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/components/ModalsAndDrawers.tsx"
click node_api "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server.ts"
click node_orchestrator "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server/agentOrchestrator.ts"
click node_engine "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server/graphStore.ts"
click node_seed "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server/initialGraphData.ts"
click node_fallback "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/utils/clientGraphFallback.ts"
click node_types "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/types/memory.ts"
click node_benchmark "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server/graphStore.ts"
click node_paper "https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/utils/researchPaperGenerator.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_graph_view,node_working_memory,node_paging_ui,node_dialogs,node_user toneBlue
class node_api,node_orchestrator,node_llm,node_falkordb toneAmber
class node_engine,node_seed,node_fallback,node_types toneMint
class node_benchmark,node_paper toneRose
```

## Components

### Workspace UI

- [Workspace app](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/App.tsx): `src/App.tsx`
- [Graph canvas](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/components/HierarchicalGraphCanvas.tsx): `src/components/HierarchicalGraphCanvas.tsx`
- [Memory inspector](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/components/AgentWorkingMemoryInspector.tsx): `src/components/AgentWorkingMemoryInspector.tsx`
- [Paging controls](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/components/AutonomousPagingOrchestrator.tsx): `src/components/AutonomousPagingOrchestrator.tsx`
- [Memory dialogs](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/components/ModalsAndDrawers.tsx): `src/components/ModalsAndDrawers.tsx`

### API and agents

- [HTTP API](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server.ts): `server.ts`
- [Agent orchestrator](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server/agentOrchestrator.ts): `server/agentOrchestrator.ts`
- **Google Gemini**

### Graph memory

- [Graph memory engine](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server/graphStore.ts): `server/graphStore.ts`
- [Initial graph data](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server/initialGraphData.ts): `server/initialGraphData.ts`
- [Browser fallback](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/utils/clientGraphFallback.ts): `src/utils/clientGraphFallback.ts`
- [Memory data model](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/types/memory.ts): `src/types/memory.ts`

### Evaluation

- [Benchmark suite](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/server/graphStore.ts): `server/graphStore.ts`
- [Paper generator](https://github.com/shubhamkunwartiwari/engramgraph/blob/main/src/utils/researchPaperGenerator.ts): `src/utils/researchPaperGenerator.ts`

### Other components

- **Workspace user**
- **FalkorDB**

## Connections

- Workspace user → Workspace app: uses (evidence: `README.md`)
- Workspace app → Graph canvas: renders (evidence: `src/App.tsx`)
- Workspace app → Memory dialogs: renders (evidence: `src/App.tsx`)
- Workspace app → Browser fallback: falls back to (evidence: `src/App.tsx`)
- Graph canvas → Memory inspector: shows
- Paging controls → Memory data model: uses types (evidence: `src/components/AutonomousPagingOrchestrator.tsx`)
- Workspace app → Memory data model: uses types (evidence: `src/App.tsx`)
- HTTP API → Graph memory engine: routes requests (evidence: `server.ts`)
- HTTP API → Agent orchestrator: runs agents (evidence: `server.ts`)
- Agent orchestrator → Graph memory engine: reads and updates (evidence: `server/agentOrchestrator.ts`)
- Agent orchestrator → Google Gemini: calls (evidence: `server/agentOrchestrator.ts`)
- Graph memory engine → Initial graph data: loads initial state (evidence: `server/graphStore.ts`)
- Browser fallback → Initial graph data: creates workspace (evidence: `src/utils/clientGraphFallback.ts`)
- Graph memory engine → FalkorDB: connects
- Graph memory engine → Benchmark suite: runs (evidence: `server/graphStore.ts`)
- Benchmark suite → Paper generator: supplies results
- Graph memory engine → Memory data model: uses model (evidence: `server/graphStore.ts`)
- Initial graph data → Memory data model: uses model (evidence: `server/initialGraphData.ts`)
