Skip to content

feat(crewai): add Stagehand code-mode integration - #94

Draft
shrey150 wants to merge 3 commits into
shrey/stg-2765-mastra-codemodefrom
shrey/stg-2765-crewai-codemode
Draft

feat(crewai): add Stagehand code-mode integration#94
shrey150 wants to merge 3 commits into
shrey/stg-2765-mastra-codemodefrom
shrey/stg-2765-crewai-codemode

Conversation

@shrey150

@shrey150 shrey150 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a CrewAI agent that launches the local Stagehand code-mode MCP over stdio
  • keep the MCP server attached for the complete Agent.kickoff lifecycle
  • load the shared Stagehand V4 syntax guide into the agent backstory
  • add a real MCPServerStdio discovery smoke and an isolated CrewAI CI job

Stack

This PR is stacked on the Mastra integration. Its diff contains only the CrewAI integration.

Lifecycle

CrewAI owns one MCPServerStdio connection for the agent invocation, allowing successive code_execute calls to share browser state. CrewAI cleans up the MCP clients when execution finishes; the discovery smoke also exercises explicit cleanup.

E2E Test Matrix

Command / flow Observed output Confidence / sufficiency
Build the local code-mode package, then run the CrewAI smoke in an isolated Python 3.12 environment with the reviewed requirements CrewAI reported an MCP connection over stdio, the built server reported that it was listening, and discovery reported CrewAI MCPServerStdio discovery PASS: code_execute. Proves CrewAI's real stdio adapter can launch the reviewed local stdio server, discover exactly one tool, receive the shared syntax guide, and clean up its client. It does not make a provider-dependent model request.
Targeted Prettier checks over the CrewAI documentation and workflow Completed without formatting differences. Covers the changed Markdown and YAML surface; the executed Python smoke imports and runs every changed Python module.

@socket-security

socket-security Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​crewai-tools@​1.15.1073100100100100

View full report

@shrey150
shrey150 force-pushed the shrey/stg-2765-crewai-codemode branch from f95f3de to ed53f7b Compare August 4, 2026 22:21
@shrey150
shrey150 force-pushed the shrey/stg-2765-crewai-codemode branch from ed53f7b to 4a6e7b2 Compare August 4, 2026 22:30
@shrey150
shrey150 force-pushed the shrey/stg-2765-crewai-codemode branch from 4941726 to 970b47d Compare August 4, 2026 22:55
@shrey150
shrey150 force-pushed the shrey/stg-2765-crewai-codemode branch from 970b47d to e17219a Compare August 4, 2026 23:06
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