
AI SDK 7 is now in public beta. Vercel's TypeScript toolkit for building AI-powered apps has been the de facto standard for shipping AI features on Next.js for a while now, but version 7 is a meaningful architectural shift, not just a feature bump. The headline addition is HarnessAgent, a new abstraction that lets you plug full coding agent runtimes like Claude Code, Codex, and Pi directly into your app through a unified API.
The problem with agent runtimes today
Provider lock-in, ad-hoc streaming protocols, hand-rolled tool-call shapes, and custom agent loops are maintenance liabilities that the AI SDK has been quietly solving over its lifetime. But until now, that story only covered language model calls. Coding agent runtimes like Claude Code and Codex are a different beast entirely: they own their own session state, sandboxed workspaces, permission flows, and built-in tooling. Integrating them meant writing bespoke glue code for each one.
AI SDK 7 fixes that with a new layer of abstraction sitting above the model provider layer.
HarnessAgent: one API for all coding runtimes
AI SDK 7 introduces HarnessAgent, a single API for running established agent harnesses, including Claude Code, Codex, and Pi.
AI SDK has always let you switch models without rewriting your agent. Now you can switch the harness the same way.
A harness (the term used throughout the docs) is a complete agent runtime, not just a model. It owns capabilities that are larger than a model call: workspace access, built-in coding tools, native session state, compaction, permission flows, and runtime-specific configuration. All AI SDK agent harnesses operate in a sandbox, keeping the host environment safe.
The key design decision is that harnesses are decoupled from the model provider abstraction. Providers expose models to AI SDK Core functions such as
Don't miss what's next in AI
Join 300,000+ engineers and researchers who get the signal, not the noise.
- Full access to in-depth AI research breakdowns
- Be the first to know what's trending before it hits mainstream
- Daily curated papers, repos, and industry moves

