Skip to content
reaatechREAATECH

reaatech/context-window-planner

0Last commit: Apr 30, 2026GitHub →

These packages provide a deterministic engine for managing LLM context windows by deciding which data to include, summarize, or drop based on token budgets. They solve the problem of prompt overflow in complex agentic workflows where input data frequently exceeds model limits. The system uses a modular builder pattern that allows you to compose custom packing strategies, tokenizer adapters, and typed context primitives into a single, framework-agnostic execution plan.

Packages

2 packages

@reaatech/context-window-planner

v0.1.0
Manages LLM context windows by providing a builder class, packing strategies, and typed primitives for prioritizing, summarizing, or dropping content. It relies on `js-tiktoken` for token counting and offers a pluggable architecture for custom tokenizer adapters and packing logic.
status
published
published
1 day ago

@reaatech/context-window-planner-cli

v0.1.0
Provides a command-line interface for the `@reaatech/context-window-planner` library, accepting JSON via `stdin` to calculate token-aware packing plans for LLM context windows. It outputs a structured JSON object to `stdout` detailing which items were included, summarized, or dropped based on the specified strategy and tokenizer.
status
published
published
1 day ago

Comments

Sign in with GitHub to comment and vote.

Loading comments…