ContextForge is a new SDK designed to provide effectively unbounded context for LLMs without overwhelming the prompt window. It addresses the common issue of long-term memory systems failing during extended runs by treating the context window as a dynamic working set rather than permanent storage.

  • Stores all data on disk using SQLite, eliminating the need for vector databases.
  • Builds a lightweight index to reconstruct a minimal working set at each step.
  • Demonstrated stability and consistency in runs exceeding 180 days and 500 days.
  • Outperformed systems like MemPalace in long-term evaluations using GPT-class models.
  • Compatible with vLLM and any system allowing control over context input and output.

The author argues that simply storing and retrieving data is insufficient for longevity, making this approach more stable and faster for applications requiring more than a few turns.