Knowledge Graph
The Knowledge Graph extracts entities and relationships from your agent's memories, creating a connected web of knowledge that enhances retrieval.
Feature flag: HIPPOCORTEX_GRAPH_PACKAGE (enabled by default)
Entity Extraction
Two methods:
- Regex baseline (
@hippocortex/graph) — fast, zero-latency, runs on every event - LLM NER (GPT-4o-mini) — higher accuracy, runs during distillation, bilingual DE/EN. Uses LRU cache (1K entries, 10min TTL) and rate limiter (100 calls/min). Feature flag:
HIPPOCORTEX_LLM_NER
Entity Types
person, organization, technology, product, service, location, concept
Graph Structure
Nodes: entity name, type, metadata, evidence references.
Edges: requires, improves, contradicts, supersedes, related_to with weights (0-1).
Graph-Enhanced Synthesis
When HIPPOCORTEX_GRAPH_SYNTHESIS is enabled, synthesize combines vector retrieval with 1-hop graph traversal for richer context.
API Endpoints
| Method | Endpoint | Description |
|---|---|---|
| GET | /v1/graph/full | Full graph (nodes + edges) |
| GET | /v1/graph/nodes | List graph nodes |