My agents retrieved topic-specific passages from a private library
Different document types were split where their topics changed and exposed through a local retrieval tool.
Transcripts are cut where the topic changes, so each piece an AI agent gets back holds one topic.

Context
My own knowledge base and agent workflows: over 5M words by my count, across hundreds of mostly Markdown files, plus textbooks in PDF and YouTube content (transcripts and comments). All of it needed to be queryable locally by whatever agents I was experimenting with.
Problem
Vanilla RAG stacks with static chunking and a single generic embedding couldn't handle the mix. Long essays, structured SOPs, noisy transcripts, and comment threads all got chopped poorly. Retrieval felt random, and nothing integrated cleanly with locally run agent tooling.
Approach
I built on the open-source Archon platform and replaced its default pipelines with document-type-specific ones. The default cut every 5,000 characters and split topics apart. For each source (Markdown, PDF, YouTube), my chunker cuts where the topic changes instead. For retrieval I used Google's Gemini Embedding 001 question-answering and document-query task types. The whole thing is exposed through a locally run MCP so any agent in my IDE can use it as a tool.
Stack
- Archon
- Gemini Embedding 001 (cluster, semantic, QA, query task types)
- Python stack (Pydantic, FastAPI, Logfire, Hypothesis)
- Local MCP integration
- Vector indexing inside Archon
Result
I have a retrieval engine that pulls passages from my own writing, external textbooks and YouTube data on demand. Each piece an agent gets back holds one topic, and agents draft, fact-check and explore ideas against the corpus I actually care about.
Impact
My content systems and agent experiments all pull from this engine, and I control the corpus behind it.
Lessons
Document-type-specific chunking and task-typed embeddings matter as much as the base model. If you treat RAG as an afterthought, everything built on top of it inherits the sloppiness.
Who this is for
For teams who want their agents grounded in a large private corpus and want to own the retrieval stack instead of renting it.
Get a quoteThe method behind this result
- Agent SystemsAI agent operators need action histories they can inspect after interruption. Each attempted tool call should retain its arguments, permission check and result.
- The AI Agent Industry Has Automated the Handoff Back to YouThe agents finish their parts. The buyer still has to make the result usable.