Large Language Model (LLM) agent systems have experienced rapid adoption across diverse domains, yet they suffer from critical user experience problems that limit their practical deployment. Through an empirical analysis of over 40,000 GitHub issues from six major agent frameworks (OpenClaw, AutoGen, CrewAI, LangGraph, Codex, Claude Code), we identify two fundamental resource management challenges: (1) scheduling failures leading to system unresponsiveness due to blocking, zombie processes, and rate limit cascades, and (2) context degradation causing agent "amnesia" from unbounded memory growth and poor retention policies. Drawing inspiration from decades of operating systems research, we present AgentRM, a middleware resource manager that treats agent resources analogously to OS resources. AgentRM employs a Multi-Level Feedback Queue (MLFQ) scheduler with zombie reaping and rate-limit-aware admission control, coupled with a three-tier Context Lifecycle Manager that implements adaptive compaction and hibernation mechanisms. Our evaluation demonstrates significant improvements: AgentRM-MLFQ reduces P95 latency by 86%, decreases lane waste by 96%, and increases throughput by 168% while eliminating zombie agents (0 vs. 29 baseline). AgentRM-CLM achieves 100% key information retention with 95% quality score compared to 65.1% retention and 87% quality for existing approaches, albeit with higher compaction costs (34,330 vs. 17,212 tokens).
翻译:大型语言模型(LLM)智能体系统已在多个领域得到快速应用,但其存在的关键性用户体验问题限制了实际部署。通过对六个主流智能体框架(OpenClaw、AutoGen、CrewAI、LangGraph、Codex、Claude Code)超过40,000个GitHub议题的实证分析,我们识别出两大基础性资源管理挑战:(1)因阻塞、僵尸进程与速率限制级联导致的调度失败,引发系统无响应;(2)因内存无限增长与低效保留策略引发的上下文退化,导致智能体“失忆”。借鉴数十年操作系统研究成果,我们提出AgentRM——一种将智能体资源类比于操作系统资源进行管理的中间件资源管理器。AgentRM采用具备僵尸进程回收与速率限制感知准入控制的多级反馈队列(MLFQ)调度器,并结合实现自适应压缩与休眠机制的三层上下文生命周期管理器。评估结果表明显著改进:AgentRM-MLFQ将P95延迟降低86%,车道浪费减少96%,吞吐量提升168%,同时完全消除僵尸智能体(基线为29个,本系统为0个)。AgentRM-CLM在保持95%质量评分的前提下实现100%关键信息留存,而现有方法留存率为65.1%、质量评分为87%,但本系统需承担更高的压缩成本(34,330对17,212词元)。