Skip to main content
The Context Hub is a local HTTP daemon that coordinates all TENET subsystems. It runs on your machine, manages the memory database, serves context to agents, and coordinates events.

Starting the Hub

# Start (or ensure running)
jfl context-hub ensure

# Check health
curl http://localhost:4360/health
# {"status":"ok","port":4360}
The hub starts automatically when you run any TENET command. It persists across sessions.

What It Does

FeatureDescription
Memory DBSQLite database with indexed memories, embeddings, graph edges
Periodic IndexerIndexes journal entries (60s), code headers (5min), backfills embeddings
Event BusMAP events for agent coordination and flow triggers
Context APIServes project context to agents (journals, knowledge, code)
Session TrackingManages active sessions and branches

API Endpoints

EndpointMethodDescription
/healthGETHealth check
/api/contextPOSTQuery project context
/api/memory/searchPOSTSearch memories
/api/memory/addPOSTAdd a memory
/api/memory/statusGETMemory system stats
/api/memory/indexPOSTTrigger reindex + backfill
/api/memory/linkPOSTAdd graph edge between memories
/api/eventsGET/POSTQuery or publish MAP events

Configuration

The hub reads from .jfl/config.json:
{
  "contextHub": {
    "port": 4360
  }
}
Port and auth token are written to:
  • .jfl/context-hub.port
  • .jfl/context-hub.token

Logs

tail -f .jfl/logs/context-hub.log

Doctor Check

jfl doctor
Reports hub health, memory DB size, journal count, and agent registrations.