Building a knowledge agent without embeddings
Key point
Vercel proposed a cheaper, easier-to-debug knowledge agent that uses the filesystem and bash instead of a vector DB.
Details
Vercel combined Vercel Sandbox, AI SDK, and Chat SDK to release a knowledge agent template that operates without embeddings. The core idea is to use the filesystem and bash as the basic tools for search instead of a vector DB, chunking, and an embedding model.
With the existing approach, it's hard to explain which chunk was chosen for a question and why, and when a wrong answer is given, it's difficult to trace the cause. In contrast, this approach reads and searches actual files with commands like grep, find, and cat, so if an answer is wrong, the trace immediately shows which files were checked with which commands.
As an internal Vercel case, after switching to a filesystem + bash-based agent, the cost per call dropped from about $1.00 to $0.25, and output quality also improved. Debugging is fast too. If a wrong answer comes out, you can check the search path and the files that were read, then fix the files or the search strategy.
Here's how it works:
- When a source is added in the admin screen, the data is stored in Postgres.
- Content is synced to a snapshot repository via Vercel Workflow.
- When search is needed, Vercel Sandbox loads the snapshot.
- The agent's
bashandbash_batchtools execute filesystem commands. - The final answer is returned along with reference links if needed.
This template comes with GitHub and Discord adapters by default, and with Chat SDK, the same agent can be connected to other platforms such as Slack, Microsoft Teams, and Google Chat. Platform-specific authentication, event formats, and messaging are handled by the adapters, while the agent logic stays the same.
Also, @savoir/sdk provides tools for connecting AI SDK-based apps to a knowledge store. It includes a complexity router that automatically branches to different models depending on question difficulty, and the admin screen lets you handle usage statistics, error logs, user management, source configuration, and sync control all in one place. There's also an AI-powered admin agent that directly answers operational questions like "errors in the last 24 hours" or "frequently asked questions" using internal tools (query_stats, query_errors, run_sql, chart).
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.