The AI SDK HarnessAgent layer now accepts image inputs across every harness adapter.
Pass images alongside text in the standard AI SDK message format: a content array mixing { type: 'text' } and { type: 'file' } parts.
Image input is processed by the harnesses' underlying vision models and supported across all available adapters: Claude Code, Cline, Codex, Cursor, Deep Agents, fx, GitHub Copilot, Grok Build, OpenCode, Pi.
import { HarnessAgent } from '@ai-sdk/harness/agent' ;
import { codex } from '@ai-sdk/harness-codex' ;
import { createVercelNetworkSandboxSession } from '@ai-sdk/sandbox-vercel' ;
import { readFileSync } from 'node:fs' ;
const agent = new HarnessAgent ( { harness : codex } ) ;
const sandboxSession = await createVercelNetworkSandboxSession ( {
runtime : 'node24' ,
ports : [ 4000 ] ,
template : await agent . getSandboxTemplate ( ) ,
} ) ;
const session = await agent . createSession ( { sandboxSession } ) ;
const result = await agent .…