You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using version 0.98.0 of CrewAI (the current version as I write this), and I noticed an issue when creating an agent with code execution enabled in unsafe mode. The agent unnecessarily tries to check for Docker, even though Docker isn’t required unless it’s explicitly going to be used.
This way, the validation for Docker would only occur when safe mode is explicitly enabled, aligning with the intended logic.
Steps to Reproduce
Create an agent using the following configuration:
Set allow_code_execution=True.
Set code_execution_mode="unsafe".
Ensure Docker is not installed or not running on your system.
Run the code to instantiate the agent
The agent attempts to validate Docker installation via _validate_docker_installation(), even though Docker is not required when code_execution_mode="unsafe".
This results in an error if Docker is not running:
python
Copiar código
RuntimeError: Docker is not running. Please start Docker to use code execution with agent: Analista de datos
Expected behavior
Docker validation (_validate_docker_installation) should only occur when code_execution_mode="safe".
When code_execution_mode="unsafe", Docker validation should not be triggered, allowing the agent to run without issues.
The code should execute successfully in unsafe mode, even if Docker is not installed or running.
Description
Hi!
I’m using version 0.98.0 of CrewAI (the current version as I write this), and I noticed an issue when creating an agent with code execution enabled in unsafe mode. The agent unnecessarily tries to check for Docker, even though Docker isn’t required unless it’s explicitly going to be used.
For example:
I get the following error:
This behavior doesn’t make sense because the validation for Docker is happening even when it’s unnecessary.
The problem is caused by this part of agent.py:
It would make more sense if it were written as:
This way, the validation for Docker would only occur when safe mode is explicitly enabled, aligning with the intended logic.
Steps to Reproduce
The agent attempts to validate Docker installation via _validate_docker_installation(), even though Docker is not required when code_execution_mode="unsafe".
This results in an error if Docker is not running:
python
Copiar código
RuntimeError: Docker is not running. Please start Docker to use code execution with agent: Analista de datos
Expected behavior
Screenshots/Code snippets
See general context
Operating System
Windows 11
Python Version
3.10
crewAI Version
0.98.0
crewAI Tools Version
0.32.1
Virtual Environment
Venv
Evidence
Possible Solution
It would make more sense if it were written as:
Additional context
NA
The text was updated successfully, but these errors were encountered: