The fx adapter for the AI SDK's HarnessAgent now runs the harness and model requests on the host, while filesystem and shell operations stay isolated in the sandbox. The fx adapter now uses libfx, the TypeScript library for fx. This simplifies sandbox setup, so you no longer need to install fx inside the sandbox, run a sandbox bridge, or expose a sandbox port. Model credentials stay on the host, outside the environment where the agent executes commands. The update also adds built-in tool filtering, mid-turn steering, structured output, and image tool results via toModelOutput(). Sessions can now be saved and resumed in a new host process. Update @ai-sdk/harness-fx to get the new adapter.

•1m read time•From vercel.com
Post cover image

Questions this post answers

what changed in the ai-sdk fx harness adapter architecture

The fx harness adapter now runs the harness and model requests on the host application process instead of inside the sandbox, using libfx, the TypeScript library for fx. Filesystem and shell operations stay isolated in the sandbox. This removes the need to install fx inside the sandbox, run a sandbox bridge, or expose a sandbox port, and keeps model credentials on the host. Developers wiring up agent sandboxes can track AI SDK infrastructure changes like this on daily.dev.

how do I update to the new ai-sdk fx harness adapter

Update the @ai-sdk/harness-fx package to its latest version to get the new host-based adapter. The rewrite also adds built-in tool filtering, mid-turn steering, structured output support, and image tool results returned through toModelOutput(), plus the ability to save and resume sessions in a new host process. Anyone upgrading agent harness dependencies can follow releases like this on daily.dev.

Share this post