AI SDK 7 introduces HarnessAgent, a unified API for seamlessly switching between agent harnesses like Claude Code, Codex, and Pi.
- •HarnessAgent provides a single API to run multiple established agent harnesses without rewriting code
- •Harnesses manage components above model calls, including skills, sandboxes, sessions, permission flows, and sub-agents
- •HarnessAgent.generate() and HarnessAgent.stream() return AI SDK-compatible results for easy integration with existing UI tooling
- •Agents run in sandboxed workspaces to keep the host environment safe
- •Available on AI SDK canary release with experimental status and potential breaking changes between releases
This summary was automatically generated by AI based on the original article and may not be fully accurate.