Menu

Program Claude Code, Codex, Pi and other agent harnesses with AI SDK - Vercel
📰

Program Claude Code, Codex, Pi and other agent harnesses with AI SDK - Vercel

Vercel News·Malte Ubl·5 days ago
#iDvQAQs1
#vercel#harness#agent#harnessagent#code
Reading 0:00
15s threshold

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.

Write the agent once. Use the best harness available.

Today. In 3 months. A year from now.

Harnesses manage the components above a model call, including skills, sandboxes, sessions, permission flows, compaction, runtime configuration, and sub-agents. The AI SDK normalizes access to those capabilities through a unified harness abstraction.

Initial harness adapters for this experimental release include Claude Code, Codex, and Pi, with more coming soon.

import { HarnessAgent } from '@ai-sdk/harness/agent' ;

import { claudeCode } from '@ai-sdk/harness-claude-code' ;

import { createVercelSandbox } from '@ai-sdk/sandbox-vercel' ;

const agent = new HarnessAgent ( {

harness : claudeCode ,

sandbox : createVercelSandbox ( {

runtime : 'node24' ,

ports : [ 4000 ] ,

} )…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.