Skip to content

Instantly share code, notes, and snippets.

@oxedom
Last active February 24, 2026 12:34
Show Gist options
  • Select an option

  • Save oxedom/a70339716b13b8fadf838de2b53f840f to your computer and use it in GitHub Desktop.

Select an option

Save oxedom/a70339716b13b8fadf838de2b53f840f to your computer and use it in GitHub Desktop.
import os
import asyncio
# Set API key before importing browser_use
os.environ["BROWSER_USE_API_KEY"] = "MY-API_KEY"
from browser_use import Agent, Browser, ChatBrowserUse
async def main():
browser = Browser()
agent = Agent(
task="Please go to https://www.openu.ac.il/ which is my Hebrew university website. log in for me and then navigate to my grades page to show me my math grades? My username is MYUSERNAME, and my password is 123456 followed by my ID number which is 987654321.",
llm=ChatBrowserUse(),
browser=browser,
)
await agent.run()
if __name__ == "__main__":
asyncio.run(main())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment