Skip to content

Automate browser based workflows with AI

add get_aio_task interface to get a specific aio task from the async operation pool (#191)

Shuchang Zheng72d109854df6
diff --git a/skyvern/forge/async_operations.py b/skyvern/forge/async_operations.py
index 8f30098f0..8b91aa70f 100644
--- a/skyvern/forge/async_operations.py
+++ b/skyvern/forge/async_operations.py
@@ -93,6 +93,9 @@ class AsyncOperationPool:
"""
return [aio_task for aio_task in self._aio_tasks.get(task_id, {}).values() if not aio_task.done()]
+ def get_aio_task(self, task_id: str, operation_type: str) -> asyncio.Task | None:
+ return self._aio_tasks.get(task_id, {}).get(operation_type, None)
+
def run_operation(self, task_id: str, agent_phase: AgentPhase) -> None:
# get the operation from the pool
operation = self._get_operation(task_id, agent_phase)
diff --git a/skyvern/forge/prompts/skyvern/extract-action.j2 b/skyvern/forge/prompts/skyvern/extract-action.j2
index 2195241bd..eb967ba07 100644
--- a/skyvern/forge/prompts/skyvern/extract-action.j2
+++ b/skyvern/forge/prompts/skyvern/extract-action.j2
@@ -6,10 +6,6 @@ Each element is tagged with an ID.
If you see any information in red in the page screenshot, this means a condition wasn't satisfied. prioritize actions with the red information.
If you see a popup in the page screenshot, prioritize actions on the popup.
-{% if "lever" in starting_url %}
-DO NOT UPDATE ANY LOCATION FIELDS
-{% endif %}
-
Reply in JSON format with the following keys:
{
"actions": array // An array of actions. Here's the format of each action: