Skip to content

armgit / E2B

Public Imported from GitHub
0

Open-source, secure environment with real-world tools for enterprise-grade agents.

Fix playground close call

Tomas Valentada388cc857d4
diff --git a/api-service/agent/basic_agent.py b/api-service/agent/basic_agent.py
index 16610b4ea..bd37c805d 100644
--- a/api-service/agent/basic_agent.py
+++ b/api-service/agent/basic_agent.py
@@ -164,7 +164,6 @@ class BasicAgent(AgentBase):
playground = NodeJSPlayground(get_envs=self.get_envs)
await playground.open()
-
tools = list(create_tools(playground=playground))
self.tool_names = [tool.name for tool in tools]
tool_map = {tool.name: tool for tool in tools}
@@ -288,7 +287,7 @@ class BasicAgent(AgentBase):
raise
finally:
if playground is not None:
- playground.close()
+ await playground.close()
await self.on_interaction_request(
AgentInteractionRequest(
interaction_id=str(uuid.uuid4()),