openhuman icon indicating copy to clipboard operation
openhuman copied to clipboard

Feature Request : Memory Tree wiki status panel - on/off toggle, observability metrics, and team-level knowledge siloing

Open githb-ac opened this issue 6 months ago • 3 comments

Summary

Add a Memory Tree wiki status panel to the OpenHuman dashboard that gives operators live visibility into the health and activity of the Memory Tree and Obsidian wiki, an on/off toggle to pause or resume the auto-fetch and wiki update cycle, observability metrics (sync count, compression ratio, last updated, chunk count), and the ability to silo knowledge at the team level so each team's agents draw from a scoped subset of the wiki rather than the full shared store.

Background

OpenHuman's Memory Tree is directly inspired by Andrej Karpathy's LLM Wiki pattern - a compounding, LLM-maintained personal knowledge base where an LLM writes and maintains structured markdown files as sources are ingested, handling cross-referencing, updates, and contradiction flagging automatically. Rather than re-deriving knowledge from raw documents on every query via RAG, the wiki accumulates and organises knowledge over time into a persistent, compressed, queryable store.

OpenHuman implements this as the Memory Tree - a local-first knowledge base built from connected accounts and activity, canonicalised into ≤3k-token markdown chunks, scored, and folded into hierarchical summary trees stored in SQLite. The same chunks land as .md files in an Obsidian-compatible vault on the operator's machine.

Problem

The Memory Tree runs silently in the background on a 20-minute auto-fetch loop. Operators have no dashboard surface to:

  • See whether the wiki is actively syncing or stalled
  • Know how many chunks exist, when the last sync ran, or what the compression ratio is
  • Pause the sync cycle without editing config and restarting
  • Understand which integrations are contributing data and which are idle
  • Scope wiki knowledge to individual teams, so a Research team's agents don't have their context polluted by the Writing team's accumulated knowledge

As the wiki grows and teams multiply, the absence of observability and siloing becomes a reliability and relevance gap.

Solution

Scope: app (dashboard panel) + core (wiki observability API + siloing)

Part 1 - Memory Tree status panel

A Memory Tree tab in the dashboard shows:

Metric Description
Status Running / Paused / Syncing / Error
Last sync Timestamp of the most recent completed auto-fetch cycle
Next sync Countdown to next scheduled sync
Total chunks Number of ≤3k-token markdown chunks in the store
Compression ratio Average raw-to-compressed size reduction across all chunks
Wiki size Total size of the Obsidian vault on disk
Active integrations List of connected integrations contributing data, with last-fetched timestamp per integration

On/off toggle: a single toggle pauses or resumes the auto-fetch and wiki update cycle without a restart. Pausing stops new data ingestion but leaves the existing wiki intact and queryable.

Part 2 — Team-level knowledge siloing

Each team can be assigned a wiki scope in config.yaml. Agents on a scoped team only draw context from chunks tagged with their scope (or the global scope). This prevents cross-team knowledge contamination and keeps agent context relevant.

memory_tree:
  enabled: true
  auto_fetch_interval_minutes: 20
  scopes:
    - id: research
      tags: [research, web, news, academic]
      teams: [research_team]
    - id: writing
      tags: [writing, drafts, style, templates]
      teams: [newsletter_team]
    - id: global
      tags: []
      teams: "*"        # all teams can access global-scoped chunks

Chunks are tagged at ingestion time based on the source integration and content classifier. Operators can view and edit tag assignments from the panel.

Part 3 - Integration health list

Below the summary metrics, the panel lists every connected integration with:

  • Integration name and icon
  • Last fetched timestamp
  • Chunk count contributed
  • Status (Active / Stale / Error)

Dashboard mockup attached

Acceptance criteria

  • [ ] Status panel renders - Memory Tree tab shows status, last sync, next sync, chunk count, compression ratio, wiki size, and integration list
  • [ ] On/off toggle - pausing stops the auto-fetch cycle; resuming restarts it; existing wiki is unaffected by pause
  • [ ] Real-time status - status indicator updates during an active sync cycle (Syncing state visible)
  • [ ] Integration health list - each connected integration shown with last-fetched timestamp, chunk count, and status
  • [ ] Team-level siloing - agents on scoped teams only receive context from chunks matching their scope tags
  • [ ] Global scope - chunks tagged global are accessible to all teams
  • [ ] Tag assignment - operators can view and edit chunk tag assignments from the panel
  • [ ] Config-driven scopes - team scope definitions read from config.yaml
  • [ ] Toggle persists - pause/resume state survives a dashboard restart (written to config or local state store)
  • [ ] Diff coverage ≥ 80% - the implementing PR meets the changed-lines coverage gate (Vitest + cargo-llvm-cov, enforced by .github/workflows/coverage.yml)

Related

  • Karpathy LLM Wiki (inspiration): https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f
  • OpenHuman Memory Tree docs: https://tinyhumans.gitbook.io/openhuman/features/memory-tree
  • OpenHuman Obsidian wiki docs: https://tinyhumans.gitbook.io/openhuman/features/obsidian-wiki
  • OpenHuman auto-fetch docs: https://tinyhumans.gitbook.io/openhuman/features/obsidian-wiki/auto-fetch
  • Proposed: Concurrent orchestrator visibility layer (FR4)
  • Proposed: Teams and agents management panel (FR9)
  • Proposed: Per-agent quality scoring and hallucination rate tracking (FR15)

githb-ac avatar May 15 '26 21:05 githb-ac

Audit before this gets picked up speculatively — Part 1 is already in flight, and the rest splits into one that's blocked on an unfiled FR and one that's straightforwardly scope-able on its own.

Part 1 — Status panel + on/off toggle

🟡 Active: PR #2719 — feat(memory-tree): status panel + on/off toggle (#1856 Part 1) by @YOMXXX. The PR body explicitly calls this "Part 1." Branch feat/1856-memory-tree-status-panel ships:

  • New MemoryTreeStatusPanel.tsx (4 tiles + auto-sync toggle), mounted in MemoryWorkspace so both /intelligence and Settings → Memory data inherit it
  • Two RPCs: memory_tree_pipeline_status (aggregate read over mem_tree_chunks + mem_tree_jobs + on-disk size) and memory_tree_set_enabled (toggle, flips scheduler_gate.mode between Auto and Off, hot-reloads via scheduler_gate::gate::update_config)
  • Pure derive_pipeline_status helper locks the precedence rules (paused > error > syncing > running > idle)
  • Adaptive polling (1.5 s while syncing, 4 s otherwise)
  • i18n for 14 locales

State: OPEN, MERGEABLE, awaiting CI + review. Don't grab this one — wait for it to land.

Part 2 — Team-level knowledge siloing

❌ Not started. Quick grep across src/openhuman/memory_tree/ and src/openhuman/memory_sync/ turns up zero references to team / scope / silo concepts. More importantly, this part is blocked on FR9 (Teams and agents management panel), which the issue itself lists as Proposed. Without FR9 there's no "team" entity for the memory tree to silo against — building Part 2 now would mean defining a parallel team concept that has to be ripped out when FR9 lands.

Part 3 — Integration health list

❌ Not in #2719's scope. PR #2719 ships 4 status tiles; the integration-by-integration list ("each integration with name, last-fetched, chunk count, status") isn't covered. This one isn't blocked on FR9 — the data sources already exist (memory_sync::sync_status shipped per-source sync metadata in #1250, and per-source chunk_count is already in memory/read_rpc.rs). So it's a clean, focused follow-up scope: surface the per-integration data that's already in the core through a new row component below the existing 4-tile panel.

Foundation already in main (so the parts above can build on it):

Capability Where Shipped by
chunk_count per source src/openhuman/memory/read_rpc.rs Pre-#1856
Per-source sync status src/openhuman/memory_sync/sync_status/ #1250 (merged 2026-05-05)
Memory Tree UI surface app/src/components/intelligence/MemoryWorkspace.tsx, VaultPanel.tsx, MemorySources.tsx, MemorySyncConnections.tsx Across many merged PRs

Proposed tidy-up (same shape as #1848, #1440, #1855):

Once PR #2719 lands, this issue could be cleaned up by splitting the remaining scope:

  1. feat(memory-tree): per-integration health list under status panel — Part 3, unblocked, can ship right after #2719 since the data already exists in memory_sync::sync_status.
  2. feat(memory-tree): team-scoped wiki silos — Part 2, explicitly blocked on FR9 (link to FR9's tracking issue once filed). Sits dormant until FR9 ships.

Then this umbrella can close cleanly with PR #2719's merge, and the two focused follow-ups each have their own clear ready/blocked state. Happy to file those two follow-up issues once #2719 merges if @senamakel / @YOMXXX agree to the split — otherwise this is purely a process note.

CodeGhost21 avatar May 27 '26 13:05 CodeGhost21

Follow-up on my audit comment above — filed the unblocked piece as its own focused tracker, and clarifying ownership so nobody steps on anyone:

Part Status Owner
Part 1 — status panel + on/off toggle In flight in PR #2719 @YOMXXX
Part 3 — per-integration health list under the panel Filed as #2763 — I'll pick this up after #2719 merges (it builds on the panel + RPC #2719 introduces) @CodeGhost21 (me)
Part 2 — team-scoped wiki silos Not filed — blocked on FR9 (Teams and agents management panel) which doesn't have its own tracking issue yet. Will be filed once FR9 lands so the dependency is concrete. —

I'm intentionally not closing this umbrella — PR #2719 is still open under it. Leaving closure to a maintainer after #2719 lands.

Happy to revisit the Part 2 / FR9 split once @senamakel files (or wants me to file) the FR9 tracking issue.

CodeGhost21 avatar May 27 '26 13:05 CodeGhost21

Closing this umbrella — the in-scope, unblocked work has shipped and the remaining parts are tracked/blocked elsewhere.

Part Status
Part 1 — status panel + on/off toggle ✅ Merged in PR #2719 (2026-05-27). Ships MemoryTreeStatusPanel.tsx + the memory_tree_pipeline_status / memory_tree_set_enabled RPCs.
Part 3 — per-integration health list 📋 Tracked separately in #2763 (unblocked; builds on the panel + RPC from #2719).
Part 2 — team-scoped wiki silos ⛔ Deferred — blocked on FR9 (Teams & agents management panel). To be filed as its own issue once FR9 lands, so the dependency is concrete. There is no "team" entity for the memory tree to silo against yet.

No new implementation is needed against this umbrella: Part 1 is done, Part 3 has its own tracker, and Part 2 should not be built until FR9 establishes the team concept. Follow Part 3 in #2763.

CodeGhost21 avatar May 29 '26 11:05 CodeGhost21