u/VadeloSempai

▲ 33 r/modelcontextprotocol+5 crossposts

I’ve been obsessed with Agentic Workflows lately, and I just found the "missing link" for anyone struggling with agent hallucinations and massive API bills.

It’s called King Context, and it’s an open-source framework that replaces messy vector searches with structured Corpus Engineering.

The GitHub Repo:https://github.com/deandevz/king-context

Why this is a complete paradigm shift:

  1. The "Corpus" Method: Instead of just "chunking" data, it synthesizes it into a specialized corpus. You can generate a corpus from any source (docs, web research, internal notes) and refine it. It’s like giving your agent a custom-built brain instead of a pile of random papers.
  2. Metadata-First Retrieval: It uses a tiered approach (metadata -> preview -> full read). This stopped my agents from "hallucinating" on missing context because they can verify if the information exists before they consume the tokens.
  3. Solving the Skill Bottleneck: By using "Skills" alongside a specialized Corpus, you can build multi-agent workflows where one agent acts as a researcher (building the corpus) and the other acts as an expert (executing with 100% facts).

The Numbers (Benchmarked against Context7):

  • Accuracy: 38/38 correct facts (100%) vs 32/38.
  • Hallucinations: ZERO (0.0) per query.
  • Efficiency: 3.2x fewer tokens per request.
  • Speed: Up to 170x faster metadata hits.

I’ve been talking to the dev (@deandevz), and the roadmap for Corpus Refinement (automatically pruning noisy data) is going to change how we build production-grade agents.

If you are tired of agents getting lost in large codebases or documentation, you need to check this out. It’s local-first, transparent, and built for the "Vibe Coding" era where context is everything.

Check it out here:https://github.com/deandevz/king-context

Would love to hear from anyone else trying to move away from traditional RAG. How are you handling context bloat?

u/VadeloSempai — 1 day ago
▲ 3 r/huggingface+2 crossposts

I’ve been working on an open-source project called **King Context**:

https://github.com/deandevz/king-context

We originally built it because we were frustrated with how documentation retrieval works for coding agents today.

A lot of existing tools are convenient, but in practice they often:

- send too much text

- waste tokens on irrelevant chunks

- hide what is actually indexed

- make updates hard to control

- and still leave the agent to figure out what really matters

That pain gets worse when you’re working with larger systems, multiple corpora, or long-running agent workflows.

So the main idea behind King Context was to take a different route:

- local-first indexing

- structured metadata per section

- metadata-first retrieval

- preview before full read

- progressive disclosure instead of dumping large chunks into context

It started as an open-source answer to tools like Context7, but the project is already growing into something broader.

Right now it can work with:

- vendor documentation

- open-web research corpora

- internal notes

- ADRs / decision history

- multi-corpus retrieval workflows

So the direction is becoming less “docs lookup” and more “context infrastructure for agents”.

One thing we care about a lot is transparency:

- you can inspect what is indexed

- you can control updates

- you can keep everything local

- and the retrieval flow is designed to be understandable, not a black box

We also benchmarked it against Context7 and got better results in token efficiency and answer quality. The benchmark, raw data, and case studies are all in the repo README.

A few numbers from the benchmark:

- 3.2x fewer tokens per query in one round

- lower latency

- fewer hallucinations

- better factual accuracy in the skill-vs-skill run

But honestly the part I’m most interested in is the long-term direction:

open-source context infrastructure that agents can actually rely on in real projects.

If people here are interested, I’d love feedback on any of these angles:

- retrieval architecture

- OSS positioning

- corpus packaging / registry ideas

- contributor experience

- how to make this more useful as shared infrastructure

u/VadeloSempai — 7 days ago