--- title: Agent Knowledge Store emoji: ๐Ÿ“š colorFrom: red colorTo: blue sdk: docker pinned: false short_description: Multi-container Knowledge Base with TVE and MCP --- # ๐Ÿ“š KNOWLEDGE STORE โ€” Multi-Container Knowledge Base Persistent knowledge base with **10 domain containers**, each with its own **temporal value decay model**. Knowledge value scores update continuously based on age, access patterns, and domain-specific decay curves. ## Containers & Decay Models | Container | Decay Model | Half-life | Notes | |---|---|---|---| | **Medical** | Exponential | 180 days | Outdated = dangerous | | **Legal** | Slow Exponential | 730 days | Laws change rarely | | **Company** | Tiered | 14โ€“365 days | Market fast, SOPs slow | | **Research** | Citation Curve | 540 days | Peaks at day 30 | | **Tech/Docs** | Versioned Decay | 90 days | Tag with version | | **Prompts** | Stable | โˆž | No decay | | **History** | Anti-decay | โˆž | Value **increases** with age | | **Personal** | Drift Decay | 180 days | Preferences drift | | **Finance** | Extreme Decay | 7 days | Market data decays fast | | **Operations** | Operational | 180 days | Keep runbooks versioned | ## Knowledge Value Score `value = (base_importance ร— 0.5) + (access_bonus ร— 0.1) + (time_factor ร— 0.4) ร— 100` - `0โ€“39`: Low value (red) โ€” consider archiving or updating - `40โ€“69`: Moderate (yellow) โ€” verify freshness - `70โ€“100`: High value (green) โ€” actively useful ## MCP โ€” Claude Desktop ```json { "mcpServers": { "knowledge": { "command": "npx", "args": ["-y", "mcp-remote", "https://chris4k-agent-knowledge.hf.space/mcp/sse"] } } } ``` ## MCP Tools | Tool | Description | |---|---| | `ks_write` | Write a document to a container/folder | | `ks_read` | Read by container/folder/id | | `ks_search` | Full-text + tag + container search | | `ks_list` | List docs in container/folder | | `ks_delete` | Delete a document | | `ks_containers` | List containers with counts and avg value | | `ks_stats` | Overall statistics | | `ks_top_value` | Highest-value documents right now | ## REST API ``` GET /api/containers GET /api/docs?container=legal&sort=value GET /api/docs/search?q=GDPR&container=legal&sort=relevance GET /api/docs/top-value?container=tech&limit=10 GET /api/docs/{container}/{folder}/{id} POST /api/docs {"container":"legal","folder":"gdpr","title":"...","body":"...","tags":[],"importance":8} PATCH /api/docs/{container}/{folder}/{id} DELETE /api/docs/{container}/{folder}/{id} GET /api/stats ``` ## Agent Usage ```python import requests BASE = "https://chris4k-agent-knowledge.hf.space" # Store knowledge requests.post(f"{BASE}/api/docs", json={ "container": "tech", "folder": "api", "title": "FastAPI Dependency Injection Pattern", "body": "...", "tags": ["fastapi", "patterns", "python"], "importance": 7, "author": "researcher", "version": "0.111" }) # Search results = requests.get(f"{BASE}/api/docs/search?q=GDPR+deletion&container=legal").json() # Top value docs right now top = requests.get(f"{BASE}/api/docs/top-value?limit=5").json() for doc in top: print(f"{doc['_value']:>5.1f} [{doc['container']}] {doc['title']}") ``` *Chris4K ยท ki-fusion-labs.de ยท Part of the JARVIS/TheCore agent ecosystem*