Vercel AI SDK 7 adds HarnessAgent for coding-agent harnesses
Vercel's changelog says AI SDK 7 adds `HarnessAgent`, an experimental canary API for running Claude Code, Codex and Pi through sandboxed sessions and SDK-compatible streams.
By Ryan Merket · Published
Why it matters
Harness support makes Vercel's AI SDK less about model calls alone and more about controlling agent execution, isolation and streaming inside apps.

Vercel Developers (@vercel_dev) said Friday that Vercel's AI SDK now supports agent harnesses for Claude Code, Codex and the Pi harness, with sandboxed sessions and SDK-compatible streams, in a post on X. Vercel detailed the release in a changelog post, saying AI SDK 7 introduces HarnessAgent, an experimental canary API meant to give developers one programming model for running established coding-agent harnesses.
https://x.com/vercel_dev/status/2065509970775519569
The move pushes the AI SDK beyond model calls and response handling into the part of the stack where agents actually execute work. Instead of wiring an application directly to each agent's tool interface, session lifecycle and streaming behavior, developers can create a HarnessAgent and select the harness behind it. Vercel's sample creates one with claudeCode as the harness and a Vercel sandbox configured with Node 24 and port 4000, indicating a design centered on isolated agent sessions rather than direct execution inside the host app.
Vercel said developers can swap claudeCode for codex or pi while keeping the same HarnessAgent flow. That abstraction is the core of the release: coding agents are increasingly differentiated by their harnesses, permissions and runtime assumptions, while application developers still need predictable streams, UI state and deployment patterns. By putting those harnesses behind an AI SDK interface, Vercel is trying to make agent execution look more like the rest of its AI app tooling.
The changelog frames the API as covering skills, sandboxes, sessions, permission flows, compaction, runtime configuration, sub-agents and streamed agent output. Those are the details that matter for production agent software: where the agent runs, what it is allowed to do, how long context is managed, how intermediate work is surfaced and how the application keeps control over the experience.
Vercel said HarnessAgent.generate() and HarnessAgent.stream() return AI SDK-compatible results. For teams already using useChat or related AI SDK tooling, the practical pitch is that a coding-agent session can be connected to an existing interface without rewriting the UI layer around a new response format. The company is also keeping the release deliberately provisional: the feature is available on the AI SDK canary release, and the harness packages are experimental and may have breaking changes as the API is refined.
The release is another sign that the developer-agent market is shifting from demos of autonomous coding toward the infrastructure required to run those agents inside real products. Vercel is not presenting HarnessAgent as a finished stable API. It is positioning the AI SDK as a control plane for multiple agent harnesses, with sandboxing and streaming treated as first-class requirements rather than add-ons.