You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Semantic Intent Router Refactor (reasoning.ts): Upgraded the intent router to utilize a strict CLASSIFICATION MATRIX and Context Hierarchy Rules. This completely eradicates intent misclassification between Web3 and OS workflows, especially during context-switching.
Agent Identity Compression (promptBuilder.ts): Consolidated verbose [CRITICAL EXECUTION RULES] into 5 high-impact, token-efficient mandates (e.g., OUTPUT RESTRICTION, THINKING GATE, HARD HARDENING) to maximize model attention retention.
Strict Real-World Facts Guardrail: Introduced mandatory search_web requirements for sports scores, schedules, and real-world news to completely eliminate LLM hallucination on dynamic data.
Anti-Silent Stop / Interactive Execution Flow (promptBuilder.ts): Replaced standard tool-call enforcements with [INTERACTIVE EXECUTION FLOW]. The agent is now permitted exactly one short conversational sentence before a tool call (both on success and recovery paths), but is strictly forbidden from ending its turn without attaching the corrected tool payload. This cures the "Silent Stop" / "Promise Without Action" bug while maintaining a natural, conversational UX.
Force Action User Correction (osAgent.ts): Refactored the User Correction Detectors to intercept scoldings with a [CRITICAL INTERCEPT: USER CORRECTION] signal. The LLM is now forced to fetch fresh ground-truth data via tools instead of endlessly apologizing and recycling stale context.
UI/UX & Quality of Life
Import Project Workflow Redesign: Relocated the "Import Project" button from the main navigation sidebar into the "Workspaces" section header. The action is now represented by an intuitive + icon that perfectly scales with the slightly enlarged 0.85rem section text, achieving a significantly cleaner UI layout while keeping workspace management centralized.
Performance — LLM Response Speed Optimization
Cold Start Latency Fix
Non-Blocking DeFi Aggregator Discovery (server.ts): aggregatorRegistry.autoDiscover() was previously await-ed synchronously before app.listen(), blocking the entire server startup by 2–5 seconds while it probed external DeFi providers. Refactored to setImmediate() fire-and-forget so the server starts accepting LLM requests immediately after plugins are loaded, with provider discovery happening in the background.
ML Engine Fetch Timeout (promptBuilder.ts): All 3 network calls to the local Python ML Engine (/memory/rag, /memory/narrative, /skills/list) previously had no timeout. During cold start, when the ML Engine is still booting, these calls would hang for up to 2 minutes waiting for a TCP connection. Added AbortSignal.timeout(1500) to each fetch — if the ML Engine is not ready, calls fail in ≤1.5s and return empty strings gracefully, keeping the first LLM response fast.
Per-Request Latency Optimization
Parallel Volatile Prompt Parts (promptBuilder.ts): buildEpisodicMemories() and buildNarrativeMemories() were called sequentially (await one, then await the other). Refactored to Promise.all([...]) — both network calls now run concurrently, saving ~300–600ms per request.
Parallel Narrative + Skills Fetch (promptBuilder.ts): Inside buildNarrativeMemories(), the /memory/narrative and /skills/list fetches were also sequential. Parallelized with Promise.all().
TTL Cache for Narrative Memory & Skills (promptBuilder.ts): Added a 30-second in-memory TTL cache for narrative memory and skills list. These change only when the user explicitly saves something — re-fetching on every message was wasteful. Cache hit returns instantly with zero network overhead.
5-Second Build Cache (promptBuilder.ts): Added a short-lived cache keyed by agentType + userInput[:80]. Prevents double-building the system prompt when the router warm-up and the agent's own getSystemPrompt() call happen within 5 seconds of each other.
Parallel LLM Router + System Prompt Warm-Up (reasoning.ts): For messages that don't match any keyword (triggering the LLM semantic router), the router call and the OS system prompt pre-build now run simultaneously via Promise.all(). Since 'os' is the most common fallback, its system prompt is pre-warmed into the 5s build cache while the router is deciding — making the router's latency effectively invisible to the user. Applies to both sync and stream paths.
Static Import for historySanitizer (osAgent.ts, web3Agent.ts): Dynamic require('../utils/historySanitizer') inside function bodies (4 occurrences across 2 files) replaced with static ES import at the top of each file.