Skip to content

πŸ™Œ OpenHands: AI-Driven Development

chore: remove deprecated RuntimeTool (#3443)

Xingyao Wanga2ea17909d1d
diff --git a/agenthub/browsing_agent/browsing_agent.py b/agenthub/browsing_agent/browsing_agent.py
index 1395bff3a1..83566d8b3d 100644
--- a/agenthub/browsing_agent/browsing_agent.py
+++ b/agenthub/browsing_agent/browsing_agent.py
@@ -22,7 +22,6 @@ from opendevin.llm.llm import LLM
from opendevin.runtime.plugins import (
PluginRequirement,
)
-from opendevin.runtime.tools import RuntimeTool
USE_NAV = (
os.environ.get('USE_NAV', 'true') == 'true'
@@ -94,7 +93,6 @@ class BrowsingAgent(Agent):
"""
sandbox_plugins: list[PluginRequirement] = []
- runtime_tools: list[RuntimeTool] = [RuntimeTool.BROWSER]
response_parser = BrowsingResponseParser()
def __init__(
diff --git a/agenthub/codeact_agent/codeact_agent.py b/agenthub/codeact_agent/codeact_agent.py
index 13b40d0184..3bc79d2f31 100644
--- a/agenthub/codeact_agent/codeact_agent.py
+++ b/agenthub/codeact_agent/codeact_agent.py
@@ -32,7 +32,6 @@ from opendevin.runtime.plugins import (
JupyterRequirement,
PluginRequirement,
)
-from opendevin.runtime.tools import RuntimeTool
ENABLE_GITHUB = True
@@ -94,7 +93,6 @@ class CodeActAgent(Agent):
AgentSkillsRequirement(),
JupyterRequirement(),
]
- runtime_tools: list[RuntimeTool] = [RuntimeTool.BROWSER]
system_message: str = get_system_message()
in_context_example: str = f"Here is an example of how you can interact with the environment for task solving:\n{get_in_context_example()}\n\nNOW, LET'S START!"
diff --git a/agenthub/codeact_swe_agent/codeact_swe_agent.py b/agenthub/codeact_swe_agent/codeact_swe_agent.py
index 57d30f6df0..d8d20de9fe 100644
--- a/agenthub/codeact_swe_agent/codeact_swe_agent.py
+++ b/agenthub/codeact_swe_agent/codeact_swe_agent.py
@@ -29,7 +29,6 @@ from opendevin.runtime.plugins import (
JupyterRequirement,
PluginRequirement,
)
-from opendevin.runtime.tools import RuntimeTool
def get_system_message() -> str:
@@ -57,7 +56,6 @@ class CodeActSWEAgent(Agent):
AgentSkillsRequirement(),
JupyterRequirement(),
]
- runtime_tools: list[RuntimeTool] = []
system_message: str = get_system_message()
in_context_example: str = f"Here is an example of how you can interact with the environment for task solving:\n{get_in_context_example()}\n\nNOW, LET'S START!"
diff --git a/agenthub/planner_agent/agent.py b/agenthub/planner_agent/agent.py
index 6b3dcab6c5..7a67e71667 100644
--- a/agenthub/planner_agent/agent.py
+++ b/agenthub/planner_agent/agent.py
@@ -5,7 +5,6 @@ from opendevin.core.config import AgentConfig
from opendevin.core.message import ImageContent, Message, TextContent
from opendevin.events.action import Action, AgentFinishAction
from opendevin.llm.llm import LLM
-from opendevin.runtime.tools import RuntimeTool
from .prompt import get_prompt_and_images
@@ -16,7 +15,6 @@ class PlannerAgent(Agent):
The planner agent utilizes a special prompting strategy to create long term plans for solving problems.
The agent is given its previous action-observation pairs, current task, and hint based on last action taken at every step.
"""
- runtime_tools: list[RuntimeTool] = [RuntimeTool.BROWSER]
response_parser = PlannerResponseParser()
def __init__(self, llm: LLM, config: AgentConfig):
diff --git a/opendevin/controller/agent.py b/opendevin/controller/agent.py
index ade4e61056..184cc4e529 100644
--- a/opendevin/controller/agent.py
+++ b/opendevin/controller/agent.py
@@ -11,7 +11,6 @@ from opendevin.core.exceptions import (
)
from opendevin.llm.llm import LLM
from opendevin.runtime.plugins import PluginRequirement
-from opendevin.runtime.tools import RuntimeTool
class Agent(ABC):
@@ -25,7 +24,6 @@ class Agent(ABC):
_registry: dict[str, Type['Agent']] = {}
sandbox_plugins: list[PluginRequirement] = []
- runtime_tools: list[RuntimeTool] = []
def __init__(
self,
diff --git a/opendevin/runtime/tools.py b/opendevin/runtime/tools.py
deleted file mode 100644
index f665eca943..0000000000
--- a/opendevin/runtime/tools.py
+++ /dev/null
@@ -1,5 +0,0 @@
-from enum import Enum
-
-
-class RuntimeTool(Enum):
- BROWSER = 'browser'