Skip to main content

HarnessAgent now supports image inputs for all harness adapters

By Steven Van ·

Developers can mix text and image file parts in one message, and all ten harness adapters, from Claude Code to Pi, process them with their vision models.

The AI SDK HarnessAgent layer now accepts image inputs across every harness adapter, so Vercel's agent harnesses can take images alongside text. The change is described in the HarnessAgent documentation.

How to pass an image

Images use the standard AI SDK message format. The latest user message carries a content array that mixes a { type: 'text' } part with a { type: 'file' } part. On the file part, set mediaType to the image's MIME type (for example image/png) and pass the image bytes as data.

The example in the release note creates a Codex-based HarnessAgent and a Vercel network sandbox session. It then calls agent.generate() with a text prompt ("Describe the image in one sentence.") and a PNG read from disk with readFileSync.

Supported adapters

Image input is processed by the harnesses' underlying vision models. It is supported across all available adapters:

  • Claude Code
  • Cline
  • Codex
  • Cursor
  • Deep Agents
  • fx
  • GitHub Copilot
  • Grok Build
  • OpenCode
  • Pi

The documentation also points to an adapter capability table for image input support.

Vercel
Vercel
The platform for frontend developers — deploy, preview, and scale web apps and AI agents with zero config.
View Vercel →
Sources

Original source

Read HarnessAgent now supports image inputs for all harness adapters on Creators Toolbox