Skip to content

feat(harness-deepagents): implement harness adapter for Deep Agents#16261

Open
mlekhi wants to merge 18 commits into
mainfrom
harness-deepagents
Open

feat(harness-deepagents): implement harness adapter for Deep Agents#16261
mlekhi wants to merge 18 commits into
mainfrom
harness-deepagents

Conversation

@mlekhi

@mlekhi mlekhi commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Background

DeepAgents is a TS agent runtime. This is the harness adapter for DeepAgents - @ai-sdk/harness-deepagents. Runs the deepagents package through a Node bridge in the sandbox.

  • Built-in tools: read, write, edit, bash, grep, glob, ls, task, write_todos
  • Host tools work
  • Skills work
  • Auth: Anthropic, OpenAI, Gateway
  • Multi-turn, attach, resume
  • Built-in tool approvals (approve/reject) via DeepAgents interruptOn

Manual Verification

Ran the examples for real (model + sandbox):

  • examples/ai-functions/src/harness-agent/deepagents/* — all worked
  • Approvals: approve → tool runs; reject → tool doesn't run, returns "Rejected by user."
  • TUI + Next apps: all variants worked
  • 45 unit tests pass

Checklist

  • All commits are signed
  • Tests added
  • Docs added
  • Changeset added
  • Self-reviewed

@mlekhi mlekhi marked this pull request as ready for review June 19, 2026 02:26
Comment thread packages/harness-deepagents/src/deepagents-harness.ts
@mlekhi mlekhi changed the title Harness deepagents feat(harness-deepagents): implement harness adapter for Deep Agents Jun 19, 2026

@felixarntz felixarntz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mlekhi this works great based on initial testing! the main thing to look into further is proper skills setup, and then some minor fixes around tools. also worth checking whether we can support tool approvals at least for custom tools (like e.g. for Codex).

Comment thread packages/harness-deepagents/package.json Outdated
Comment thread packages/harness-deepagents/src/bridge/package.json Outdated
Comment thread packages/harness-deepagents/src/bridge/index.ts Outdated
Comment on lines +7 to +10
"@langchain/anthropic": "^1.0.0",
"@langchain/core": "^1.1.44",
"@langchain/langgraph": "^1.3.0",
"@langchain/openai": "^1.0.0",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what are the @langchain/anthropic and @langchain/openai dependencies used for?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are the langchain provider packages, createDeepAgent loads them based on the model id. theyre not bundled by deepagents or langchain so without them it just errors at runtime. anthropic is the default, openai only kicks in for openai models. we can drop the openai one if we wanna stay anthropic-only for now.

Comment thread packages/harness-deepagents/src/deepagents-harness.ts
Comment thread packages/harness-deepagents/src/deepagents-harness.ts Outdated
Comment thread packages/harness-deepagents/src/bridge/index.ts
Comment thread examples/ai-functions/src/harness-agent/deepagents/generate-text.ts
Comment thread examples/harness-e2e-next/agent/harness/deepagents/basic-agent.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants