打造安全高效的终端级编程智能体,实现自主开发全流程支持。
Building Effective AI Coding Agents for the Terminal: Scaffolding, Harness, Context Engineering, and Lessons Learned
- 采用双代理架构分离规划与执行,提升任务可靠性。
- 通过上下文压缩和懒加载工具发现,避免信息过载与性能下降。
- 支持跨会话记忆积累与事件驱动提醒,防止指令遗忘。
AI编程辅助正从复杂的IDE插件转向灵活的终端原生智能体。在开发者管理源码、构建和部署的终端环境中,命令行智能体能实现长周期开发任务的自主操作。本文提出OPENDEV,一个用Rust编写的开源终端编程智能体,专为这一新范式设计。高效自主辅助需严格的安全控制和高效的上下文管理,以避免上下文膨胀与推理退化。OPENDEV通过复合式AI系统架构,实现工作负载专用模型路由、双代理分离规划与执行、懒加载工具发现及自适应上下文压缩(逐步减少旧观察),有效应对挑战。此外,其自动化记忆系统可在会话间累积项目知识,并通过事件驱动提醒机制对抗指令衰减。通过明确推理阶段和优先考虑上下文效率,OPENDEV为终端优先的AI辅助提供了安全、可扩展的基础,为构建稳健的自主软件工程系统提供蓝图。
原文摘要 · Abstract (English)
The landscape of AI coding assistance is undergoing a fundamental shift from complex IDE plugins to versatile, terminal-native agents. Operating directly where developers manage source control, execute builds, and deploy environments, CLI-based agents offer unprecedented autonomy for long-horizon development tasks. In this paper, we present OPENDEV, an open-source, command-line coding agent written in Rust, engineered specifically for this new paradigm. Effective autonomous assistance requires strict safety controls and highly efficient context management to prevent context bloat and reasoning degradation. OPENDEV overcomes these challenges through a compound AI system architecture with workload-specialized model routing, a dual-agent architecture separating planning from execution, lazy tool discovery, and adaptive context compaction that progressively reduces older observations. Furthermore, it employs an automated memory system to accumulate project-specific knowledge across sessions and counteracts instruction fade-out through event-driven system reminders. By enforcing explicit reasoning phases and prioritizing context efficiency, OPENDEV provides a secure, extensible foundation for terminal-first AI assistance, offering a blueprint for robust autonomous software engineering.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。