Context management for long-horizon agents

Keep the evidence.
Drop the clutter.

ContextPilot gives LLM agents a disciplined way to plan, retrieve, remember, and offload—so they can navigate long documents while keeping their working context focused, compact, and evidence-rich.

  • Structured memory
  • Targeted retrieval
  • Soft offloading
context / active managed
Working contextKeep what matters.
5.6k tokens
Active contextcompact
ANALYZEPLANSEARCHREADREMEMBEROFFLOADANSWER

A context control plane

Four moves.
One compact mind.

ContextPilot turns context management into explicit, inspectable actions. The model can gather evidence without carrying every intermediate result all the way to the answer.

01

Planning

Form a search strategy, revise it after new evidence, and keep the next action deliberate.

plan · analyzeText
02

Retrieval

Index once, search precisely, then open only the chunks needed to verify the answer.

searchEngine · readChunk
03

Memory

Save durable facts with their relationships and retrieve them when final reasoning needs them.

memorize · updateMemory
04

Offloading

Delete noise, truncate bulky observations, or compress useful spans into a smaller working set.

delete · truncate · compress

Interactive execution trace

Explore a live trace.

Step through an illustrative local trace. No model endpoint, document upload, or API key is used in this browser demo.

ILLUSTRATIVE RUNChronology audit
USER QUERY

Active messages2 in context

Trained where choices matter

Explore key actions.
Assign fine-grained credit.

The RL pipeline focuses exploration on context-editing decisions and uses downstream outcomes to train the intermediate states that produced them.

01 · Context-aware partial rollout

Explore high-impact actions.

Branch around pivotal context edits instead of exploring every action uniformly across the trajectory.

Context-aware partial rollout branches trajectories at high-impact context-management actions.
02 · Fine-grained credit assignment

Assign fine-grained credit.

Propagate downstream rewards to the context snapshots that shaped each outcome along the trajectory.

Fine-grained credit assignment aggregates downstream trajectory rewards back to intermediate snapshots.

Evaluation suite

Four ways to go long.

Run the full pipeline across long-book comprehension, narrative QA, conversational memory, and deep web search—or launch one task at a time.

01InfBenchLong-book choice 02NovelQANarrative reasoning
03LongMemEvalConversational memory
04BrowseComp+Deep search
QUICKSTART
# Install the inference environment
bash infer/scripts/setup_environment.sh
source infer/.venv/bin/activate

# Evaluate all four tasks
bash infer/scripts/run_full_pipeline.sh \
  /path/to/checkpoint my-run

Open source

Give your context
a better pilot.