Dedup, relevance gate, and agents dashboard#92
Merged
Merged
Conversation
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
Shriiii01
pushed a commit
to Shriiii01/ekai-gateway
that referenced
this pull request
Mar 7, 2026
Dedup, relevance gate, and agents dashboard
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
deduplicateflag, dedup now runs unconditionallyensureAgentExists: auto-recreate bug where agent lookup could silently fail/agentsdashboard page: full agent management UI — cards with soul/persona + relevance prompts, per-agent stats (users, episodic, semantic, procedural), inline edit/create/delete modalsTest plan
/agents— agent cards load with soul and relevance promptsdefaultagent has no Edit/Delete buttons/memory,/agents) work from either page