Skip to content

knowledge-engine

Status: Current | Last reviewed: 2026-06-16

Hybrid retrieval over tenant knowledge: pgvector + tsvector for keyword + dense, plus Neo4j for multi-hop graph traversal. Exposed both as a REST API and an MCP server so agents can pull context.

Source

apps/knowledge-engine when restored from a dev snapshot. The source tree is gitignored legacy demo code, so a fresh clone may not include it.

Runtime

Aspect Value
Language Python 3.12
Framework FastAPI
Port 8091

What it does

  • Indexes documents into Postgres (pgvector embedding + tsvector for BM25).
  • Maintains a Neo4j projection for relationship queries.
  • Compiles "knowledge artifacts" — pre-computed summaries the agent injects directly into context.
  • Serves results via:
  • /api/knowledge/search — hybrid retrieval.
  • /api/knowledge/graph — multi-hop traversal.
  • MCP tools registered with agent-host.

The compiler is documented separately in the knowledge-compiler ADR (archive — content folded here).

Dependencies

Service Purpose
Postgres + pgvector Dense + sparse vectors
Neo4j Graph traversal
Provider APIs Embedding model
MinIO / S3 Source document storage

Vanguard

overmind restart knowledge-engine

If apps/knowledge-engine is absent, the local Overmind launcher idles instead of failing. Restore it from a dev snapshot only for environments that still need the legacy knowledge demo.

Production

Helm chart at charts/knowledge-engine. Neo4j is run via charts/neo4j (5.24); cloud-managed alternative is Neo4j Aura. See cloud-managed-swap.md.

See also