Skip to content

HTTP API: add read endpoints needed for dashboard HTTP-mode support #39

Description

@spranab

Context

wysie/yantrikdb-hermes-dashboard is a local-first FastAPI dashboard for browsing yantrikdb stores. Today it only supports embedded-mode SQLite deployments — cluster/HTTP deployments (yantrikdb-server) are locked out because the dashboard reads SQLite directly.

We're planning to add an HTTP backend to the dashboard so it works against a yantrikdb-server cluster the same way it works against an embedded SQLite file. The plugin's existing client.py already covers 7 of the dashboard's calls (/v1/health, /v1/stats, POST /v1/recall, GET /v1/conflicts, POST /v1/conflicts/{id}/resolve, POST /v1/think, POST /v1/forget). The rest are missing.

This issue tracks adding the missing read-only endpoints to the yantrikdb-server HTTP API. They wrap engine functions that already exist (the dashboard does the equivalent via raw SQL on a SQLite file) — work is HTTP-layer wiring + JSON serialization, not new engine capabilities.

Endpoints to add

All read-only, all under /v1/:

GET  /v1/memories?namespace=&status=&domain=&source=&limit=&offset=&q=
GET  /v1/memory/{rid}
GET  /v1/identity-scope
GET  /v1/entities?namespace=&limit=
GET  /v1/graph/{entity}?depth=&namespace=
GET  /v1/sessions?namespace=&limit=
GET  /v1/stale?namespace=&before=
GET  /v1/upcoming?namespace=&within=
GET  /v1/patterns?namespace=
GET  /v1/triggers?namespace=
GET  /v1/export/memories.jsonl?namespace=

Phased delivery

Phase Endpoints Unlocks
Phase 1 /v1/memories, /v1/memory/{rid}, /v1/identity-scope Memory browser + Identity & Scope page (the two most-used views)
Phase 2 /v1/entities, /v1/graph/{entity} Visualizer + entity graph (the screenshot moment)
Phase 3 /v1/sessions, /v1/stale, /v1/upcoming, /v1/patterns, /v1/triggers, /v1/export/memories.jsonl Lifecycle + analytics + export

Engine effort estimate: ~3 days total split across phases (~1 day per phase).

Mapping to existing engine functions

Each endpoint is a thin HTTP wrapper around code that already runs inside the embedded engine (the dashboard does the equivalent via raw SQL today). No new engine capabilities required.

Example shape (Rust pseudo-handler):

async fn list_memories(
    Query(filters): Query<MemoryFilters>,
    State(engine): State<Engine>,
) -> Result<Json<MemoryListResponse>, ApiError> {
    let memories = engine.list_memories(&filters)?;
    Ok(Json(MemoryListResponse {
        items: memories,
        total: memories.len(),
    }))
}

Response shapes should match what the dashboard's current SQL queries return — see wysie/yantrikdb-hermes-dashboard/app.py for the existing shape (look for endpoints like /api/memories, /api/memory/{rid}, /api/identity-scope, etc.).

Priority

P3 — schedule after:

  1. Reembed API delivery (in-flight, end-of-week target)
  2. v0.5 deep-research substrate (14-question payload sent separately via swarm)

This doesn't block anything in flight; it unlocks dashboard HTTP-mode for cluster deployments, which is currently a "no, can't use the dashboard" answer for anyone running yantrikdb-server.

Out of scope

  • Mutating endpoints (create/update/delete memories) — those already exist via POST /v1/remember, POST /v1/forget, etc., and the dashboard's Admin Mode uses them. This issue is only the read-side gap.
  • Owner-scoping derivation logic — already engine-side per v0.4.10/v0.4.11 of the plugin; this issue just needs it exposed via /v1/identity-scope.
  • Authentication changes — existing Bearer-token auth applies to all new endpoints; no change needed.

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions