@@ -23,6 +23,12 @@ export const BrowserUseBlock: BlockConfig<BrowserUseResponse> = {
2323 placeholder : 'Describe what the browser agent should do...' ,
2424 required : true ,
2525 } ,
26+ {
27+ id : 'startUrl' ,
28+ title : 'Start URL' ,
29+ type : 'short-input' ,
30+ placeholder : 'https://example.com (optional starting URL)' ,
31+ } ,
2632 {
2733 id : 'variables' ,
2834 title : 'Variables (Secrets)' ,
@@ -51,22 +57,85 @@ export const BrowserUseBlock: BlockConfig<BrowserUseResponse> = {
5157 { label : 'Claude 3.7 Sonnet' , id : 'claude-3-7-sonnet-20250219' } ,
5258 { label : 'Claude Sonnet 4' , id : 'claude-sonnet-4-20250514' } ,
5359 { label : 'Claude Sonnet 4.5' , id : 'claude-sonnet-4-5-20250929' } ,
60+ { label : 'Claude Sonnet 4.6' , id : 'claude-sonnet-4-6' } ,
5461 { label : 'Claude Opus 4.5' , id : 'claude-opus-4-5-20251101' } ,
5562 { label : 'Llama 4 Maverick' , id : 'llama-4-maverick-17b-128e-instruct' } ,
5663 ] ,
5764 } ,
58- {
59- id : 'save_browser_data' ,
60- title : 'Save Browser Data' ,
61- type : 'switch' ,
62- placeholder : 'Save browser data' ,
63- } ,
6465 {
6566 id : 'profile_id' ,
6667 title : 'Profile ID' ,
6768 type : 'short-input' ,
6869 placeholder : 'Enter browser profile ID (optional)' ,
6970 } ,
71+ {
72+ id : 'maxSteps' ,
73+ title : 'Max Steps' ,
74+ type : 'short-input' ,
75+ placeholder : '100' ,
76+ mode : 'advanced' ,
77+ } ,
78+ {
79+ id : 'allowedDomains' ,
80+ title : 'Allowed Domains' ,
81+ type : 'short-input' ,
82+ placeholder : 'example.com, docs.example.com' ,
83+ mode : 'advanced' ,
84+ } ,
85+ {
86+ id : 'vision' ,
87+ title : 'Vision' ,
88+ type : 'dropdown' ,
89+ options : [
90+ { label : 'Auto (default)' , id : 'auto' } ,
91+ { label : 'Enabled' , id : 'true' } ,
92+ { label : 'Disabled' , id : 'false' } ,
93+ ] ,
94+ mode : 'advanced' ,
95+ } ,
96+ {
97+ id : 'flashMode' ,
98+ title : 'Flash Mode' ,
99+ type : 'switch' ,
100+ placeholder : 'Faster but less careful navigation' ,
101+ mode : 'advanced' ,
102+ } ,
103+ {
104+ id : 'thinking' ,
105+ title : 'Thinking' ,
106+ type : 'switch' ,
107+ placeholder : 'Enable extended reasoning' ,
108+ mode : 'advanced' ,
109+ } ,
110+ {
111+ id : 'highlightElements' ,
112+ title : 'Highlight Elements' ,
113+ type : 'switch' ,
114+ placeholder : 'Visually mark interactive elements' ,
115+ mode : 'advanced' ,
116+ } ,
117+ {
118+ id : 'systemPromptExtension' ,
119+ title : 'System Prompt Extension' ,
120+ type : 'long-input' ,
121+ placeholder : 'Append custom instructions to the agent system prompt (max 2000 chars)' ,
122+ mode : 'advanced' ,
123+ } ,
124+ {
125+ id : 'structuredOutput' ,
126+ title : 'Structured Output Schema' ,
127+ type : 'code' ,
128+ language : 'json' ,
129+ placeholder : 'Stringified JSON schema for structured output' ,
130+ mode : 'advanced' ,
131+ } ,
132+ {
133+ id : 'metadata' ,
134+ title : 'Metadata' ,
135+ type : 'table' ,
136+ columns : [ 'Key' , 'Value' ] ,
137+ mode : 'advanced' ,
138+ } ,
70139 {
71140 id : 'apiKey' ,
72141 title : 'API Key' ,
@@ -78,19 +147,63 @@ export const BrowserUseBlock: BlockConfig<BrowserUseResponse> = {
78147 ] ,
79148 tools : {
80149 access : [ 'browser_use_run_task' ] ,
150+ config : {
151+ tool : ( ) => 'browser_use_run_task' ,
152+ params : ( params ) => {
153+ const next : Record < string , any > = { ...params }
154+ if ( typeof next . maxSteps === 'string' && next . maxSteps . trim ( ) !== '' ) {
155+ const n = Number ( next . maxSteps )
156+ next . maxSteps = Number . isFinite ( n ) ? n : undefined
157+ }
158+ if ( next . vision === 'true' ) next . vision = true
159+ else if ( next . vision === 'false' ) next . vision = false
160+ if ( next . metadata && Array . isArray ( next . metadata ) ) {
161+ const obj : Record < string , string > = { }
162+ for ( const row of next . metadata as Array < Record < string , any > > ) {
163+ const key = row ?. cells ?. Key ?? row ?. Key
164+ const value = row ?. cells ?. Value ?? row ?. Value
165+ if ( key ) obj [ key ] = String ( value ?? '' )
166+ }
167+ next . metadata = obj
168+ }
169+ return next
170+ } ,
171+ } ,
81172 } ,
82173 inputs : {
83174 task : { type : 'string' , description : 'Browser automation task' } ,
175+ startUrl : { type : 'string' , description : 'Starting URL for the agent' } ,
84176 apiKey : { type : 'string' , description : 'BrowserUse API key' } ,
85- variables : { type : 'json' , description : 'Task variables' } ,
86- model : { type : 'string' , description : 'AI model to use' } ,
87- save_browser_data : { type : 'boolean' , description : 'Save browser data' } ,
177+ variables : { type : 'json' , description : 'Secrets to inject into the task' } ,
178+ model : { type : 'string' , description : 'LLM model to use' } ,
88179 profile_id : { type : 'string' , description : 'Browser profile ID for persistent sessions' } ,
180+ maxSteps : { type : 'number' , description : 'Maximum agent steps' } ,
181+ allowedDomains : { type : 'string' , description : 'Comma-separated allowed domains' } ,
182+ vision : { type : 'string' , description : 'Vision capability (auto / true / false)' } ,
183+ flashMode : { type : 'boolean' , description : 'Enable flash mode' } ,
184+ thinking : { type : 'boolean' , description : 'Enable extended reasoning' } ,
185+ highlightElements : { type : 'boolean' , description : 'Highlight interactive elements' } ,
186+ systemPromptExtension : { type : 'string' , description : 'Custom system prompt extension' } ,
187+ structuredOutput : { type : 'string' , description : 'Stringified JSON schema' } ,
188+ metadata : { type : 'json' , description : 'Custom key-value metadata' } ,
89189 } ,
90190 outputs : {
91191 id : { type : 'string' , description : 'Task execution identifier' } ,
92192 success : { type : 'boolean' , description : 'Task completion status' } ,
93- output : { type : 'json' , description : 'Task output data' } ,
94- steps : { type : 'json' , description : 'Execution steps taken' } ,
193+ output : { type : 'json' , description : 'Final task output (string or structured)' } ,
194+ steps : {
195+ type : 'json' ,
196+ description :
197+ 'Steps the agent executed (number, memory, evaluationPreviousGoal, nextGoal, url, screenshotUrl, actions, duration)' ,
198+ } ,
199+ liveUrl : {
200+ type : 'string' ,
201+ description : 'Embeddable live browser session URL (active during execution)' ,
202+ } ,
203+ shareUrl : {
204+ type : 'string' ,
205+ description : 'Public shareable URL for the session (post-run)' ,
206+ } ,
207+ sessionId : { type : 'string' , description : 'Browser Use session identifier' } ,
95208 } ,
96209}
0 commit comments