mirror of
https://github.com/browser-use/browser-use
synced 2026-05-06 17:52:15 +02:00
26 lines
479 B
Python
26 lines
479 B
Python
import asyncio
|
|
import os
|
|
|
|
from dotenv import load_dotenv
|
|
|
|
# test if traceloop is installed
|
|
try:
|
|
from traceloop.sdk import Traceloop # type: ignore
|
|
except ImportError:
|
|
print('Traceloop is not installed')
|
|
exit(1)
|
|
|
|
from browser_use import Agent
|
|
|
|
load_dotenv()
|
|
api_key = os.getenv('TRACELOOP_API_KEY')
|
|
Traceloop.init(api_key=api_key, disable_batch=True)
|
|
|
|
|
|
async def main():
|
|
await Agent('Find the founders of browser-use').run()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
asyncio.run(main())
|