Original Reddit post

I built ContextOS , an open-source, token-budget-aware context orchestration layer for long-horizon LLM agents. The idea is that retrieval and context selection are different problems. ContextOS uses hybrid retrieval (dense + BM25), RRF fusion, cross-encoder reranking, and deterministic token-budget-aware planning to decide which memories actually make it into the model’s context. It also records an execution trace for each decision, so you can inspect why a memory was selected or rejected, how it ranked at each stage, and how much of the context budget it consumed. I built an evaluation harness and an interactive demo to visualize the whole pipeline. GitHub: https://github.com/ayeangad/contextos submitted by /u/Whyrureadingthisz

Originally posted by u/Whyrureadingthisz on r/ArtificialInteligence