Skip to main content
Source: harness-chat
The AI SDK harness example. Devin edits files, runs commands and calls your server-side tools in an isolated microVM; the chat shows each step as it streams, asks you to approve shell commands, and keeps its session so a later message — from any server instance — picks up where it left off. Side panels show the sandbox status, a file browser, and a preview of whatever Devin serves from the workspace.
Harness chat: a chat column with Devin's reasoning, edits and approved bash commands; side panels showing the Vercel Sandbox status, a preview of the built app, and its files

The console: chat with Devin's reasoning and tool calls, the sandbox, a live preview of the app it built, and its files

How it fits together

The whole agent is one declaration:
lib/agent.ts (excerpt)

Run locally

Local development uses the real Vercel Sandbox; there is no emulation, so what you see locally is what runs in production.
vercel env pull needs the Upstash integration on the project (Storage → Upstash in the Vercel dashboard). The OIDC token expires; rerun vercel env pull when sandbox calls start failing with an auth error.

Deploy

The README has a Deploy-with-Vercel button that clones the example, provisions the Upstash store and asks for DEVIN_API_KEY; Vercel Sandbox authenticates automatically on Vercel. @cognition-ai/harness-devin and @cognition-ai/sdk are pinned to the same published beta in its package.json.
This is a single-user demo: there is no login, and anyone who can reach the deployment can open any session in it. Put it behind Vercel Deployment Protection or add your own auth before sharing a URL.

AI SDK harness

What @cognition-ai/harness-devin provides and how the bridge works.

Diagnostics

The onLog events this example turns into a status line.