Skip to content

Dedup, relevance gate, and agents dashboard#92

Merged
sm86 merged 6 commits into
mainfrom
dedup-and-filters
Feb 25, 2026
Merged

Dedup, relevance gate, and agents dashboard#92
sm86 merged 6 commits into
mainfrom
dedup-and-filters

Conversation

@sm86
Copy link
Copy Markdown
Contributor

@sm86 sm86 commented Feb 25, 2026

Summary

  • Deduplication always-on: removed unused deduplicate flag, dedup now runs unconditionally
  • Relevance gate: per-agent content filtering using a configurable relevance prompt; blocks off-topic memories at ingest
  • Fix ensureAgentExists: auto-recreate bug where agent lookup could silently fail
  • /agents dashboard page: full agent management UI — cards with soul/persona + relevance prompts, per-agent stats (users, episodic, semantic, procedural), inline edit/create/delete modals
  • Global nav bar: top nav in layout with Memory Vault and Agents links
  • Memory logs ordering: episodic → procedural → semantic in the logs table

Test plan

  • Memory logs show episodic first, procedural second, semantic last
  • Navigate to /agents — agent cards load with soul and relevance prompts
  • Stats (users, memory counts) populate after initial render
  • Edit an agent's soul prompt → save → card updates inline
  • Create a new agent → appears in list
  • Delete a non-default agent → removed from list
  • default agent has no Edit/Delete buttons
  • Nav links (/memory, /agents) work from either page
  • Relevance gate blocks off-topic content for agents with a relevance prompt set
  • Deduplication fires on every ingest without needing a flag

sm86 added 6 commits February 25, 2026 19:32
No caller ever passed deduplicate=true, making the opt-in flag dead code.
Ingestion was disabled in the OpenRouter proxy due to runaway memory growth
from lack of dedup. Now dedup runs unconditionally for all sectors.
With dedup always-on, strengthenFact() is never called. strength is
always 1.0, so strengthScore = log(1.0) = 0 — contributing nothing
to scoring. Remove from types, scoring, store, and DDL.
Agents can now set a relevancePrompt that gates ingest — an LLM checks
if incoming content matches the agent's scope before extraction/embedding.
Irrelevant content is rejected early with a reason. Adds GET/PUT single
agent endpoints and updates README with new API docs and flow diagram.
Replace silent INSERT OR IGNORE with a strict existence check that throws
agent_not_found. Only the default agent is auto-created at init via a
private upsertDefaultAgent(). Add routeError helper to router so all
catch blocks return 404 on agent_not_found instead of 500.
- New /agents page: agent cards with soul/relevance prompts, per-agent
  stats (users, episodic, semantic, procedural), edit/create/delete modals
- api.ts: add soulMd + relevancePrompt to getAgents() type; add
  createAgent() and updateAgent() calls
- layout.tsx: add global top nav with Memory Vault and Agents links
- memory/page.tsx: offset sticky header to top-11 to clear global nav
@sm86 sm86 merged commit bca2508 into main Feb 25, 2026
1 check passed
@sm86 sm86 deleted the dedup-and-filters branch March 6, 2026 08:14
Shriiii01 pushed a commit to Shriiii01/ekai-gateway that referenced this pull request Mar 7, 2026
Dedup, relevance gate, and agents dashboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant