How dami904/lethe works
Lethe stores timestamped facts as HydraDB graph nodes, marks contradictory updates with SUPERSEDES edges, and answers time-bounded recall by graph query rather than similarity alone. Its principal workflow is fact ingestion and conflict handling followed by recall; graph-chain and connectivity queries support exploration, while a vector baseline provides comparison. Optional LLM extraction and conflict classification are documented capabilities. The static demo exercises recall, chain, and connect; source excerpts for several route implementations were not provided, so uncertain internal wiring is omitted.
Main entry points: server.ts Express server · app.js Demo browser · graph.ts Graph operations · facts.ts Fact ingestion
Components 17
API and demo
- Express server
src/server.ts - Fact ingestion
src/routes/facts.ts - Temporal recall
src/routes/recall.ts - Supersession chain
src/routes/chain.ts - Graph connectivity
src/routes/connect.ts - Demo scenarios
src/routes/demo.ts
Fact memory
- Fact extraction
src/ingest/extractFacts.ts - Conflict classifier
src/lib/conflictClassifier.ts
Graph storage
- Graph operations
src/db/graph.ts - HydraDB client
src/db/hydraClient.ts
Baseline comparison
- Baseline API
src/routes/baseline.ts - Vector memory
src/baseline/vectorMemory.ts - Text embeddings
src/baseline/embeddings.ts
Other components
- Agent or user
- Demo browser
public/app.js - LLM provider
- HydraDB
Connections 23
- Agent or user → Express server: submits requests
- Express server → Fact ingestion: mounts route
- Express server → Temporal recall: mounts route
- Express server → Supersession chain: mounts route
- Express server → Graph connectivity: mounts route
- Express server → Demo scenarios: mounts route
- Express server → Baseline API: mounts route
- Express server → Demo browser: serves static app
- Demo browser → Demo scenarios: loads scenarios
- Demo browser → Supersession chain: requests chain
- Demo browser → Temporal recall: requests recall
- Demo browser → Graph connectivity: requests paths
- Fact ingestion → Conflict classifier: classifies updates
- Conflict classifier → LLM provider: requests classification
- Fact ingestion → Graph operations: writes facts and edges
- Temporal recall → Graph operations: queries facts
- Supersession chain → Graph operations: traverses chain
- Graph connectivity → Graph operations: finds paths
- Graph operations → HydraDB client: runs graph queries
- HydraDB client → HydraDB: queries HTTP API
- Baseline API → Vector memory: searches memory
- Vector memory → Text embeddings: embeds text
- Fact extraction → LLM provider: extracts fact triples