Description
Acon (Agent Context Optimization) compresses both environment observations (tool outputs) and interaction histories (conversation), reducing peak token usage 26-54% while preserving task success. Tested on AppWorld, OfficeBench, Multi-objective QA.
Key insight: Zeph currently compresses conversation history but not tool output verbosity. Acon applies separate compression policies to each stream and merges under a unified budget.
Relevance to Zeph
crates/zeph-agent-tools/ — tool results verbosity is unmanaged today
crates/zeph-context/src/assembler.rs — observation stream compression before injection
crates/zeph-core/src/agent/tool_execution/focus.rs (changed in CI-799) — already has focus logic, extend to token budgeting
Implementation Sketch
- Add
ToolResultCompressor that truncates/summarizes large tool outputs above configurable token limit
- In context assembler: apply separate budget splits to (tool_results, conversation_history, system_prompt)
- Use existing LLM provider for on-the-fly observation summarization
Complexity vs Benefit
- Complexity: Low-Medium | Benefit: High (26-54% token reduction in tool-heavy sessions)
Source
Description
Acon (Agent Context Optimization) compresses both environment observations (tool outputs) and interaction histories (conversation), reducing peak token usage 26-54% while preserving task success. Tested on AppWorld, OfficeBench, Multi-objective QA.
Key insight: Zeph currently compresses conversation history but not tool output verbosity. Acon applies separate compression policies to each stream and merges under a unified budget.
Relevance to Zeph
crates/zeph-agent-tools/— tool results verbosity is unmanaged todaycrates/zeph-context/src/assembler.rs— observation stream compression before injectioncrates/zeph-core/src/agent/tool_execution/focus.rs(changed in CI-799) — already has focus logic, extend to token budgetingImplementation Sketch
ToolResultCompressorthat truncates/summarizes large tool outputs above configurable token limitComplexity vs Benefit
Source
.local/specs/NNN-acon-dual-compression/spec.mdbefore implementation