DEVOURED
The fx adapter now runs the harness on the host
Vercel’s AI SDK updated its fx adapter to run harness logic directly on the host, simplifying sandbox requirements by isolating filesystem and shell operations.
What: The @ai-sdk/harness-fx library now uses libfx to separate execution environments. The harness runs in the application process, while sandbox tools like shell and filesystem operations remain isolated. This update enables mid-turn steering, built-in tool filtering, structured output, and persistent session state without needing separate sandbox bridge ports.
Why it matters: Reducing infrastructure complexity for AI agents is critical for adoption; shifting logic to the host eliminates the brittle overhead of maintaining containerized sandbox connectivity for basic agentic workflows.
Takeaway: Update to the latest @ai-sdk/harness-fx to remove your sandbox bridge dependency and experiment with the new mid-turn steering capabilities.
Deep dive
- The fx harness now utilizes libfx for TypeScript-native host execution.
- Sandbox isolation is preserved strictly for shell and filesystem operations.
- Model credentials are now restricted to the host process for improved security.
- New features include mid-turn steering, tool filtering, and multi-modal output support.
- Sessions are now serializable, allowing for state preservation across process restarts.
Decoder
- HarnessAgent: A test and evaluation framework for AI agents to simulate interactions and verify behavior in controlled environments.
- Mid-turn steering: The ability to inject new instructions or feedback to an AI model while it is actively generating a sequence of thoughts or actions.
Original article
The fx adapter for the AI SDK’s HarnessAgent now uses libfx, the TypeScript library for fx. The harness and model requests run in your application’s process, while built-in filesystem and shell operations remain isolated in the sandbox.
This simplifies sandbox setup: 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 runs commands.
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.
Explore all 54 articles in today's digest
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi