AI SDK Harnesses

AI SDK Harnesses

AI SDK harness 어댑터는 HarnessAgent 를 검증된 에이전트 런타임에 연결해요. 이들은 모델 프로바이더와는 별개지만, AI SDK 호환 스트림 및 응답 프리미티브를 노출해요.

<IndexCards cards={[ { title: 'Claude Code', description: 'Use Claude Code through the AI SDK harness abstraction.', href: '/providers/ai-sdk-harnesses/claude-code', }, { title: 'Cline', description: 'Use the Cline SDK through the AI SDK harness abstraction.', href: '/providers/ai-sdk-harnesses/cline', }, { title: 'Codex', description: 'Use Codex through the AI SDK harness abstraction.', href: '/providers/ai-sdk-harnesses/codex', }, { title: 'Cursor', description: 'Use Cursor through the AI SDK harness abstraction.', href: '/providers/ai-sdk-harnesses/cursor', }, { title: 'fx', description: 'Use fx through the AI SDK harness abstraction.', href: '/providers/ai-sdk-harnesses/fx', }, { title: 'GitHub Copilot', description: 'Use GitHub Copilot through the AI SDK harness abstraction.', href: '/providers/ai-sdk-harnesses/github-copilot', }, { title: 'Grok Build', description: 'Use Grok Build through the AI SDK harness abstraction.', href: '/providers/ai-sdk-harnesses/grok-build', }, { title: 'OpenCode', description: 'Use OpenCode through the AI SDK harness abstraction.', href: '/providers/ai-sdk-harnesses/opencode', }, { title: 'Pi', description: 'Use Pi through the AI SDK harness abstraction.', href: '/providers/ai-sdk-harnesses/pi', }, { title: 'Agent Client Protocol', description: 'Use any ACP compatible harness through the AI SDK harness abstraction.', href: '/providers/ai-sdk-harnesses/acp', }, ]} />

출처: 문서

본문

사용법 (Usage)

모든 harness 어댑터는 HarnessAgent 와 함께 사용돼요:

import { HarnessAgent } from '@ai-sdk/harness/agent';
import { codex } from '@ai-sdk/harness-codex';
import { createVercelNetworkSandboxSession } from '@ai-sdk/sandbox-vercel';

const agent = new HarnessAgent({
  harness: codex,
  model: 'gpt-5.6-luna',
});

const sandboxSession = await createVercelNetworkSandboxSession({
  runtime: 'node24',
  ports: [4000],
  template: await agent.getSandboxTemplate(),
});
const session = await agent.createSession({ sandboxSession });
try {
  console.log(
    (await agent.generate({ session, prompt: 'Inspect this project.' })).text,
  );
} finally {
  await session.destroy();
  await sandboxSession.destroy();
}

세션, tools, UI, 터미널 사용법은 Harnesses 문서를 읽어보세요.

더 알아보기 (Learn more)

전체 사이트맵