Skip to content

add fail and wait actions#2

Merged
radneoncrown merged 1 commit into
f/iframe-scrollfrom
fail-wait-actions
Aug 2, 2025
Merged

add fail and wait actions#2
radneoncrown merged 1 commit into
f/iframe-scrollfrom
fail-wait-actions

Conversation

@radneoncrown

Copy link
Copy Markdown
Collaborator

Adding actions for agent to

  1. fail if not seeing a viable path to execute instructions

  2. wait if it suspects a page needs more time to load before actions are available

@radneoncrown

Copy link
Copy Markdown
Collaborator Author

@ambarc could use review here

@ambarc ambarc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one ask, else lgtm.


@self.registry.action('Wait for specified duration', param_model=WaitAction)
async def wait(params: WaitAction, browser: BrowserContext):
import asyncio

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'd import this up top; worth noting that misuse of asyncio is probably why we're slowing down with multiple agents at the moment. ask - move import to top of file, keep this line saved in mind in case we see odd hangs with wait.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helps to test wait a bunch before merging because of its sleep cmd.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

performed test on wait, confirming the agent can wait a specified amount of time and keep its own count

@radneoncrown radneoncrown merged commit d17d826 into f/iframe-scroll Aug 2, 2025
@radneoncrown radneoncrown deleted the fail-wait-actions branch August 5, 2025 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants