Skip to content

feat(integrations): add Deep Agents examples - #2653

Open
miguelg719 wants to merge 7 commits into
v4-spikefrom
feat/deepagents-integration
Open

feat(integrations): add Deep Agents examples#2653
miguelg719 wants to merge 7 commits into
v4-spikefrom
feat/deepagents-integration

Conversation

@miguelg719

@miguelg719 miguelg719 commented Aug 9, 2026

Copy link
Copy Markdown
Collaborator

Adds local and managed LangChain Deep Agents examples using the Stagehand Python SDK with run, snapshot, and screenshot tools.

Tests:

  • uv run ruff check examples/managed/tools/stagehand.py
  • uv run pytest
  • uv run --project examples/managed mda build examples/managed

Summary by cubic

Adds local and managed Deep Agents integrations that expose a persistent Stagehand browser with run, snapshot, and screenshot tools. Ships a new stagehand-deepagents MCP server with examples, tests, and a schema fix for broader MCP client compatibility.

  • New Features

    • New stagehand-deepagents Python package with stagehand-deepagents-mcp stdio server exposing run, snapshot, and screenshot.
    • Local examples using langchain-mcp-adapters; managed example uses Browserbase with bundled Stagehand extension assets and defaults the viewport to 1280x720.
    • Tests cover tool listing and server initialization; stabilize CLI dry-run timeouts to 15s. Lint: ignore bundled extension assets in oxlint.
  • Bug Fixes

    • Removed top-level oneOf from run tool input schema to support AI-SDK MCP clients (Eve, Vercel AI SDK). Exclusivity between code and actions is enforced at runtime.

Written for commit 794a78b. Summary will update on new commits.

Review in cubic

@changeset-bot

changeset-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 794a78b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

This PR has 61,816 reviewable changed lines after ignored/generated files are excluded, above cubic's default 50,000-changed-line automatic review limit. The raw diff is 65,117 lines before ignored/generated files are excluded.

Most of the diff comes from:

  • packages/integrations/deepagents/examples/managed/tools/_assets/stagehand_extension/service-worker.js (~58,999 changed lines)
  • packages/integrations/deepagents/examples/managed/tools/_assets/stagehand_extension/content-script.js (~1,155 changed lines)
  • packages/integrations/deepagents/examples/managed/tools/stagehand.py (~394 changed lines)
  • packages/integrations/deepagents/src/stagehand_deepagents/runtime.py (~309 changed lines)
  • packages/integrations/deepagents/src/stagehand_deepagents/server.py (~281 changed lines)

Comment @cubic-dev-ai review this to review it anyway. If the largest files are generated or fixture data, add them to your ignored files in review settings or ignorePatterns in cubic.yaml - cubic will then review the rest automatically. You can also raise this limit in review settings.

@socket-security

socket-security Bot commented Aug 9, 2026

Copy link
Copy Markdown

@socket-security

socket-security Bot commented Aug 9, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: pypi orjson is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: packages/integrations/deepagents/examples/local/uv.lockpypi/langchain@1.3.14pypi/langchain-mcp-adapters@0.3.2pypi/deepagents@0.7.5pypi/langchain-openai@1.4.2pypi/orjson@3.11.9

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore pypi/orjson@3.11.9. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: pypi pycparser is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: packages/integrations/deepagents/examples/local/uv.lockpypi/deepagents@0.7.5pypi/pycparser@3.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore pypi/pycparser@3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: pypi pycparser is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: packages/integrations/deepagents/examples/local/uv.lockpypi/deepagents@0.7.5pypi/pycparser@3.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore pypi/pycparser@3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Mirrors the TS facade contract change: AI-SDK-based MCP clients (Eve,
Vercel AI SDK) reject tool input schemas with a top-level oneOf. The
code/actions exclusivity stays in the tool description and is enforced
at runtime by the existing exactly-one-of check in runtime.py.
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.

1 participant