翻篇收录说明
翻篇网页快照

AI SDK Harnesses | AI SDK

https://ai-sdk.dev/providers/ai-sdk-harnesses

最近抓取:2026-12-04 03:41:12(北京时间)

最近内容变化:2026-12-04 03:41:12(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

Learn how to use AI SDK harness adapters.

正文摘录

MenuAI SDK HarnessesCopy for LLMView MarkdownAsk AI about this pageAI SDK harness adapters connect HarnessAgent to established agent runtimes. They are separate from model providers, but they expose AI SDK-compatible stream and response primitives. Claude CodeUse Claude Code through the AI SDK harness abstraction.ClineUse the Cline SDK through the AI SDK harness abstraction.CodexUse Codex through the AI SDK harness abstraction.CursorUse Cursor through the AI SDK harness abstraction.fxUse fx through the AI SDK harness abstraction.GitHub CopilotUse GitHub Copilot through the AI SDK harness abstraction.Grok BuildUse Grok Build through the AI SDK harness abstraction.OpenCodeUse OpenCode through the AI SDK harness abstraction.PiUse Pi through the AI SDK harness abstraction.Agent Client ProtocolUse any ACP compatible harness through the AI SDK harness abstraction. Usage All harness adapters are used with 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(); } Read the Harnesses documentation for sessions, tools, UI, and terminal usage.PreviousSubQNextClaude Code