-
Notifications
You must be signed in to change notification settings - Fork 3.2k
improvement(browseruse): add profile id param #2903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile SummaryThis PR adds profile ID support to Browser Use, allowing persistent browser sessions across multiple task executions. When a Key changes:
Issues identified:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant Block as Browser Use Block
participant Tool as runTaskTool
participant Session as BrowserUse Sessions API
participant Tasks as BrowserUse Tasks API
User->>Block: Provide task + profile_id (optional)
Block->>Tool: directExecution(params)
alt profile_id provided
Tool->>Session: POST /v2/sessions {profileId}
Session-->>Tool: {id: sessionId}
Note over Tool: Session created for profile
end
Tool->>Tool: buildRequestBody(params, sessionId)
Tool->>Tasks: POST /v2/tasks {task, sessionId?, secrets}
Tasks-->>Tool: {id: taskId}
loop Poll until complete (max 3 min)
Tool->>Tasks: GET /v2/tasks/{taskId}
Tasks-->>Tool: {status, output, steps}
alt status in [finished, failed, stopped]
Note over Tool: Exit polling loop
end
end
alt sessionId exists
Tool->>Session: PATCH /v2/sessions/{sessionId} {action: stop}
Session-->>Tool: Session stopped
end
Tool-->>Block: {success, output, steps, error?}
Block-->>User: Task result
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3 files reviewed, 3 comments
Summary
Add way to pass in profile id to browser use run task. Must stop session manually after it succeeds.
Type of Change
Testing
Tested manually
Checklist