context_reduction

command
v0.61.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 10, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Command context_reduction compares one deterministic message reduction with the unchanged context on 64-round report-reading tasks. It reuses Interaction's ContextProcessor and committed WorkingContext; no history store or replay layer participates in reduction. Run go run ./examples/agent/context_reduction from the workspace root, or GOWORK=off go run ./agent/context_reduction from examples to use the published dependencies selected by its go.mod.

The opt-in example policy replaces byte-identical successful Tool text of at least 1 KiB with a short backward reference to the first full output from the same Tool. Call/result pairs, unique outputs, system constraints, and user goals remain intact. Errors, structured output, media, annotations, ambiguous identities, and references too large to remain below 1 KiB are left unchanged. It is a task policy, not an enabled-by-default Interaction behavior.

Paired eval checks require zero exact-answer degradation and at least 50% fewer serialized model-request bytes on the fixed dataset. A recreated Runtime restores committed context from the append log without repeating tool calls or regrowing old output. The local model explicitly resolves references; this proves the deterministic protocol and task contracts, not live-model quality, tokenizer savings, or provider charges. MemoryStore retains state only for its own lifetime.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL