Nalar: An agent serving framework
Marco Laju, Donghyun Son, Saurabh Agarwal, Nitin Kedia, Myungjin Lee, Jayanth Srinivasa, Aditya Akella
TL;DR
Nalar tackles the challenge of efficiently serving dynamic, stateful agentic workflows by introducing a futures-centric execution model and a two-level control plane. It preserves Python expressiveness through auto-generated stubs that convert agent/tool invocations into futures carrying dependency and context metadata, while a managed state layer decouples logical state from physical placement. A global controller periodically installs policies that local component-level controllers enforce, enabling adaptive routing, scheduling, and state placement without burdening developers. Empirically, Nalar achieves significant tail-latency reductions (34–74%), up to 2.9x end-to-end speedups, and scalability to 130K futures with sub-500 ms control overhead across three workloads. The design offers practical, policy-driven control for heterogeneous, evolving agentic applications, with strong implications for performance and resource efficiency in real-world deployments.
Abstract
LLM-driven agentic applications increasingly automate complex, multi-step tasks, but serving them efficiently remains challenging due to heterogeneous components, dynamic and model-driven control flow, long-running state, and unpredictable latencies. Nalar is a ground-up agent-serving framework that cleanly separates workflow specification from execution while providing the runtime visibility and control needed for robust performance. Nalar preserves full Python expressiveness, using lightweight auto-generated stubs that turn agent and tool invocations into futures carrying dependency and context metadata. A managed state layer decouples logical state from physical placement, enabling safe reuse, migration, and consistent retry behavior. A two-level control architecture combines global policy computation with local event-driven enforcement to support adaptive routing, scheduling, and resource management across evolving workflows. Together, these mechanisms allow Nalar to deliver scalable, efficient, and policy-driven serving of heterogeneous agentic applications without burdening developers with orchestration logic. Across three agentic workloads, Nalar cuts tail latency by 34--74\%, achieves up to $2.9\times$ speedups, sustains 80 RPS where baselines fail, and scales to 130K futures with sub-500 ms control overhead.
