Menu

Use ACP-compatible harnesses with the AI SDK harness layer - Vercel
📰

Use ACP-compatible harnesses with the AI SDK harness layer - Vercel

Vercel News·Felix Arntz·5 days ago
#O9PWsFsD
#vercel#harness#codex#adapter#agent
Reading 0:00
15s threshold

The AI SDK harness layer now supports any Agent Client Protocol (ACP)-compatible harness with HarnessAgent through the new @ai-sdk/harness-acp package.

Previously, every harness adapter wrapped one specific runtime (Claude Code, Codex, Pi, Deep Agents, OpenCode). @ai-sdk/harness-acp wraps the protocol instead. It is a meta adapter: rather than adapting a single harness, it lets you build an adapter for any harness that ships an ACP-compatible package.

Implement a harness by passing that package to createACP and configure basic harness mapping.

import { createACP } from '@ai-sdk/harness-acp' ;

export function createCodexACP ( ) {

return createACP ( {

harnessId : 'codex-acp' ,

source : {

type : 'npm-simple' ,

packageName : '@agentclientprotocol/codex-acp' ,

} ,

executable : 'codex-acp' ,

forwardEnv : [ 'CODEX_API_KEY' , 'OPENAI_API_KEY' ] ,

permissionModeMapping : {

'allow-reads' : null ,

'allow-edits' : null ,

'allow-all' : { type : 'session-mode' , modeId : 'agent-full-access' } ,

}…

Continue reading — create a free account

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