@ai-sdk/harness-deepagents 0.0.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ # @ai-sdk/harness-deepagents
2
+
3
+ ## 1.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 9a37622: feat(harness-deepagents): add Deep Agents harness adapter
8
+
9
+ ### Patch Changes
10
+
11
+ - @ai-sdk/harness@1.0.1
package/LICENSE ADDED
@@ -0,0 +1,13 @@
1
+ Copyright 2023 Vercel, Inc.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # @ai-sdk/harness-deepagents
2
+
3
+ A [HarnessV1](../harness) adapter that runs [Deep Agents](https://github.com/langchain-ai/deepagentsjs)
4
+ (LangChain's LangGraph-based agent harness) as a coding-agent runtime inside an
5
+ AI SDK sandbox.
6
+
7
+ This is a **bridge-backed** harness: the Deep Agents runtime runs inside the
8
+ sandbox via a Node bridge (`node bridge.mjs`) built on the shared
9
+ `@ai-sdk/harness/bridge` runtime, while the host adapter drives turns over a
10
+ WebSocket.
11
+
12
+ > **Status: happy-path validated.** The host adapter (`doStart` + session:
13
+ > `doPromptTurn`/`doStop`/`doDestroy`) and the Node bridge (driving the
14
+ > `deepagents` npm package via `createDeepAgent` + `streamEvents`) are validated
15
+ > end-to-end against a live Vercel Sandbox: text generation, streaming,
16
+ > multi-turn memory, and host-executed tools all work. Turn continuation,
17
+ > suspend/detach, cross-process resume, and built-in tool approvals throw
18
+ > `HarnessCapabilityUnsupportedError` and are follow-ups.
19
+
20
+ ## Setup
21
+
22
+ ```bash
23
+ pnpm add @ai-sdk/harness-deepagents @ai-sdk/harness
24
+ ```
25
+
26
+ The harness installs the
27
+ bridge's Node dependencies (the `deepagents` package and LangChain) into its
28
+ bootstrap directory via `pnpm` at startup.
29
+
30
+ ## Usage
31
+
32
+ ```ts
33
+ import { HarnessAgent } from '@ai-sdk/harness/agent';
34
+ import { deepAgents } from '@ai-sdk/harness-deepagents';
35
+
36
+ const agent = new HarnessAgent({
37
+ harness: deepAgents,
38
+ // ...sandbox provider configuration
39
+ });
40
+ ```
41
+
42
+ Configure the model and auth via `createDeepAgents({ model, auth })`.
43
+
44
+ ## Auth
45
+
46
+ Auth is optional and provider-aware: the provider is resolved from the model id
47
+ (`anthropic/…` or `openai/…`, defaulting to Anthropic). With none configured the
48
+ adapter falls back to ambient AI Gateway credentials (`AI_GATEWAY_API_KEY`, then
49
+ `VERCEL_OIDC_TOKEN`), then ambient provider creds (`ANTHROPIC_*` / `OPENAI_*`).
50
+ Pin explicitly with `auth.anthropic`, `auth.openai`, or `auth.gateway`:
51
+
52
+ ```ts
53
+ createDeepAgents({
54
+ model: 'openai/gpt-5',
55
+ auth: { openai: { apiKey: process.env.OPENAI_API_KEY } },
56
+ });
57
+ ```
58
+
59
+ ## Built-in tools
60
+
61
+ | Common name | Native (LangGraph) tool |
62
+ | ----------- | ----------------------- |
63
+ | `read` | `read_file` |
64
+ | `write` | `write_file` |
65
+ | `bash` | `shell` |
66
+ | `grep` | `search` |
67
+
68
+ See the [harness docs](https://ai-sdk.dev/docs) for broader concepts.