AI 代理上下文容器平台 Wire 近日宣布决定从 Cloudflare Durable Objects (DO) 迁移至其自主研发的运行时架构。尽管该平台将继续使用 Cloudflare 的其他服务,但受限于 DO 存在的结构性瓶颈——包括向量索引分离导致的额外网络跳数、计算与数据存储位置不匹配、部署节点在创建时即被固定且无法购买专用容量、以及不支持自托管等限制——Wire 决定构建基于 Fly Machines 和嵌入式 SQLite 的新数据平面 [1]。
在新架构中,每个组织将在 Fly Machines 上运行一个 Bun 主机进程,容器内部包含嵌入了 sqlite-vec 的 SQLite 文件以实现进程内检索 [1]。为了解决数据持久性问题并保障稳定性,系统通过连续将 WAL(预写式日志)传输至对象存储来确保数据安全,组提交时间约为 100 毫秒 [1]。
此次迁移带来了显著的性能提升与效果优化。在热工具调用方面,延迟稳定在约 0.3 秒,消除了此前存在的超过 2 秒的尖峰现象;而在空闲容器唤醒场景下,新架构将耗时从原栈重组所需的 3.7 秒缩短至 1.4 秒 [1]。此外,检索效果也得到大幅改善,召回率从原来的 78.1% 提升至 89.1%,这一进步主要得益于架构优化及更换了更新的嵌入模型 [1]。
目前,该新运行时正处于 Beta 测试阶段,Wire 计划在未来开源此容器运行时 [1]。
Wire, an AI agent context container platform, has announced its decision to migrate from Cloudflare Durable Objects to a self-developed runtime while continuing to utilize other services provided by the company [1]. The migration was driven by four structural limitations inherent in the previous architecture: vector indexes were located externally causing network hops, compute could not reside adjacent to data, deployment locations were fixed at creation time preventing dedicated capacity purchases, and the service did not support self-hosting [1].
To address these issues, Wire constructed a new data plane based on Fly Machines with embedded SQLite. In this architecture, each organization runs a Bun host process on a Fly Machine within a container that includes an SQLite file embedding sqlite-vec to enable in-process retrieval [1]. This setup ensures compute is located directly next to the data and allows for flexible deployment configurations [1].
The new system has already demonstrated significant performance improvements. Latency for hot tool calls stabilized at approximately 0.3 seconds, down from roughly 0.4 seconds with spikes exceeding two seconds in the previous environment; idle container wake-up time improved to 1.4 seconds compared to a stack reassembly duration of 3.7 seconds previously [1]. Additionally, retrieval recall rates increased from 78.1% to 89.1%, attributed primarily to architectural optimizations and the adoption of newer embedding models [1].
Data persistence is maintained by continuously transmitting Write-Ahead Log (WAL) entries to object storage, with group commit times averaging around 100 milliseconds [1]. The new runtime currently operates in a Beta stage, though Wire plans to open-source the container runtime in the future [1].