MyAPI
A context retrieval layer for AI agents and human operators. Agents query MyAPI for project decisions, prior work, and architectural constraints — and get back reranked evidence in under three seconds.
What it is
MyAPI is a context retrieval layer that sits between AI coding agents (Claude Code, Codex, Cursor) and a unified personal corpus. Instead of having an agent scan files on every cold start — burning 30-90 seconds inferring context from filenames and README fragments — agents call a single /query endpoint and get back structured answers with reranked evidence in under 3 seconds.
Underneath, MyAPI indexes 3+ years of personal knowledge: ~3,200 Obsidian markdown notes, exported ChatGPT and Claude conversations, and CLI agent session logs. A Python pipeline (context_refinery/) normalizes heterogeneous sources into canonical knowledge objects. Khoj provides semantic vector search; Context Refinery sits on top to handle query classification, multi-lane retrieval (semantic + keyword + synthesized-note boosting), metadata-aware filtering, and reranking.
Why it matters
The system is benchmarked, not vibes-tested. Retrieval quality is measured against a categorized query bank with seven diagnostic buckets — win, weak win, corpus gap, retrieval gap, metadata gap, intent gap, answer-shape gap. Corpus shaping and intent classification are the primary levers for improvement, not model swaps or hyperparameter tuning.
It serves two audiences from the same pipeline:
- Agents — structured
/queryresponses with confidence scores, source metadata, and timestamps. Designed for cold-start context elimination and inter-agent handoffs. - Humans — episodic recall ("find that thread where I figured out X"), decision retrieval, and synthesis questions across years of notes and conversations.
Status
Phase 1 (build the pipeline) is closed and deployed on a cloud VM behind Tailscale, with auto-shutdown to keep idle costs low. Phase 2 — trust calibration via benchmark-driven refinement — is the active work.