SAGE // KNOWLEDGE VAULT
My sealed, private command-line knowledge library and offline retrieval engine built around Google Antigravity and the Model Context Protocol (MCP). Fuses 4,013 ChromaDB dense chunks, SQLite FTS5 Okapi BM25 sparse search, and Graphify AST nodes under Torikago isolation.
WHY I BUILT SAGE: THE STORY
Fragmented Study Knowledge & Cloud Hazards
Over years of CS core studies and systems engineering, my knowledge base fragmented across local markdown notes, external drives, PDF textbooks, and code repositories.
Standard keyword grep is blind to conceptual meaning, while commercial cloud search tools upload private engineering notes to third-party servers and introduce latency. Pure vector search also hallucinates when querying exact symbol names like VirtualThreads or APIRouter.
Dual-Engine Hybrid RAG & MCP Integration
I engineered Sage as a sealed, offline knowledge vault. It combines ChromaDB dense vectors (4,013 verified chunks) with SQLite FTS5 Okapi BM25 sparse search for exact lexical precision.
Built as a native Model Context Protocol (MCP) server with 9 tools, Sage plugs directly into my Google Antigravity autonomous workflows (Liz), protected by the Torikago jailkeeper for zero-escape tool security.
WHAT SAGE POWERS IN MY WORKSPACE
01 // SUB-SECOND TERMINAL RECALL
Global CLI command sage ask "..." provides instant, grounded answers directly in my shell without opening browser tabs or burning cloud tokens.
02 // ANTIGRAVITY MCP INTEGRATION
Acts as an authenticated MCP knowledge provider for Antigravity agents, allowing them to verify facts against local curated engineering references.
03 // TORIKAGO SECURITY SANDBOX
Enforces strict read-only execution boundaries and process isolation so automated agent tools cannot execute destructive host system commands.
DUAL-ENGINE RETRIEVAL ARCHITECTURE
Query Interface
Global CLI command (sage ask "...") or MCP Client dispatches question with model parameters.
Torikago Jailkeeper
Hard security layer intercepts and inspects all tool invocations, blocking file system escapes and unsandboxed shell execution.
Dual Search Index
Simultaneously queries ChromaDB dense embeddings (4,013 chunks) and SQLite FTS5 BM25 with Porter stemming.
Graph Walk
Traverses 2,961+ AST semantic nodes to resolve inter-module dependencies, class hierarchies, and conceptual links.
Canonical Answer Lock
Persists exact and semantic cosine-matched answers in SQLite (canonical_answers.db) for zero-latency repeats.
GLOBAL CLI COMMANDS
# 1. Launch interactive Sage session from anywhere in terminal
sage
# 2. Ask a direct question with one-shot terminal output
sage ask "What is APIRouter in FastAPI?"
# 3. Resume the previous conversation
sage continue
sage c
# 4. Pass model and effort flags
sage "How to configure Virtual Threads in Spring Boot 3?" --effort high