为MCP启用的智能工作流优化FaaS平台
FAME: QoS-aware Async Service Orchestration for Agentic Workflows
AI总结:
本文提出FAME架构,利用FaaS平台优化MCP启用的智能工作流,实现模块化组合和状态持久化,提升效率与成本效益。
摘要:
使用由大型语言模型(LLMs)和模型上下文协议(MCP)服务器驱动的智能工作流正在迅速增长。这引入了在可扩展的云部署和状态管理中的挑战。传统的在虚拟机(VMs)上托管是资源密集型的,并且缺乏弹性。函数即服务(FaaS)平台提供模块性、自动扩展和成本效率,但本质上是无状态的。在本文中,我们提出了FAME,一种基于FaaS的架构,用于协调MCP启用的智能工作流。FAME将智能工作流模式(如ReAct)分解为可组合的代理:规划器、执行者和评估者,这些代理各自是一个使用LangGraph构建的FaaS函数,并作为FaaS工作流进行协调。这使模块化组合成为可能,如AWS步骤函数,并避免了单体智能工作流中出现的功能超时问题。为了在对话中跨用户请求保持上下文持久性,FAME通过DynamoDB自动化代理内存的持久性和注入。它还通过AWS Lambda包装器优化MCP服务器的部署,将工具输出缓存到S3,并提出函数融合策略。我们评估了FAME在两个代表性应用(研究论文摘要和日志分析)上,在多种内存和缓存配置下的表现。结果表明,延迟减少了多达13倍,输入令牌减少了88%,成本节省了66%,同时工作流完成率提高。这证明了无服务器平台在大规模处理复杂多代理AI工作流中的可行性。
英文摘要:
Agentic workflows built on Large Language Models (LLMs) increasingly rely on external tools, with Model Context Protocol (MCP) services emerging as a common interface for tool discovery and invocation. These workflows are stateful, bursty and can block for minutes to hours while external tools execute. Always-on virtual machines and managed agent runtimes simplify deployment, but can over-provision capacity, bill idle wait time or encounter execution limits for long-running tool calls. We present FAME, a service-oriented middleware that optimizes MCP-enabled agentic workflows through modular service orchestration, explicit state management, MCP service input/output reduction and timeout-safe async invocation for long-running external services. FAME realizes these composite services using FaaS-based agent roles, persists workflow state through agent memory injection, and reduces MCP service overhead using S3 handle passing and tool-output caching. For long-running external MCP tools, FAME checkpoints agent and orchestrator state, suspends execution and resumes from callbacks without billing idle waits. Across 26 short-running service tasks over 10 MCP servers, FAME improves service-level QoS by reducing infrastructure cost by 8-12x relative to virtual machines and 43-106x relative to managed runtimes, while reducing latency by up to 17x, input tokens by up to 88% and total cost by up to 66%. On two long-running MLZero workloads from MLE-Bench, FAME completes all iterations while synchronous AWS Step Functions time out, and is 3.64-4.24x cheaper than AWS Durable Functions at the agent level and 2.67-8.23x cheaper at the orchestrator level.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。