Repository navigation
feat(integrations): CrewAI example (MCP over stdio) - #2680
Conversation
|
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
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.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
…screenshot) with stdio MCP host Promotes the playwrightCompatRuntime and the run/snapshot/screenshot tool contract from the facade experiment into packages/integrations as product code: contract.ts carries the reference tool definitions verbatim (schemas, descriptions, error strings), tools.ts adapts StagehandFacadeTools to a live Stagehand handle with per-page snapshot state and a serialized call queue, and a new stagehand-facade stdio bin exposes the three tools over MCP with screenshots as image content blocks.
AI-SDK-based MCP clients (Eve, Vercel AI SDK) reject tool input schemas with a top-level oneOf, failing every run call client-side before it reaches the server. The code/actions exclusivity stays in the tool description and is enforced at runtime by CodeModeRunInputSchema.
Native consumers (Eve defineTool, Vercel AI SDK tools) need direct access to StagehandFacadeTools and the pinned contract, not just the stdio bin.
- widen credential redaction (Browserbase, Google, bearer tokens) - bound shutdown against an in-flight launch (5s race) - surface unsupported model names as StagehandFacadeConfigError - only forward integral jpeg quality to page.screenshot - fail waitForOutput fast when the host exits before ready
One system prompt shared by every host example instead of three hand-authored variants.
…mples packages/integrations/ becomes a grouping directory: core/ is the @browserbasehq/stagehand-integrations package, and integration examples (deepagents, eve, vercel-ai) sit beside it. Fixes eve dev's snapshot EINVAL: eve copies a workspace dependency's package root, which previously contained the eve example itself.
9010314 to
6ab64c8
Compare
…ol surface Rebased onto main post-v4-release (squashed; original review + smoke history on PR #2680).
a5453a4 to
4b2bba9
Compare
The protocol commits on this branch updated the schema without running the Python generator; CI's generate.py --check caught the drift.
The Gemini 3.6 Flash protocol change on this branch made the Go-embedded extension stale (extensionpack --check and the wheel-smoke build both fail on it). The docs sdk-reference parity test times out at its 5s default on cold PR runners (observed 5090ms) — give the multi-language surface extraction a real budget.
Skips when the example is lifted out of the monorepo.
There was a problem hiding this comment.
All reported issues were addressed across 2 files (changes from recent commits).
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
CrewAI example for the Stagehand facade tool surface, consuming it as a standard MCP server over stdio.
run/snapshot/screenshot— the shared facade contract; agent backstory is the canonical facade instructions text, pinned to the TS constant by a drift test (skips when lifted out of the repo).crewai-toolsMCPServerAdapter+ stdio, spawning the builtstagehand-facadebin with an env allowlist (STAGEHAND_*/BROWSERBASE_*only). Screenshots are saved to files (CrewAI's adapter drops MCP image blocks — documented in the README).packages/integrations/crewai/README.md(uv project, mirrors the deepagents conventions). Tests run viauv run pytestlocally and in review; they are not wired into CI (no Python job covers this path).Verified: contract + adapter + drift tests pass locally; Browserbase smoke passed (heading cited with snapshot ID, clean child shutdown).
Stacked on #2665.