Developer builds keyword-based deferred tool loading for open-source desktop AI assistant
A developer has built Ankita, an open-source desktop AI assistant using Electron and a terminal CLI, powered by GitHub Copilot models with a strict constraint of zero runtime npm dependencies. To avoid burning tokens by loading all tool schemas upfront on every request, the developer implemented a deferred tool-discovery system where a single 'find_tools' call loads only the relevant tools needed for a given task. Matching is handled through a curated keyword and category system using word-boundary regex checks rather than embeddings or vector indexes, keeping the logic synchronous, predictable, and dependency-free. The trade-off is intentional: while embeddings would better handle paraphrasing, a keyword-based approach is easier to debug, costs nothing at runtime, and suits a desktop environment where the developer controls both ends. Disambiguation rules are also hardcoded to prevent unrelated tool schemas from loading when queries overlap across categories.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)
Log in to join the discussion and vote.
Log in