跳到正文
Vercel Blog(vercel.com)· Felix Arntz·· 1 天前精選AI 評分72

fx 介面卡將 Harness 執行環境搬至主機

The fx adapter now runs the harness on the host

AI 導讀

fx 介面卡現在在主機上執行 HarnessAgent,將模型請求與應用程式共處於同一程序。

  • 核心改動:fx 介面卡在主機上執行 HarnessAgent,模型請求與應用程式共處於同一程序。
推薦理由

此更新讓開發者可在同一程序中執行模型請求,簡化部署與安全管理,並支援更豐富的互動功能,如工具過濾與結構化輸出。

正文 · 原文

The fx adapter for the AI SDK’s HarnessAgent now runs the harness and model requests in the same process as your application. Built-in filesystem and shell operations remain isolated in the sandbox.

The adapter uses libfx, the TypeScript library for fx. It no longer needs to install fx inside the sandbox, run a sandbox bridge, or expose a sandbox port. Model credentials stay on the host rather than being forwarded into the sandbox.

The rewrite also adds:

  • Built-in tool filtering: choose which built-in tools the agent can use

  • Mid-turn steering: send new instructions while a turn is running

  • Structured output: generate responses that match a schema

  • Image tool results: return images to the model through toModelOutput()

Sessions can be saved and resumed in a new host process.

Update @ai-sdk/harness-fx to the latest version to use the new adapter. Learn more in the fx harness documentation.

來源: Vercel Blog (vercel.com)
開啟原文