Integrate wuying-agentbay-sdk with crewAI #288
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add AgentBay SDK Integration for Cloud Code Execution
Summary
This PR adds a new CrewAI example that integrates with the
wuying-agentbay-sdkto enable cloud-based code execution and full development workflows. The integration demonstrates how CrewAI agents can orchestrate complex tasks in secure cloud environments, from simple code execution to complete project development pipelines.This integration demonstrates:
Features
Core Capabilities
Two Execution Modes
Simple Code Execution (
AgentBayTemporaryCodeCrew)Full Development Pipeline (
AgentBayCodeCrew)Architecture
Key Components
crew.py: Defines two crew classes with specialized agents and tasksapi/: Session management wrappersagentbay_temporary_session.py: Temporary session operationsagentbay_persistent_session.py: Persistent session operationstools/: CrewAI tools for agent useagentbay_tools.py: AgentBay SDK integration toolslocal_tools.py: Local filesystem and HTTP verification toolstool_schemas.py: Pydantic schemas for input validationconfig/: YAML configuration for agents and taskstests/: Comprehensive test suiteAgent Roles
Usage
Quick Start
Install dependencies:
Configure environment variables:
Run examples:
Example: Simple Code Execution
Example: Full Development Pipeline
Testing
The project includes comprehensive tests:
Test Coverage
Configuration
Required Environment Variables
AGENTBAY_API_KEY: AgentBay cloud execution API keyOPENAI_API_KEY: LLM API key (OpenAI/Bailian/Azure compatible)Optional Environment Variables
OPENAI_API_BASE: Custom LLM endpoint (e.g., for Alibaba Cloud Bailian)OPENAI_MODEL_NAME: LLM model name (default:gpt-4o-mini)See
.env.examplefor detailed configuration examples for different LLM providers.Technical Highlights
Files Added
Dependencies
crewai>=0.152.0wuying-agentbay-sdk>=0.3.0python-dotenv>=1.0.0requests>=2.31.0pytest>=7.0.0Compatibility
>=3.10,<3.14>=0.152.0Documentation
Checklist
src/layout)Notes for Reviewers
src/layout for proper Python packagingpython3or viapytest