SuperAPI AI Directory

TACO - An Open-Source Self-Evolving Observation Compression Framework for Terminal Agents from Beihang University and Other Universities

Author: AI小集 · Original source: AI工具集

What is TACO

TACO is a training-free, plug-and-play self-evolving observation compression framework for terminal agents open-sourced by the University of Manchester, Beihang University, the Hong Kong University of Science and Technology, and the MAP team. The framework addresses context bloat caused by the accumulation of shell output noise in multi-turn command-line tasks, automatically discovers and reuses compression rules from interaction trajectories, and retains key error messages while filtering redundant logs. The framework is plug-and-play and training-free, and has been integrated into Harbor's terminus-2. On benchmarks such as TerminalBench, it brings a 1%-4% accuracy improvement to DeepSeek-V3.2、Qwen3 and other models, significantly reducing token consumption for long-horizon tasks.

TACO

Main Features of TACO

  • Self-evolving rule discovery: The framework automatically scans raw shell output from multi-turn terminal interaction trajectories, identifies redundant patterns, and generates candidate compression rules, without the need for manually written fixed prompts or heuristic strategies.
  • Online rule refinement and repair: It iteratively adjusts rule boundaries based on real-time feedback from task execution, fixing issues of over-compression or missing key signals, and ensuring that error messages and status feedback are not mistakenly deleted.
  • Global rule pool and cross-task transfer: It maintains a persistent global rule knowledge base, enabling new tasks to directly load and reuse rules validated in previous sessions, thereby accumulating experience across repositories and command environments.
  • Plug-and-play, training-free integration: It is embedded directly into existing terminal Agents (such as terminus-2 in the Harbor framework) as a plugin, enabled via command-line arguments, without modifying the model architecture or performing any fine-tuning.
  • Dual optimization of token efficiency and performance: While filtering low-value terminal noise, it retains key environmental feedback, making token consumption for long-horizon multi-turn tasks linearly controllable, and improving accuracy by 1%-4% on benchmarks such as TerminalBench.

Technical Principles of TACO

  • Problem background: In multi-turn tasks, terminal Agents backfill the complete raw shell output into the context, causing low-value noise such as system logs and progress bars to expand quadratically with the number of turns, drowning out key error signals and sharply increasing token costs.
  • Three-module architecture: The framework consists of a rule discoverer, a rule refiner, and a global rule pool. The discoverer monitors the output stream and automatically generates structured compression rules for overly long and uncovered content; the refiner iteratively repairs rule boundaries based on task feedback to prevent accidental deletion of key information; the global rule pool persists validated rules for direct loading and reuse by new tasks.
  • Online operation mechanism: Each round of interaction prioritizes matching against the global rule pool for compression. When encountering uncovered long output, it triggers new rule discovery, which, after validation by the current task, is merged into the global pool. The entire process is driven by an external planning LLM, requiring no training data or model fine-tuning, allowing the compression strategy to evolve dynamically with the terminal environment.

How to Use TACO

  • Environment installation: After cloning the GitHub repository, execute pip install -e . in the project root directory to complete dependency installation. TACO is directly usable as the terminus-2 component of the Harbor framework.
  • Quick start: Run the Harbor command and specify the terminus-2 agent, passing in model information and TACO-specific parameters to start. Within the project, scripts/run_taco_example.sh provides template scripts that can be modified directly.
  • Core parameter configuration: Through --ak The prefix passes enable_compress=True to enable the compression master switch,enable_self_evo=True activate online rule evolution, and configure compress_base_url、compress_api_key and compress_model_name to point to any OpenAI-compatible planning LLM endpoint.
  • Common mode selection: the full experience requires enabling both compression and self-evolution and configuring an external LLM; if fixed rules are needed for ablation experiments, append freeze_rules=True; if using only single-task local evolution without inheriting the global rule pool, then add disable_global_evo=True。
  • Run control: use --ak max_turns=200 and other parameters to set the single-task round limit, and pass model_info to configure LiteLLM's input and output token limits via JSON, ensuring long-horizon tasks execute within controllable cost.

TACO's core advantages

  • Plug-and-play with zero training: no need to fine-tune the backbone large model or modify the Agent's underlying architecture; compression and self-evolution are enabled directly via command-line parameters.
  • Self-evolution cross-task transfer: the global rule pool lets the Agent continuously accumulate compression experience across long-horizon multi-round tasks, and new tasks directly inherit old knowledge.
  • Win-win in performance and cost: on TerminalBench, it brings 1%-4% accuracy improvement to models such as MiniMax-M2.5, DeepSeek-V3.2, and Qwen3-Coder-480B, and further improves by about 2%-3% under the same token budget.
  • Strong generalization and low consumption: on SWE-Bench Lite, CompileBench, DevEval, and CRUST-Bench, it maintains or improves the success rate while significantly reducing total token consumption.

TACO's project addresses

  • GitHub repository:https://github.com/multimodal-art-projection/TACO
  • arXiv technical paper:http://arxiv.org/abs/2604.19572

Comparison of TACO with similar competing products

Dimension TACO SWE-agent OpenHands
Context processing Self-evolving rule compression, global knowledge pool reused across tasks Retains complete raw terminal output, no intelligent compression mechanism Relies on the model's native long context or user-defined prompts
Training dependency Completely training-free, plug-and-play Training-free, but requires specific Docker environment configuration Training-free, requires a complex sandbox and runtime environment
Cross-task transfer Global rule pool supports cross-repository/cross-session knowledge accumulation Single-task session isolation, historical knowledge is not inherited Multi-task support, but no structured compression rule reuse
Token efficiency Explicitly filters redundant noise, long-horizon task cost is linearly controllable Backfilling raw output causes tokens to grow quadratically with rounds High token consumption for long-horizon tasks, prone to hitting the context limit
Open-source integration Open source, deeply integrated with the Harbor evaluation framework Open source, mature community ecosystem Open source, general-purpose Agent platform

TACO's application scenarios

  • Long-horizon software engineering Agent: suppresses log and terminal output explosions in SWE-Bench-style multi-round code debugging and compilation testing, keeping context clear.
  • Automated operations and deployment: handles large amounts of redundant system status and process information returned by the shell, improving the decision stability of DevOps Agents.
  • Code review and test analysis: Filter out irrelevant compilation warnings and test pass information, precisely retaining key errors and code differences.
  • Academic research reproduction and evaluation: As a terminus-2 plugin of the Harbor framework, used for token efficiency evaluation and long-horizon capability benchmarking of terminal agents.