browser-use-sdk 3.4.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts DELETED
@@ -1,2517 +0,0 @@
1
- import { z } from 'zod';
2
- import { H as HttpClient } from './errors-BtB79l7x.js';
3
- export { B as BrowserUseError } from './errors-BtB79l7x.js';
4
-
5
- interface components {
6
- schemas: {
7
- /**
8
- * AccountNotFoundError
9
- * @description Error response when an account is not found
10
- */
11
- AccountNotFoundError: {
12
- /**
13
- * Detail
14
- * @default Account not found
15
- */
16
- detail: string;
17
- };
18
- /**
19
- * AccountView
20
- * @description View model for account information.
21
- */
22
- AccountView: {
23
- /**
24
- * Name
25
- * @description The name of the user
26
- */
27
- name?: string | null;
28
- /**
29
- * Credits Balance USD
30
- * @description The total credits balance in USD
31
- */
32
- totalCreditsBalanceUsd: number;
33
- /**
34
- * Monthly Credits Balance USD
35
- * @description Monthly subscription credits balance in USD
36
- */
37
- monthlyCreditsBalanceUsd: number;
38
- /**
39
- * Additional Credits Balance USD
40
- * @description Additional top-up credits balance in USD
41
- */
42
- additionalCreditsBalanceUsd: number;
43
- /**
44
- * Rate Limit
45
- * @description The rate limit for the account
46
- */
47
- rateLimit: number;
48
- /**
49
- * Plan Info
50
- * @description The plan information
51
- */
52
- planInfo: components["schemas"]["PlanInfo"];
53
- /**
54
- * Project ID
55
- * Format: uuid
56
- * @description The ID of the project
57
- */
58
- projectId: string;
59
- };
60
- /**
61
- * BrowserSessionItemView
62
- * @description View model for representing a browser session in list views.
63
- */
64
- BrowserSessionItemView: {
65
- /**
66
- * ID
67
- * Format: uuid
68
- * @description Unique identifier for the session
69
- */
70
- id: string;
71
- /**
72
- * Status
73
- * @description Current status of the session (active/stopped)
74
- */
75
- status: components["schemas"]["BrowserSessionStatus"];
76
- /**
77
- * Live URL
78
- * @description URL where the browser can be viewed live in real-time
79
- */
80
- liveUrl?: string | null;
81
- /**
82
- * CDP URL
83
- * @description Chrome DevTools Protocol URL for browser automation
84
- */
85
- cdpUrl?: string | null;
86
- /**
87
- * Timeout At
88
- * Format: date-time
89
- * @description Timestamp when the session will timeout
90
- */
91
- timeoutAt: string;
92
- /**
93
- * Started At
94
- * Format: date-time
95
- * @description Timestamp when the session was created and started
96
- */
97
- startedAt: string;
98
- /**
99
- * Finished At
100
- * @description Timestamp when the session was stopped (None if still active)
101
- */
102
- finishedAt?: string | null;
103
- /**
104
- * Proxy Used MB
105
- * @description Amount of proxy data used in MB
106
- * @default 0
107
- */
108
- proxyUsedMb: string;
109
- /**
110
- * Proxy Cost
111
- * @description Cost of proxy usage in USD
112
- * @default 0
113
- */
114
- proxyCost: string;
115
- /**
116
- * Browser Cost
117
- * @description Cost of browser session hosting in USD
118
- * @default 0
119
- */
120
- browserCost: string;
121
- /**
122
- * Agent Session ID
123
- * @description ID of the agent session that created this browser (None for standalone BaaS sessions)
124
- */
125
- agentSessionId?: string | null;
126
- /**
127
- * Recording URL
128
- * @description Presigned URL to download the session recording (available after session ends, if recording was enabled)
129
- */
130
- recordingUrl?: string | null;
131
- };
132
- /**
133
- * BrowserSessionListResponse
134
- * @description Response model for paginated browser session list requests.
135
- */
136
- BrowserSessionListResponse: {
137
- /**
138
- * Items
139
- * @description List of browser session views for the current page
140
- */
141
- items: components["schemas"]["BrowserSessionItemView"][];
142
- /**
143
- * Total Items
144
- * @description Total number of items in the list
145
- */
146
- totalItems: number;
147
- /**
148
- * Page Number
149
- * @description Page number
150
- */
151
- pageNumber: number;
152
- /**
153
- * Page Size
154
- * @description Number of items per page
155
- */
156
- pageSize: number;
157
- };
158
- /**
159
- * BrowserSessionStatus
160
- * @description Enumeration of possible browser session states
161
- *
162
- * Attributes:
163
- * ACTIVE: Session is currently active and running (browser is running)
164
- * STOPPED: Session has been stopped and is no longer active (browser is stopped)
165
- * @enum {string}
166
- */
167
- BrowserSessionStatus: "active" | "stopped";
168
- /**
169
- * BrowserSessionUpdateAction
170
- * @description Available actions that can be performed on a browser session
171
- *
172
- * Attributes:
173
- * STOP: Stop the browser session (cannot be undone)
174
- * @enum {string}
175
- */
176
- BrowserSessionUpdateAction: "stop";
177
- /**
178
- * BrowserSessionView
179
- * @description View model for representing a browser session.
180
- */
181
- BrowserSessionView: {
182
- /**
183
- * ID
184
- * Format: uuid
185
- * @description Unique identifier for the session
186
- */
187
- id: string;
188
- /**
189
- * Status
190
- * @description Current status of the session (active/stopped)
191
- */
192
- status: components["schemas"]["BrowserSessionStatus"];
193
- /**
194
- * Live URL
195
- * @description URL where the browser can be viewed live in real-time
196
- */
197
- liveUrl?: string | null;
198
- /**
199
- * CDP URL
200
- * @description Chrome DevTools Protocol URL for browser automation
201
- */
202
- cdpUrl?: string | null;
203
- /**
204
- * Timeout At
205
- * Format: date-time
206
- * @description Timestamp when the session will timeout
207
- */
208
- timeoutAt: string;
209
- /**
210
- * Started At
211
- * Format: date-time
212
- * @description Timestamp when the session was created and started
213
- */
214
- startedAt: string;
215
- /**
216
- * Finished At
217
- * @description Timestamp when the session was stopped (None if still active)
218
- */
219
- finishedAt?: string | null;
220
- /**
221
- * Proxy Used MB
222
- * @description Amount of proxy data used in MB
223
- * @default 0
224
- */
225
- proxyUsedMb: string;
226
- /**
227
- * Proxy Cost
228
- * @description Cost of proxy usage in USD
229
- * @default 0
230
- */
231
- proxyCost: string;
232
- /**
233
- * Browser Cost
234
- * @description Cost of browser session hosting in USD
235
- * @default 0
236
- */
237
- browserCost: string;
238
- /**
239
- * Agent Session ID
240
- * @description ID of the agent session that created this browser (None for standalone BaaS sessions)
241
- */
242
- agentSessionId?: string | null;
243
- /**
244
- * Recording URL
245
- * @description Presigned URL to download the session recording (available after session ends, if recording was enabled)
246
- */
247
- recordingUrl?: string | null;
248
- };
249
- /**
250
- * CannotDeleteSkillWhileGeneratingError
251
- * @description Error response when a skill cannot be deleted while it is still generating
252
- */
253
- CannotDeleteSkillWhileGeneratingError: {
254
- /**
255
- * Detail
256
- * @default Cannot delete skill while it is still generating
257
- */
258
- detail: string;
259
- };
260
- /**
261
- * CannotRollbackPublicSkillError
262
- * @description Error response when trying to rollback a public skill
263
- */
264
- CannotRollbackPublicSkillError: {
265
- /**
266
- * Detail
267
- * @default Cannot rollback a public skill. Please make the skill private first.
268
- */
269
- detail: string;
270
- };
271
- /**
272
- * ConcurrentSkillCreationsError
273
- * @description Error response when concurrent skill creations are attempted
274
- */
275
- ConcurrentSkillCreationsError: {
276
- /**
277
- * Detail
278
- * @default Concurrent skill creations are not allowed. Please wait for the current skill creation to finish or cancel it.
279
- */
280
- detail: string;
281
- };
282
- /**
283
- * CreateBrowserSessionRequest
284
- * @description Request model for creating a browser session.
285
- */
286
- CreateBrowserSessionRequest: {
287
- /**
288
- * Profile ID
289
- * @description The ID of the profile to use for the session
290
- */
291
- profileId?: string | null;
292
- /**
293
- * Proxy Country Code
294
- * @description Country code for proxy location. Defaults to US. Set to null to disable proxy.
295
- * @default us
296
- */
297
- proxyCountryCode: components["schemas"]["ProxyCountryCode"] | null;
298
- /**
299
- * Timeout
300
- * @description The timeout for the session in minutes. All users can use up to 240 minutes (4 hours). Pay As You Go users are charged $0.06/hour, subscribers get 50% off.
301
- * @default 60
302
- */
303
- timeout: number;
304
- /**
305
- * Browser Screen Width
306
- * @description Custom screen width in pixels for the browser.
307
- */
308
- browserScreenWidth?: number | null;
309
- /**
310
- * Browser Screen Height
311
- * @description Custom screen height in pixels for the browser.
312
- */
313
- browserScreenHeight?: number | null;
314
- /**
315
- * Allow Resizing
316
- * @description Whether to allow the browser to be resized during the session (not recommended since it reduces stealthiness).
317
- * @default false
318
- */
319
- allowResizing: boolean;
320
- /**
321
- * Custom Proxy
322
- * @description Custom proxy settings to use for the session. If not provided, our proxies will be used. Custom proxies are only available on the Custom Enterprise plan.
323
- */
324
- customProxy?: components["schemas"]["CustomProxy"] | null;
325
- /**
326
- * Enable Recording
327
- * @description If True, enables session recording. Defaults to False.
328
- * @default false
329
- */
330
- enableRecording: boolean;
331
- };
332
- /**
333
- * CreateSessionRequest
334
- * @description Request model for creating a session.
335
- */
336
- CreateSessionRequest: {
337
- /**
338
- * Profile ID
339
- * @description The ID of the profile to use for the session
340
- */
341
- profileId?: string | null;
342
- /**
343
- * Proxy Country Code
344
- * @description Country code for proxy location. Defaults to US. Set to null to disable proxy.
345
- * @default us
346
- */
347
- proxyCountryCode: components["schemas"]["ProxyCountryCode"] | null;
348
- /**
349
- * Start URL
350
- * @description URL to navigate to when the session starts.
351
- */
352
- startUrl?: string | null;
353
- /**
354
- * Browser Screen Width
355
- * @description Custom screen width in pixels for the browser.
356
- */
357
- browserScreenWidth?: number | null;
358
- /**
359
- * Browser Screen Height
360
- * @description Custom screen height in pixels for the browser.
361
- */
362
- browserScreenHeight?: number | null;
363
- /**
364
- * Persist Memory
365
- * @description If True (default), tasks in this session share memory and history with each other, allowing follow-up tasks to continue from previous context. If False, each task runs as a standalone task without any previous task context.
366
- * @default true
367
- */
368
- persistMemory: boolean;
369
- /**
370
- * Keep Alive
371
- * @description If True (default), the browser session stays alive after tasks complete, allowing follow-up tasks. If False, the session is closed immediately after task completion. Set to False for simple one-off tasks to reduce session idle time.
372
- * @default true
373
- */
374
- keepAlive: boolean;
375
- /**
376
- * Custom Proxy
377
- * @description Custom proxy settings to use for the session. If not provided, our proxies will be used. Custom proxies are only available on the Custom Enterprise plan.
378
- */
379
- customProxy?: components["schemas"]["CustomProxy"] | null;
380
- /**
381
- * Enable Recording
382
- * @description If True, enables session recording. Defaults to False.
383
- * @default false
384
- */
385
- enableRecording: boolean;
386
- };
387
- /**
388
- * CreateSkillRequest
389
- * @description Request to create a new skill via automated generation.
390
- */
391
- CreateSkillRequest: {
392
- /**
393
- * Title
394
- * @description Optional title for the skill (will be generated if not provided)
395
- */
396
- title?: string | null;
397
- /**
398
- * Description
399
- * @description Optional description for the skill (will be generated if not provided)
400
- */
401
- description?: string | null;
402
- /**
403
- * Goal
404
- * @description Goal of the skill (description of what the skill does and what the user should expect from it)
405
- */
406
- goal: string;
407
- /**
408
- * Agentprompt
409
- * @description Prompt for the agent to use when generating the skill automatically
410
- */
411
- agentPrompt: string;
412
- };
413
- /**
414
- * CreateSkillResponse
415
- * @description Response after creating a skill.
416
- */
417
- CreateSkillResponse: {
418
- /**
419
- * ID
420
- * Format: uuid
421
- * @description Unique identifier for the created skill
422
- */
423
- id: string;
424
- };
425
- /**
426
- * CreateTaskRequest
427
- * @description Request model for creating a task
428
- */
429
- CreateTaskRequest: {
430
- /**
431
- * Task
432
- * @description The task prompt/instruction for the agent.
433
- */
434
- task: string;
435
- /**
436
- * LLM
437
- * @description The LLM model to use for the agent.
438
- * @default browser-use-2.0
439
- */
440
- llm: components["schemas"]["SupportedLLMs"];
441
- /**
442
- * Start URL
443
- * @description The URL to start the task from.
444
- */
445
- startUrl?: string | null;
446
- /**
447
- * Max Steps
448
- * @description Maximum number of steps the agent can take before stopping.
449
- * @default 100
450
- */
451
- maxSteps: number;
452
- /**
453
- * Structured Output
454
- * @description The stringified JSON schema for the structured output.
455
- */
456
- structuredOutput?: string | null;
457
- /**
458
- * Session ID
459
- * @description The ID of the session where the task will run.
460
- */
461
- sessionId?: string | null;
462
- /**
463
- * Metadata
464
- * @description The metadata for the task. Up to 10 key-value pairs.
465
- */
466
- metadata?: {
467
- [key: string]: string;
468
- } | null;
469
- /**
470
- * Secrets
471
- * @description The secrets for the task. Allowed domains are not required for secrets to be injected, but are recommended.
472
- */
473
- secrets?: {
474
- [key: string]: string;
475
- } | null;
476
- /**
477
- * Allowed Domains
478
- * @description The allowed domains for the task.
479
- */
480
- allowedDomains?: string[] | null;
481
- /**
482
- * 1Password Vault ID
483
- * @description The ID of the 1Password vault to use for the task. This is used to inject secrets into the task.
484
- */
485
- opVaultId?: string | null;
486
- /**
487
- * Session Settings
488
- * @description Session configuration for auto-created sessions. Only applies when session_id is not provided. Ignored when using an existing session.
489
- */
490
- sessionSettings?: components["schemas"]["SessionSettings"] | null;
491
- /**
492
- * Highlight Elements
493
- * @description Tells the agent to highlight interactive elements on the page.
494
- * @default false
495
- */
496
- highlightElements: boolean;
497
- /**
498
- * Flash Mode
499
- * @description Whether agent flash mode is enabled.
500
- * @default false
501
- */
502
- flashMode: boolean;
503
- /**
504
- * Thinking
505
- * @description Whether agent thinking mode is enabled.
506
- * @default false
507
- */
508
- thinking: boolean;
509
- /**
510
- * Vision
511
- * @description Whether agent vision capabilities are enabled. Set to 'auto' to let the agent decide based on the model capabilities.
512
- * @default true
513
- */
514
- vision: boolean | "auto";
515
- /**
516
- * System Prompt Extension
517
- * @description Optional extension to the agent system prompt.
518
- * @default
519
- */
520
- systemPromptExtension: string;
521
- /**
522
- * Judge
523
- * @description Enable judge mode to evaluate task completion against ground truth.
524
- * @default false
525
- */
526
- judge: boolean;
527
- /**
528
- * Judge Ground Truth
529
- * @description Expected answer for judge evaluation.
530
- */
531
- judgeGroundTruth?: string | null;
532
- /**
533
- * Judge LLM
534
- * @description The LLM model to use for judging. If not provided, uses the default judge LLM.
535
- */
536
- judgeLlm?: components["schemas"]["SupportedLLMs"] | null;
537
- /**
538
- * Skill IDs
539
- * @description List of skill IDs to enable for this task. Use ['*'] to enable all available skills for the project.
540
- */
541
- skillIds?: string[] | null;
542
- };
543
- /**
544
- * CustomProxy
545
- * @description Request model for creating a custom proxy.
546
- */
547
- CustomProxy: {
548
- /**
549
- * Host
550
- * @description Host of the proxy.
551
- */
552
- host: string;
553
- /**
554
- * Port
555
- * @description Port of the proxy.
556
- */
557
- port: number;
558
- /**
559
- * Username
560
- * @description Username for proxy authentication.
561
- */
562
- username?: string | null;
563
- /**
564
- * Password
565
- * @description Password for proxy authentication.
566
- */
567
- password?: string | null;
568
- };
569
- /**
570
- * DownloadUrlGenerationError
571
- * @description Error response when download URL generation fails
572
- */
573
- DownloadUrlGenerationError: {
574
- /**
575
- * Detail
576
- * @default Failed to generate download URL
577
- */
578
- detail: string;
579
- };
580
- /**
581
- * EnabledSkillsLimitExceededError
582
- * @description Error response when trying to enable more skills than allowed by plan
583
- */
584
- EnabledSkillsLimitExceededError: {
585
- /**
586
- * Detail
587
- * @default Enabled skills limit exceeded for your plan
588
- */
589
- detail: string;
590
- };
591
- /**
592
- * ExecuteSkillRequest
593
- * @description Request to execute a skill.
594
- */
595
- ExecuteSkillRequest: {
596
- /**
597
- * Parameters
598
- * @description Parameters to pass to the skill handler
599
- */
600
- parameters?: {
601
- [key: string]: unknown;
602
- };
603
- /**
604
- * Sessionid
605
- * @description Optional session ID (UUID) for IP persistence.
606
- */
607
- sessionId?: string | null;
608
- };
609
- /**
610
- * ExecuteSkillResponse
611
- * @description Response from executing a skill.
612
- */
613
- ExecuteSkillResponse: {
614
- /**
615
- * Success
616
- * @description Whether the skill execution was successful
617
- */
618
- success: boolean;
619
- /**
620
- * Result
621
- * @description Output of the skill execution
622
- */
623
- result?: unknown | null;
624
- /**
625
- * Error
626
- * @description Error message if the skill execution failed
627
- */
628
- error?: string | null;
629
- /**
630
- * Stderr
631
- * @description Standard error output of the skill execution
632
- */
633
- stderr?: string | null;
634
- /**
635
- * Latency in ms
636
- * @description Latency of the skill execution in milliseconds
637
- */
638
- latencyMs?: number | null;
639
- };
640
- /**
641
- * FileView
642
- * @description View model for representing an output file generated by the agent
643
- */
644
- FileView: {
645
- /**
646
- * ID
647
- * Format: uuid
648
- * @description Unique identifier for the output file
649
- */
650
- id: string;
651
- /**
652
- * File Name
653
- * @description Name of the output file
654
- */
655
- fileName: string;
656
- };
657
- /**
658
- * GenerationNotCancellableError
659
- * @description Error response when generation is not cancellable
660
- */
661
- GenerationNotCancellableError: {
662
- /**
663
- * Detail
664
- * @default Generation is not cancellable
665
- */
666
- detail: string;
667
- };
668
- /** HTTPValidationError */
669
- HTTPValidationError: {
670
- /** Detail */
671
- detail?: components["schemas"]["ValidationError"][];
672
- };
673
- /**
674
- * InsufficientCreditsError
675
- * @description Error response when there are insufficient credits
676
- */
677
- InsufficientCreditsError: {
678
- /**
679
- * Detail
680
- * @default Insufficient credits
681
- */
682
- detail: string;
683
- };
684
- /**
685
- * InternalServerError
686
- * @description Error response for internal server errors
687
- */
688
- InternalServerError: {
689
- /**
690
- * Detail
691
- * @default An internal server error occurred
692
- */
693
- detail: string;
694
- };
695
- /**
696
- * MarketplaceSkillListResponse
697
- * @description Response for listing skills.
698
- */
699
- MarketplaceSkillListResponse: {
700
- /**
701
- * Items
702
- * @description List of skills
703
- */
704
- items: components["schemas"]["MarketplaceSkillResponse"][];
705
- /**
706
- * Total Items
707
- * @description Total number of items in the list
708
- */
709
- totalItems: number;
710
- /**
711
- * Page Number
712
- * @description Page number
713
- */
714
- pageNumber: number;
715
- /**
716
- * Page Size
717
- * @description Number of items per page
718
- */
719
- pageSize: number;
720
- };
721
- /**
722
- * MarketplaceSkillResponse
723
- * @description Skill information returned by the API.
724
- */
725
- MarketplaceSkillResponse: {
726
- /**
727
- * ID
728
- * Format: uuid
729
- * @description Unique identifier for the skill
730
- */
731
- id: string;
732
- /**
733
- * Slug
734
- * @description URL-friendly slug for the skill
735
- */
736
- slug: string;
737
- /**
738
- * Title
739
- * @description Title of the skill (shows up in the public view)
740
- */
741
- title: string;
742
- /**
743
- * Description
744
- * @description Description of the skill (shows up in the public view)
745
- */
746
- description: string;
747
- /**
748
- * Categories
749
- * @description Categories of the skill
750
- */
751
- categories: components["schemas"]["SkillCategory"][];
752
- /**
753
- * Domains
754
- * @description Domains/websites this skill interacts with
755
- */
756
- domains: string[];
757
- /**
758
- * Parameters
759
- * @description Input parameters of the skill
760
- */
761
- parameters: components["schemas"]["ParameterSchema"][];
762
- /**
763
- * Output Schema
764
- * @description Output schema of the skill
765
- */
766
- outputSchema: {
767
- [key: string]: unknown;
768
- };
769
- /**
770
- * Current Version
771
- * @description Current version of the skill
772
- */
773
- currentVersion: number | null;
774
- /**
775
- * Is Official
776
- * @description Whether the skill is official (verified by Browser Use)
777
- */
778
- isOfficial: boolean;
779
- /**
780
- * Clone Count
781
- * @description Number of times this skill has been cloned
782
- */
783
- cloneCount: number;
784
- /**
785
- * Icon URL
786
- * @description URL of the custom skill icon
787
- */
788
- iconUrl?: string | null;
789
- /**
790
- * First Published At
791
- * Format: date-time
792
- * @description When the skill was first published
793
- */
794
- firstPublishedAt: string;
795
- /**
796
- * Last Published At
797
- * Format: date-time
798
- * @description When the skill was last published
799
- */
800
- lastPublishedAt: string;
801
- /**
802
- * Created At
803
- * Format: date-time
804
- * @description Creation timestamp
805
- */
806
- createdAt: string;
807
- /**
808
- * Updated At
809
- * Format: date-time
810
- * @description Last update timestamp
811
- */
812
- updatedAt: string;
813
- };
814
- /**
815
- * OutputFileNotFoundError
816
- * @description Error response when an output file is not found
817
- */
818
- OutputFileNotFoundError: {
819
- /**
820
- * Detail
821
- * @default Output file not found
822
- */
823
- detail: string;
824
- };
825
- /**
826
- * ParameterSchema
827
- * @description Schema for a skill parameter.
828
- */
829
- ParameterSchema: {
830
- /** Name */
831
- name: string;
832
- type: components["schemas"]["ParameterType"];
833
- /**
834
- * Required
835
- * @default true
836
- */
837
- required: boolean;
838
- /** Description */
839
- description?: string | null;
840
- /** Default */
841
- default?: unknown | null;
842
- /** Cookiedomain */
843
- cookieDomain?: string | null;
844
- };
845
- /**
846
- * ParameterType
847
- * @description Type of a skill parameter.
848
- * @enum {string}
849
- */
850
- ParameterType: "string" | "number" | "boolean" | "object" | "array" | "cookie";
851
- /**
852
- * PlanInfo
853
- * @description View model for plan information
854
- */
855
- PlanInfo: {
856
- /**
857
- * Plan Name
858
- * @description The name of the plan
859
- */
860
- planName: string;
861
- /**
862
- * Subscription Status
863
- * @description The status of the subscription
864
- */
865
- subscriptionStatus: string | null;
866
- /**
867
- * Subscription ID
868
- * @description The ID of the subscription
869
- */
870
- subscriptionId: string | null;
871
- /**
872
- * Subscription Current Period End
873
- * @description The end of the current period
874
- */
875
- subscriptionCurrentPeriodEnd: string | null;
876
- /**
877
- * Subscription Canceled At
878
- * @description The date the subscription was canceled
879
- */
880
- subscriptionCanceledAt: string | null;
881
- };
882
- /**
883
- * ProfileCreateRequest
884
- * @description Request model for creating a new profile.
885
- */
886
- ProfileCreateRequest: {
887
- /**
888
- * Name
889
- * @description Optional name for the profile
890
- */
891
- name?: string | null;
892
- /**
893
- * User ID
894
- * @description Your internal user identifier for this profile. Use this to associate a profile with a user in your system.
895
- */
896
- userId?: string | null;
897
- };
898
- /**
899
- * ProfileListResponse
900
- * @description Response model for paginated profile list requests.
901
- */
902
- ProfileListResponse: {
903
- /**
904
- * Items
905
- * @description List of profile views for the current page
906
- */
907
- items: components["schemas"]["ProfileView"][];
908
- /**
909
- * Total Items
910
- * @description Total number of items in the list
911
- */
912
- totalItems: number;
913
- /**
914
- * Page Number
915
- * @description Page number
916
- */
917
- pageNumber: number;
918
- /**
919
- * Page Size
920
- * @description Number of items per page
921
- */
922
- pageSize: number;
923
- };
924
- /**
925
- * ProfileNotFoundError
926
- * @description Error response when a profile is not found
927
- */
928
- ProfileNotFoundError: {
929
- /**
930
- * Detail
931
- * @default Profile not found
932
- */
933
- detail: string;
934
- };
935
- /**
936
- * ProfileUpdateRequest
937
- * @description Request model for updating a profile.
938
- */
939
- ProfileUpdateRequest: {
940
- /**
941
- * Name
942
- * @description Optional name for the profile
943
- */
944
- name?: string | null;
945
- /**
946
- * User ID
947
- * @description Your internal user identifier for this profile. Use this to associate a profile with a user in your system.
948
- */
949
- userId?: string | null;
950
- };
951
- /**
952
- * ProfileView
953
- * @description View model for representing a profile. A profile lets you preserve the login state between sessions.
954
- *
955
- * We recommend that you create a separate profile for each user of your app.
956
- * You can assign a user_id to each profile to easily identify which user the profile belongs to.
957
- */
958
- ProfileView: {
959
- /**
960
- * ID
961
- * Format: uuid
962
- * @description Unique identifier for the profile
963
- */
964
- id: string;
965
- /**
966
- * User ID
967
- * @description Your internal user identifier for this profile. Use this to associate a profile with a user in your system.
968
- */
969
- userId?: string | null;
970
- /**
971
- * Name
972
- * @description Optional name for the profile
973
- */
974
- name?: string | null;
975
- /**
976
- * Last Used At
977
- * @description Timestamp when the profile was last used
978
- */
979
- lastUsedAt?: string | null;
980
- /**
981
- * Created At
982
- * Format: date-time
983
- * @description Timestamp when the profile was created
984
- */
985
- createdAt: string;
986
- /**
987
- * Updated At
988
- * Format: date-time
989
- * @description Timestamp when the profile was last updated
990
- */
991
- updatedAt: string;
992
- /**
993
- * Cookie Domains
994
- * @description List of domain URLs that have cookies stored for this profile
995
- */
996
- cookieDomains?: string[] | null;
997
- };
998
- /**
999
- * ProxyCountryCode
1000
- * @enum {string}
1001
- */
1002
- ProxyCountryCode: "ad" | "ae" | "af" | "ag" | "ai" | "al" | "am" | "an" | "ao" | "aq" | "ar" | "as" | "at" | "au" | "aw" | "az" | "ba" | "bb" | "bd" | "be" | "bf" | "bg" | "bh" | "bi" | "bj" | "bl" | "bm" | "bn" | "bo" | "bq" | "br" | "bs" | "bt" | "bv" | "bw" | "by" | "bz" | "ca" | "cc" | "cd" | "cf" | "cg" | "ch" | "ck" | "cl" | "cm" | "co" | "cr" | "cs" | "cu" | "cv" | "cw" | "cx" | "cy" | "cz" | "de" | "dj" | "dk" | "dm" | "do" | "dz" | "ec" | "ee" | "eg" | "eh" | "er" | "es" | "et" | "fi" | "fj" | "fk" | "fm" | "fo" | "fr" | "ga" | "gd" | "ge" | "gf" | "gg" | "gh" | "gi" | "gl" | "gm" | "gn" | "gp" | "gq" | "gr" | "gs" | "gt" | "gu" | "gw" | "gy" | "hk" | "hm" | "hn" | "hr" | "ht" | "hu" | "id" | "ie" | "il" | "im" | "in" | "iq" | "ir" | "is" | "it" | "je" | "jm" | "jo" | "jp" | "ke" | "kg" | "kh" | "ki" | "km" | "kn" | "kp" | "kr" | "kw" | "ky" | "kz" | "la" | "lb" | "lc" | "li" | "lk" | "lr" | "ls" | "lt" | "lu" | "lv" | "ly" | "ma" | "mc" | "md" | "me" | "mf" | "mg" | "mh" | "mk" | "ml" | "mm" | "mn" | "mo" | "mp" | "mq" | "mr" | "ms" | "mt" | "mu" | "mv" | "mw" | "mx" | "my" | "mz" | "na" | "nc" | "ne" | "nf" | "ng" | "ni" | "nl" | "no" | "np" | "nr" | "nu" | "nz" | "om" | "pa" | "pe" | "pf" | "pg" | "ph" | "pk" | "pl" | "pm" | "pn" | "pr" | "ps" | "pt" | "pw" | "py" | "qa" | "re" | "ro" | "rs" | "ru" | "rw" | "sa" | "sb" | "sc" | "sd" | "se" | "sg" | "sh" | "si" | "sj" | "sk" | "sl" | "sm" | "sn" | "so" | "sr" | "ss" | "st" | "sv" | "sx" | "sy" | "sz" | "tc" | "td" | "tf" | "tg" | "th" | "tj" | "tk" | "tl" | "tm" | "tn" | "to" | "tr" | "tt" | "tv" | "tw" | "tz" | "ua" | "ug" | "uk" | "us" | "uy" | "uz" | "va" | "vc" | "ve" | "vg" | "vi" | "vn" | "vu" | "wf" | "ws" | "xk" | "ye" | "yt" | "za" | "zm" | "zw";
1003
- /**
1004
- * RefineSkillRequest
1005
- * @description Request to refine an existing skill.
1006
- */
1007
- RefineSkillRequest: {
1008
- /**
1009
- * Feedback
1010
- * @description Feedback describing what to improve
1011
- */
1012
- feedback: string;
1013
- /**
1014
- * Testoutput
1015
- * @description Last skill test output to include in refinement context
1016
- */
1017
- testOutput?: string | null;
1018
- /**
1019
- * Testlogs
1020
- * @description Last skill test logs to include in refinement context
1021
- */
1022
- testLogs?: string | null;
1023
- };
1024
- /**
1025
- * RefineSkillResponse
1026
- * @description Response after requesting skill refinement.
1027
- */
1028
- RefineSkillResponse: {
1029
- /**
1030
- * ID
1031
- * Format: uuid
1032
- * @description Unique identifier for the skill
1033
- */
1034
- id: string;
1035
- };
1036
- /**
1037
- * SessionHasRunningTaskError
1038
- * @description Error response when session already has a running task
1039
- */
1040
- SessionHasRunningTaskError: {
1041
- /**
1042
- * Detail
1043
- * @default Agent session already has a running task. Please wait for it to finish or stop it manually.
1044
- */
1045
- detail: string;
1046
- };
1047
- /**
1048
- * SessionItemView
1049
- * @description View model for representing a (browser) session.
1050
- */
1051
- SessionItemView: {
1052
- /**
1053
- * ID
1054
- * Format: uuid
1055
- * @description Unique identifier for the session
1056
- */
1057
- id: string;
1058
- /**
1059
- * Status
1060
- * @description Current status of the session (active/stopped)
1061
- */
1062
- status: components["schemas"]["SessionStatus"];
1063
- /**
1064
- * Live URL
1065
- * @description URL where the browser can be viewed live in real-time
1066
- */
1067
- liveUrl?: string | null;
1068
- /**
1069
- * Recording URL
1070
- * @description Presigned URL to download the session recording (available after session ends, if recording was enabled)
1071
- */
1072
- recordingUrl?: string | null;
1073
- /**
1074
- * Started At
1075
- * Format: date-time
1076
- * @description Timestamp when the session was created and started
1077
- */
1078
- startedAt: string;
1079
- /**
1080
- * Finished At
1081
- * @description Timestamp when the session was stopped (None if still active)
1082
- */
1083
- finishedAt?: string | null;
1084
- /**
1085
- * Persist Memory
1086
- * @description Whether tasks in this session share memory and history with each other
1087
- */
1088
- persistMemory: boolean;
1089
- /**
1090
- * Keep Alive
1091
- * @description Whether the browser session stays alive after tasks complete
1092
- */
1093
- keepAlive: boolean;
1094
- /**
1095
- * Proxy Used MB
1096
- * @description Amount of proxy data used in MB
1097
- * @default 0
1098
- */
1099
- proxyUsedMb: string;
1100
- /**
1101
- * Proxy Cost
1102
- * @description Cost of proxy usage in USD
1103
- * @default 0
1104
- */
1105
- proxyCost: string;
1106
- };
1107
- /**
1108
- * SessionListResponse
1109
- * @description Response model for paginated session list requests.
1110
- */
1111
- SessionListResponse: {
1112
- /**
1113
- * Items
1114
- * @description List of session views for the current page
1115
- */
1116
- items: components["schemas"]["SessionItemView"][];
1117
- /**
1118
- * Total Items
1119
- * @description Total number of items in the list
1120
- */
1121
- totalItems: number;
1122
- /**
1123
- * Page Number
1124
- * @description Page number
1125
- */
1126
- pageNumber: number;
1127
- /**
1128
- * Page Size
1129
- * @description Number of items per page
1130
- */
1131
- pageSize: number;
1132
- };
1133
- /**
1134
- * SessionNotFoundError
1135
- * @description Error response when a session is not found
1136
- */
1137
- SessionNotFoundError: {
1138
- /**
1139
- * Detail
1140
- * @default Session not found
1141
- */
1142
- detail: string;
1143
- };
1144
- /**
1145
- * SessionSettings
1146
- * @description Session configuration for auto-created sessions.
1147
- * These settings only apply when no session_id is provided.
1148
- */
1149
- SessionSettings: {
1150
- /**
1151
- * Profile ID
1152
- * @description Browser profile ID for persistent browser state (cookies, local storage, etc.).
1153
- */
1154
- profileId?: string | null;
1155
- /**
1156
- * Proxy Country Code
1157
- * @description Proxy country code for geo-targeted browsing. Defaults to US. Set to null to disable proxy.
1158
- * @default us
1159
- */
1160
- proxyCountryCode: components["schemas"]["ProxyCountryCode"] | null;
1161
- /**
1162
- * Browser Screen Width
1163
- * @description Custom screen width in pixels for the browser.
1164
- */
1165
- browserScreenWidth?: number | null;
1166
- /**
1167
- * Browser Screen Height
1168
- * @description Custom screen height in pixels for the browser.
1169
- */
1170
- browserScreenHeight?: number | null;
1171
- /**
1172
- * Enable Recording
1173
- * @description If True, enables session recording. Defaults to False.
1174
- * @default false
1175
- */
1176
- enableRecording: boolean;
1177
- };
1178
- /**
1179
- * SessionStatus
1180
- * @description Enumeration of possible agent session states
1181
- *
1182
- * Attributes:
1183
- * ACTIVE: Agent session is currently active and running
1184
- * STOPPED: Agent session has been stopped and is no longer active
1185
- * @enum {string}
1186
- */
1187
- SessionStatus: "active" | "stopped";
1188
- /**
1189
- * SessionStoppedError
1190
- * @description Error response when trying to use a stopped session
1191
- */
1192
- SessionStoppedError: {
1193
- /**
1194
- * Detail
1195
- * @default Browser session is stopped. Please start a new session and try again.
1196
- */
1197
- detail: string;
1198
- };
1199
- /**
1200
- * SessionTimeoutLimitExceededError
1201
- * @description Error response when session timeout exceeds the maximum allowed limit
1202
- */
1203
- SessionTimeoutLimitExceededError: {
1204
- /**
1205
- * Detail
1206
- * @default Maximum session timeout is 4 hours (240 minutes).
1207
- */
1208
- detail: string;
1209
- };
1210
- /**
1211
- * SessionUpdateAction
1212
- * @description Available actions that can be performed on a session
1213
- *
1214
- * Attributes:
1215
- * STOP: Stop the session and all its associated tasks (cannot be undone)
1216
- * @enum {string}
1217
- */
1218
- SessionUpdateAction: "stop";
1219
- /**
1220
- * SessionView
1221
- * @description View model for representing a (browser) session with its associated tasks.
1222
- */
1223
- SessionView: {
1224
- /**
1225
- * ID
1226
- * Format: uuid
1227
- * @description Unique identifier for the session
1228
- */
1229
- id: string;
1230
- /**
1231
- * Status
1232
- * @description Current status of the session (active/stopped)
1233
- */
1234
- status: components["schemas"]["SessionStatus"];
1235
- /**
1236
- * Live URL
1237
- * @description URL where the browser can be viewed live in real-time
1238
- */
1239
- liveUrl?: string | null;
1240
- /**
1241
- * Recording URL
1242
- * @description Presigned URL to download the session recording (available after session ends, if recording was enabled)
1243
- */
1244
- recordingUrl?: string | null;
1245
- /**
1246
- * Started At
1247
- * Format: date-time
1248
- * @description Timestamp when the session was created and started
1249
- */
1250
- startedAt: string;
1251
- /**
1252
- * Finished At
1253
- * @description Timestamp when the session was stopped (None if still active)
1254
- */
1255
- finishedAt?: string | null;
1256
- /**
1257
- * Tasks
1258
- * @description List of tasks associated with this session
1259
- */
1260
- tasks: components["schemas"]["TaskItemView"][];
1261
- /**
1262
- * Public Share URL
1263
- * @description Optional URL to access the public share of the session
1264
- */
1265
- publicShareUrl?: string | null;
1266
- /**
1267
- * Persist Memory
1268
- * @description Whether tasks in this session share memory and history with each other
1269
- * @default true
1270
- */
1271
- persistMemory: boolean;
1272
- /**
1273
- * Keep Alive
1274
- * @description Whether the browser session stays alive after tasks complete
1275
- * @default true
1276
- */
1277
- keepAlive: boolean;
1278
- /**
1279
- * Proxy Used MB
1280
- * @description Amount of proxy data used in MB
1281
- * @default 0
1282
- */
1283
- proxyUsedMb: string;
1284
- /**
1285
- * Proxy Cost
1286
- * @description Cost of proxy usage in USD
1287
- * @default 0
1288
- */
1289
- proxyCost: string;
1290
- };
1291
- /**
1292
- * ShareNotFoundError
1293
- * @description Error response when a public share is not found
1294
- */
1295
- ShareNotFoundError: {
1296
- /**
1297
- * Detail
1298
- * @default Public share not found
1299
- */
1300
- detail: string;
1301
- };
1302
- /**
1303
- * ShareView
1304
- * @description View model for representing a public share of a session.
1305
- */
1306
- ShareView: {
1307
- /**
1308
- * Share Token
1309
- * @description Token to access the public share
1310
- */
1311
- shareToken: string;
1312
- /**
1313
- * Share URL
1314
- * @description URL to access the public share
1315
- */
1316
- shareUrl: string;
1317
- /**
1318
- * View Count
1319
- * @description Number of times the public share has been viewed
1320
- */
1321
- viewCount: number;
1322
- /**
1323
- * Last Viewed At
1324
- * @description Timestamp of the last time the public share was viewed (None if never viewed)
1325
- */
1326
- lastViewedAt?: string | null;
1327
- };
1328
- /**
1329
- * SkillCategory
1330
- * @description Skill category.
1331
- * @enum {string}
1332
- */
1333
- SkillCategory: "search" | "e_commerce" | "financial" | "news" | "real_estate" | "social_media" | "travel" | "marketplace" | "lead_generation" | "seo" | "jobs" | "developer" | "media" | "automation" | "integration" | "other";
1334
- /**
1335
- * SkillExecutionListResponse
1336
- * @description Response for listing skill executions.
1337
- */
1338
- SkillExecutionListResponse: {
1339
- /**
1340
- * Items
1341
- * @description List of executions
1342
- */
1343
- items: components["schemas"]["SkillExecutionView"][];
1344
- /**
1345
- * Total Items
1346
- * @description Total number of items in the list
1347
- */
1348
- totalItems: number;
1349
- /**
1350
- * Page Number
1351
- * @description Page number
1352
- */
1353
- pageNumber: number;
1354
- /**
1355
- * Page Size
1356
- * @description Number of items per page
1357
- */
1358
- pageSize: number;
1359
- };
1360
- /**
1361
- * SkillExecutionOutputResponse
1362
- * @description Response containing presigned URL for downloading execution output.
1363
- */
1364
- SkillExecutionOutputResponse: {
1365
- /**
1366
- * Downloadurl
1367
- * @description Presigned URL for downloading the execution output (valid for 5 minutes)
1368
- */
1369
- downloadUrl: string;
1370
- };
1371
- /**
1372
- * SkillExecutionView
1373
- * @description View for a skill execution.
1374
- */
1375
- SkillExecutionView: {
1376
- /**
1377
- * Id
1378
- * Format: uuid
1379
- * @description Unique identifier for the execution
1380
- */
1381
- id: string;
1382
- /**
1383
- * Skillid
1384
- * Format: uuid
1385
- * @description ID of the skill that was executed
1386
- */
1387
- skillId: string;
1388
- /**
1389
- * Status
1390
- * @description Execution status (running, completed, failed)
1391
- */
1392
- status: string;
1393
- /**
1394
- * Success
1395
- * @description Whether the execution succeeded
1396
- */
1397
- success: boolean;
1398
- /**
1399
- * Startedat
1400
- * Format: date-time
1401
- * @description When the execution started
1402
- */
1403
- startedAt: string;
1404
- /**
1405
- * Finishedat
1406
- * @description When the execution finished
1407
- */
1408
- finishedAt: string | null;
1409
- /**
1410
- * Latencyms
1411
- * @description Execution latency in milliseconds
1412
- */
1413
- latencyMs: number | null;
1414
- /**
1415
- * Hasoutput
1416
- * @description Whether output is available for download
1417
- */
1418
- hasOutput: boolean;
1419
- };
1420
- /**
1421
- * SkillListResponse
1422
- * @description Response for listing skills.
1423
- */
1424
- SkillListResponse: {
1425
- /**
1426
- * Items
1427
- * @description List of skills
1428
- */
1429
- items: components["schemas"]["SkillResponse"][];
1430
- /**
1431
- * Total Items
1432
- * @description Total number of items in the list
1433
- */
1434
- totalItems: number;
1435
- /**
1436
- * Page Number
1437
- * @description Page number
1438
- */
1439
- pageNumber: number;
1440
- /**
1441
- * Page Size
1442
- * @description Number of items per page
1443
- */
1444
- pageSize: number;
1445
- };
1446
- /**
1447
- * SkillNotFinishedError
1448
- * @description Error response when skill is not finished
1449
- */
1450
- SkillNotFinishedError: {
1451
- /**
1452
- * Detail
1453
- * @default Skill is not finished
1454
- */
1455
- detail: string;
1456
- };
1457
- /**
1458
- * SkillNotFoundError
1459
- * @description Error response when a skill is not found
1460
- */
1461
- SkillNotFoundError: {
1462
- /**
1463
- * Detail
1464
- * @default Skill not found
1465
- */
1466
- detail: string;
1467
- };
1468
- /**
1469
- * SkillResponse
1470
- * @description Skill information returned by the API.
1471
- */
1472
- SkillResponse: {
1473
- /**
1474
- * ID
1475
- * Format: uuid
1476
- * @description Unique identifier for the skill
1477
- */
1478
- id: string;
1479
- /**
1480
- * Slug
1481
- * @description URL-friendly slug for the skill
1482
- */
1483
- slug?: string | null;
1484
- /**
1485
- * Title
1486
- * @description Title of the skill (shows up in the public view)
1487
- */
1488
- title: string;
1489
- /**
1490
- * Description
1491
- * @description Description of the skill (shows up in the public view)
1492
- */
1493
- description: string;
1494
- /**
1495
- * Categories
1496
- * @description Categories of the skill
1497
- */
1498
- categories: components["schemas"]["SkillCategory"][];
1499
- /**
1500
- * Domains
1501
- * @description Domains/websites this skill interacts with
1502
- */
1503
- domains: string[];
1504
- /**
1505
- * Goal
1506
- * @description Goal of the skill (not shown in the public view)
1507
- */
1508
- goal?: string | null;
1509
- /**
1510
- * Agent Prompt
1511
- * @description Prompt for the agent to use when generating the skill automatically (not shown in the public view)
1512
- */
1513
- agentPrompt?: string | null;
1514
- /**
1515
- * Status
1516
- * @description Status of the skill
1517
- */
1518
- status: components["schemas"]["SkillsGenerationStatus"];
1519
- /**
1520
- * Parameters
1521
- * @description Input parameters of the skill
1522
- */
1523
- parameters: components["schemas"]["ParameterSchema"][];
1524
- /**
1525
- * Output Schema
1526
- * @description Output schema of the skill
1527
- */
1528
- outputSchema: {
1529
- [key: string]: unknown;
1530
- };
1531
- /**
1532
- * Enabled
1533
- * @description Whether the skill is enabled
1534
- */
1535
- isEnabled: boolean;
1536
- /**
1537
- * Is Public
1538
- * @description Whether the skill is publicly available
1539
- */
1540
- isPublic: boolean;
1541
- /**
1542
- * Icon URL
1543
- * @description URL of the custom skill icon
1544
- */
1545
- iconUrl?: string | null;
1546
- /**
1547
- * First Published At
1548
- * @description When the skill was first published
1549
- */
1550
- firstPublishedAt?: string | null;
1551
- /**
1552
- * Last Published At
1553
- * @description When the skill was last published
1554
- */
1555
- lastPublishedAt?: string | null;
1556
- /**
1557
- * Current Version
1558
- * @description Current version of the skill
1559
- */
1560
- currentVersion: number | null;
1561
- /**
1562
- * Current Version Started At
1563
- * @description When the current version started generating
1564
- */
1565
- currentVersionStartedAt?: string | null;
1566
- /**
1567
- * Current Version Finished At
1568
- * @description When the current version finished generating
1569
- */
1570
- currentVersionFinishedAt?: string | null;
1571
- /**
1572
- * Code (base64 encoded) - ENTERPRISE ONLY
1573
- * @description Base64 encoded generated code (contact support@browser-use.com to get access) - ENTERPRISE ONLY
1574
- */
1575
- code?: string | null;
1576
- /**
1577
- * Cloned From Skill ID
1578
- * @description Unique identifier for the skill this skill was cloned from
1579
- */
1580
- clonedFromSkillId?: string | null;
1581
- /**
1582
- * Created At
1583
- * Format: date-time
1584
- * @description Creation timestamp
1585
- */
1586
- createdAt: string;
1587
- /**
1588
- * Updated At
1589
- * Format: date-time
1590
- * @description Last update timestamp
1591
- */
1592
- updatedAt: string;
1593
- };
1594
- /**
1595
- * SkillsGenerationStatus
1596
- * @description Status of skill generation.
1597
- * @enum {string}
1598
- */
1599
- SkillsGenerationStatus: "recording" | "generating" | "failed" | "finished" | "cancelled" | "timed_out";
1600
- /**
1601
- * SupportedLLMs
1602
- * @enum {string}
1603
- */
1604
- SupportedLLMs: "browser-use-llm" | "browser-use-2.0" | "gpt-4.1" | "gpt-4.1-mini" | "o4-mini" | "o3" | "gemini-2.5-flash" | "gemini-2.5-pro" | "gemini-3-pro-preview" | "gemini-3-flash-preview" | "gemini-flash-latest" | "gemini-flash-lite-latest" | "claude-sonnet-4-20250514" | "claude-sonnet-4-5-20250929" | "claude-sonnet-4-6" | "claude-opus-4-5-20251101" | "gpt-4o" | "gpt-4o-mini" | "llama-4-maverick-17b-128e-instruct" | "claude-3-7-sonnet-20250219";
1605
- /**
1606
- * TaskCreatedResponse
1607
- * @description Response model for creating a task
1608
- */
1609
- TaskCreatedResponse: {
1610
- /**
1611
- * ID
1612
- * Format: uuid
1613
- * @description Unique identifier for the created task
1614
- */
1615
- id: string;
1616
- /**
1617
- * Session ID
1618
- * Format: uuid
1619
- * @description Session ID where the task was created
1620
- */
1621
- sessionId: string;
1622
- };
1623
- /**
1624
- * TaskItemView
1625
- * @description View model for representing a task with its execution details
1626
- */
1627
- TaskItemView: {
1628
- /**
1629
- * ID
1630
- * Format: uuid
1631
- * @description Unique identifier for the task
1632
- */
1633
- id: string;
1634
- /**
1635
- * Session ID
1636
- * Format: uuid
1637
- * @description ID of the session this task belongs to
1638
- */
1639
- sessionId: string;
1640
- /**
1641
- * LLM
1642
- * @description The LLM model used for this task represented as a string
1643
- */
1644
- llm: string;
1645
- /**
1646
- * Task
1647
- * @description The task prompt/instruction given to the agent
1648
- */
1649
- task: string;
1650
- status: components["schemas"]["TaskStatus"];
1651
- /**
1652
- * Created At
1653
- * Format: date-time
1654
- * @description Naive UTC timestamp when the task was created
1655
- */
1656
- createdAt: string;
1657
- /**
1658
- * Started At
1659
- * @description Naive UTC timestamp when the task was started (None if task has not started yet)
1660
- */
1661
- startedAt?: string | null;
1662
- /**
1663
- * Finished At
1664
- * @description Naive UTC timestamp when the task completed (None if still running)
1665
- */
1666
- finishedAt?: string | null;
1667
- /**
1668
- * Metadata
1669
- * @description Optional additional metadata associated with the task set by the user
1670
- * @default {}
1671
- */
1672
- metadata: {
1673
- [key: string]: unknown;
1674
- };
1675
- /**
1676
- * Output
1677
- * @description Final output/result of the task
1678
- */
1679
- output?: string | null;
1680
- /**
1681
- * Browser Use Version
1682
- * @description Version of browser-use used for this task (older tasks may not have this set)
1683
- */
1684
- browserUseVersion?: string | null;
1685
- /**
1686
- * Is Success
1687
- * @description Whether the task was successful (self-reported by the agent)
1688
- */
1689
- isSuccess?: boolean | null;
1690
- /**
1691
- * Judgement
1692
- * @description Stringified JSON object containing the full report from the judge
1693
- */
1694
- judgement?: string | null;
1695
- /**
1696
- * Judge Verdict
1697
- * @description Judge verdict - True if the judge found the task to be successful, False otherwise (None if judge is not enabled)
1698
- */
1699
- judgeVerdict?: boolean | null;
1700
- /**
1701
- * Cost
1702
- * @description Total cost of the task in USD. This is the sum of all step costs incurred during task execution.
1703
- */
1704
- cost?: string | null;
1705
- /**
1706
- * Suggestions
1707
- * @description List of actionable suggestions for improving task configuration based on detected issues during execution.
1708
- */
1709
- suggestions?: {
1710
- [key: string]: unknown;
1711
- }[] | null;
1712
- };
1713
- /**
1714
- * TaskListResponse
1715
- * @description Response model for paginated task list requests.
1716
- */
1717
- TaskListResponse: {
1718
- /**
1719
- * Items
1720
- * @description List of task views for the current page
1721
- */
1722
- items: components["schemas"]["TaskItemView"][];
1723
- /**
1724
- * Total Items
1725
- * @description Total number of items in the list
1726
- */
1727
- totalItems: number;
1728
- /**
1729
- * Page Number
1730
- * @description Page number
1731
- */
1732
- pageNumber: number;
1733
- /**
1734
- * Page Size
1735
- * @description Number of items per page
1736
- */
1737
- pageSize: number;
1738
- };
1739
- /**
1740
- * TaskLogFileResponse
1741
- * @description Response model for log file requests
1742
- */
1743
- TaskLogFileResponse: {
1744
- /**
1745
- * Download URL
1746
- * @description URL to download the log file
1747
- */
1748
- downloadUrl: string;
1749
- };
1750
- /**
1751
- * TaskNotFoundError
1752
- * @description Error response when a task is not found
1753
- */
1754
- TaskNotFoundError: {
1755
- /**
1756
- * Detail
1757
- * @default Task not found
1758
- */
1759
- detail: string;
1760
- };
1761
- /**
1762
- * TaskOutputFileResponse
1763
- * @description Response model for output file requests.
1764
- */
1765
- TaskOutputFileResponse: {
1766
- /**
1767
- * ID
1768
- * Format: uuid
1769
- * @description Unique identifier for the file
1770
- */
1771
- id: string;
1772
- /**
1773
- * File Name
1774
- * @description Name of the file
1775
- */
1776
- fileName: string;
1777
- /**
1778
- * Download URL
1779
- * @description URL to download the file
1780
- */
1781
- downloadUrl: string;
1782
- };
1783
- /**
1784
- * TaskStatus
1785
- * @description Enumeration of possible task execution states
1786
- *
1787
- * Attributes:
1788
- * CREATED: Task has been created but not yet started.
1789
- * STARTED: Task has been started and is currently running.
1790
- * FINISHED: Task has finished and the agent has completed the task.
1791
- * FAILED: Task execution failed due to an error.
1792
- * STOPPED: Task execution has been manually stopped (cannot be resumed).
1793
- * @enum {string}
1794
- */
1795
- TaskStatus: "created" | "started" | "finished" | "failed" | "stopped";
1796
- /**
1797
- * TaskStatusView
1798
- * @description Lightweight view optimized for polling. Use GET /tasks/{id}/status for efficient polling
1799
- * instead of GET /tasks/{id} which loads full step details.
1800
- */
1801
- TaskStatusView: {
1802
- /**
1803
- * ID
1804
- * Format: uuid
1805
- * @description Unique identifier for the task
1806
- */
1807
- id: string;
1808
- /**
1809
- * Status
1810
- * @description Current status of the task
1811
- */
1812
- status: components["schemas"]["TaskStatus"];
1813
- /**
1814
- * Output
1815
- * @description Final output/result of the task (null while running)
1816
- */
1817
- output?: string | null;
1818
- /**
1819
- * Finished At
1820
- * @description Naive UTC timestamp when the task completed (null if still running)
1821
- */
1822
- finishedAt?: string | null;
1823
- /**
1824
- * Is Success
1825
- * @description Whether the task was successful based on the agent's self-reported output
1826
- */
1827
- isSuccess?: boolean | null;
1828
- /**
1829
- * Cost
1830
- * @description Total cost of the task in USD
1831
- */
1832
- cost?: string | null;
1833
- };
1834
- /**
1835
- * TaskStepView
1836
- * @description View model for representing a single step in a task's execution
1837
- */
1838
- TaskStepView: {
1839
- /**
1840
- * Number
1841
- * @description Sequential step number within the task
1842
- */
1843
- number: number;
1844
- /**
1845
- * Memory
1846
- * @description Agent's memory at this step
1847
- */
1848
- memory: string;
1849
- /**
1850
- * Evaluation Previous Goal
1851
- * @description Agent's evaluation of the previous goal completion
1852
- */
1853
- evaluationPreviousGoal: string;
1854
- /**
1855
- * Next Goal
1856
- * @description The goal for the next step
1857
- */
1858
- nextGoal: string;
1859
- /**
1860
- * URL
1861
- * @description Current URL the browser is on for this step
1862
- */
1863
- url: string;
1864
- /**
1865
- * Screenshot URL
1866
- * @description Optional URL to the screenshot taken at this step
1867
- */
1868
- screenshotUrl?: string | null;
1869
- /**
1870
- * Actions
1871
- * @description List of stringified json actions performed by the agent in this step
1872
- */
1873
- actions: string[];
1874
- /**
1875
- * Duration
1876
- * @description Duration of the step in seconds. Calculated as the time elapsed from the previous step completion (or task start for the first step) to this step completion.
1877
- */
1878
- duration?: number | null;
1879
- };
1880
- /**
1881
- * TaskUpdateAction
1882
- * @description Available actions that can be performed on a task
1883
- *
1884
- * Attributes:
1885
- * STOP: Stop the current task execution
1886
- * STOP_TASK_AND_SESSION: Stop both the task and its parent session
1887
- * @enum {string}
1888
- */
1889
- TaskUpdateAction: "stop" | "stop_task_and_session";
1890
- /**
1891
- * TaskView
1892
- * @description View model for representing a task with its execution details
1893
- */
1894
- TaskView: {
1895
- /**
1896
- * ID
1897
- * Format: uuid
1898
- * @description Unique identifier for the task
1899
- */
1900
- id: string;
1901
- /**
1902
- * Sessionid
1903
- * Format: uuid
1904
- */
1905
- sessionId: string;
1906
- /**
1907
- * LLM
1908
- * @description The LLM model used for this task represented as a string
1909
- */
1910
- llm: string;
1911
- /**
1912
- * Task
1913
- * @description The task prompt/instruction given to the agent
1914
- */
1915
- task: string;
1916
- /**
1917
- * Status
1918
- * @description Current status of the task execution
1919
- */
1920
- status: components["schemas"]["TaskStatus"];
1921
- /**
1922
- * Created At
1923
- * Format: date-time
1924
- * @description Naive UTC timestamp when the task was created
1925
- */
1926
- createdAt: string;
1927
- /**
1928
- * Started At
1929
- * @description Naive UTC timestamp when the task was started (None if task has not started yet)
1930
- */
1931
- startedAt?: string | null;
1932
- /**
1933
- * Finished At
1934
- * @description Naive UTC timestamp when the task completed (None if still running)
1935
- */
1936
- finishedAt?: string | null;
1937
- /**
1938
- * Metadata
1939
- * @description Optional additional metadata associated with the task set by the user
1940
- * @default {}
1941
- */
1942
- metadata: {
1943
- [key: string]: unknown;
1944
- };
1945
- /** Steps */
1946
- steps: components["schemas"]["TaskStepView"][];
1947
- /**
1948
- * Output
1949
- * @description Final output/result of the task
1950
- */
1951
- output?: string | null;
1952
- /** Outputfiles */
1953
- outputFiles: components["schemas"]["FileView"][];
1954
- /**
1955
- * Browser Use Version
1956
- * @description Version of browser-use used for this task (older tasks may not have this set)
1957
- */
1958
- browserUseVersion?: string | null;
1959
- /**
1960
- * Is Success
1961
- * @description Whether the task was successful based on the agent's self-reported output (less reliable than the judge)
1962
- */
1963
- isSuccess?: boolean | null;
1964
- /**
1965
- * Judgement
1966
- * @description Stringified JSON object containing the full report from the judge
1967
- */
1968
- judgement?: string | null;
1969
- /**
1970
- * Judge Verdict
1971
- * @description Judge verdict - True if the judge found the task to be successful, False otherwise (None if judge is not enabled)
1972
- */
1973
- judgeVerdict?: boolean | null;
1974
- /**
1975
- * Cost
1976
- * @description Total cost of the task in USD. This is the sum of all step costs incurred during task execution.
1977
- */
1978
- cost?: string | null;
1979
- /**
1980
- * Suggestions
1981
- * @description List of actionable suggestions for improving task configuration based on detected issues during execution.
1982
- */
1983
- suggestions?: {
1984
- [key: string]: unknown;
1985
- }[] | null;
1986
- };
1987
- /**
1988
- * TooManyConcurrentActiveSessionsError
1989
- * @description Error response when user has too many concurrent active sessions
1990
- */
1991
- TooManyConcurrentActiveSessionsError: {
1992
- /**
1993
- * Detail
1994
- * @default Too many concurrent active sessions. Please wait for one to finish, kill one, or upgrade your plan.
1995
- */
1996
- detail: string;
1997
- };
1998
- /**
1999
- * UnsupportedContentTypeError
2000
- * @description Error response for unsupported content types
2001
- */
2002
- UnsupportedContentTypeError: {
2003
- /**
2004
- * Detail
2005
- * @default Unsupported content type
2006
- */
2007
- detail: string;
2008
- };
2009
- /**
2010
- * UpdateBrowserSessionRequest
2011
- * @description Request model for updating browser session state.
2012
- */
2013
- UpdateBrowserSessionRequest: {
2014
- /**
2015
- * Action
2016
- * @description The action to perform on the session
2017
- */
2018
- action: components["schemas"]["BrowserSessionUpdateAction"];
2019
- };
2020
- /**
2021
- * UpdateSessionRequest
2022
- * @description Request model for updating session state.
2023
- */
2024
- UpdateSessionRequest: {
2025
- /**
2026
- * Action
2027
- * @description The action to perform on the session
2028
- */
2029
- action: components["schemas"]["SessionUpdateAction"];
2030
- };
2031
- /**
2032
- * UpdateSkillRequest
2033
- * @description Request to update skill metadata.
2034
- */
2035
- UpdateSkillRequest: {
2036
- /**
2037
- * Title
2038
- * @description Display name for the skill (shows up in the public view)
2039
- */
2040
- title?: string | null;
2041
- /**
2042
- * Description
2043
- * @description Description of what the skill does (shows up in the public view)
2044
- */
2045
- description?: string | null;
2046
- /**
2047
- * Categories
2048
- * @description Categories to assign to the skill
2049
- */
2050
- categories?: components["schemas"]["SkillCategory"][] | null;
2051
- /**
2052
- * Domains
2053
- * @description Domains/websites this skill interacts with
2054
- */
2055
- domains?: string[] | null;
2056
- /**
2057
- * Isenabled
2058
- * @description Whether the skill is enabled for execution
2059
- */
2060
- isEnabled?: boolean | null;
2061
- };
2062
- /**
2063
- * UpdateTaskRequest
2064
- * @description Request model for updating task state
2065
- */
2066
- UpdateTaskRequest: {
2067
- /**
2068
- * Action
2069
- * @description The action to perform on the task
2070
- */
2071
- action: components["schemas"]["TaskUpdateAction"];
2072
- };
2073
- /**
2074
- * UploadFilePresignedUrlResponse
2075
- * @description Response model for a presigned upload URL.
2076
- */
2077
- UploadFilePresignedUrlResponse: {
2078
- /**
2079
- * URL
2080
- * @description The URL to upload the file to.
2081
- */
2082
- url: string;
2083
- /**
2084
- * Method
2085
- * @description The HTTP method to use for the upload.
2086
- * @constant
2087
- */
2088
- method: "POST";
2089
- /**
2090
- * Fields
2091
- * @description The form fields to include in the upload request.
2092
- */
2093
- fields: {
2094
- [key: string]: string;
2095
- };
2096
- /**
2097
- * File Name
2098
- * @description The name of the file to upload (should be referenced when user wants to use the file in a task).
2099
- */
2100
- fileName: string;
2101
- /**
2102
- * Expires In
2103
- * @description The number of seconds until the presigned URL expires.
2104
- */
2105
- expiresIn: number;
2106
- };
2107
- /**
2108
- * UploadFileRequest
2109
- * @description Request model for uploading a file to the user's files bucket.
2110
- */
2111
- UploadFileRequest: {
2112
- /**
2113
- * File Name
2114
- * @description The name of the file to upload
2115
- */
2116
- fileName: string;
2117
- /**
2118
- * Content Type
2119
- * @description The content type of the file to upload
2120
- * @enum {string}
2121
- */
2122
- contentType: "image/jpg" | "image/jpeg" | "image/png" | "image/gif" | "image/webp" | "image/svg+xml" | "application/pdf" | "application/msword" | "application/vnd.openxmlformats-officedocument.wordprocessingml.document" | "application/vnd.ms-excel" | "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" | "text/plain" | "text/csv" | "text/markdown";
2123
- /** Sizebytes */
2124
- sizeBytes: number;
2125
- };
2126
- /** ValidationError */
2127
- ValidationError: {
2128
- /** Location */
2129
- loc: (string | number)[];
2130
- /** Message */
2131
- msg: string;
2132
- /** Error Type */
2133
- type: string;
2134
- };
2135
- };
2136
- responses: never;
2137
- parameters: never;
2138
- requestBodies: never;
2139
- headers: never;
2140
- pathItems: never;
2141
- }
2142
-
2143
- type AccountView$1 = components["schemas"]["AccountView"];
2144
- declare class Billing {
2145
- private readonly http;
2146
- constructor(http: HttpClient);
2147
- /** Get authenticated account billing information including credit balance. */
2148
- account(): Promise<AccountView$1>;
2149
- }
2150
-
2151
- /** All fields are optional (server applies defaults); body itself is required by the spec. */
2152
- type CreateBrowserBody = Partial<components["schemas"]["CreateBrowserSessionRequest"]>;
2153
- type BrowserSessionItemView$1 = components["schemas"]["BrowserSessionItemView"];
2154
- type BrowserSessionListResponse$1 = components["schemas"]["BrowserSessionListResponse"];
2155
- type BrowserSessionView$1 = components["schemas"]["BrowserSessionView"];
2156
- type UpdateBrowserSessionRequest$1 = components["schemas"]["UpdateBrowserSessionRequest"];
2157
- interface BrowserListParams {
2158
- pageSize?: number;
2159
- pageNumber?: number;
2160
- filterBy?: string;
2161
- }
2162
- declare class Browsers {
2163
- private readonly http;
2164
- constructor(http: HttpClient);
2165
- /** Create a new browser session. */
2166
- create(body?: CreateBrowserBody): Promise<BrowserSessionItemView$1>;
2167
- /** List browser sessions with optional filtering. */
2168
- list(params?: BrowserListParams): Promise<BrowserSessionListResponse$1>;
2169
- /** Get detailed browser session information. */
2170
- get(sessionId: string): Promise<BrowserSessionView$1>;
2171
- /** Update a browser session (generic PATCH). */
2172
- update(sessionId: string, body: UpdateBrowserSessionRequest$1): Promise<BrowserSessionView$1>;
2173
- /** Stop a browser session. */
2174
- stop(sessionId: string): Promise<BrowserSessionView$1>;
2175
- }
2176
-
2177
- type UploadFileRequest$1 = components["schemas"]["UploadFileRequest"];
2178
- type UploadFilePresignedUrlResponse$1 = components["schemas"]["UploadFilePresignedUrlResponse"];
2179
- type TaskOutputFileResponse$1 = components["schemas"]["TaskOutputFileResponse"];
2180
- declare class Files {
2181
- private readonly http;
2182
- constructor(http: HttpClient);
2183
- /** Generate a presigned URL for uploading files to an agent session. */
2184
- sessionUrl(sessionId: string, body: UploadFileRequest$1): Promise<UploadFilePresignedUrlResponse$1>;
2185
- /** Generate a presigned URL for uploading files to a browser session. */
2186
- browserUrl(sessionId: string, body: UploadFileRequest$1): Promise<UploadFilePresignedUrlResponse$1>;
2187
- /** Get secure download URL for a task output file. */
2188
- taskOutput(taskId: string, fileId: string): Promise<TaskOutputFileResponse$1>;
2189
- }
2190
-
2191
- type ExecuteSkillRequest$2 = components["schemas"]["ExecuteSkillRequest"];
2192
- type ExecuteSkillResponse$2 = components["schemas"]["ExecuteSkillResponse"];
2193
- type MarketplaceSkillListResponse$1 = components["schemas"]["MarketplaceSkillListResponse"];
2194
- type MarketplaceSkillResponse$1 = components["schemas"]["MarketplaceSkillResponse"];
2195
- type SkillResponse$2 = components["schemas"]["SkillResponse"];
2196
- interface MarketplaceListParams {
2197
- pageSize?: number;
2198
- pageNumber?: number;
2199
- query?: string;
2200
- category?: string;
2201
- fromDate?: string;
2202
- toDate?: string;
2203
- }
2204
- declare class Marketplace {
2205
- private readonly http;
2206
- constructor(http: HttpClient);
2207
- /** List all public skills in the marketplace. */
2208
- list(params?: MarketplaceListParams): Promise<MarketplaceSkillListResponse$1>;
2209
- /** Get details of a specific marketplace skill by slug. */
2210
- get(skillSlug: string): Promise<MarketplaceSkillResponse$1>;
2211
- /** Clone a public marketplace skill to your project. */
2212
- clone(skillId: string): Promise<SkillResponse$2>;
2213
- /** Execute a marketplace skill. */
2214
- execute(skillId: string, body: ExecuteSkillRequest$2): Promise<ExecuteSkillResponse$2>;
2215
- }
2216
-
2217
- type ProfileCreateRequest$1 = components["schemas"]["ProfileCreateRequest"];
2218
- type ProfileListResponse$1 = components["schemas"]["ProfileListResponse"];
2219
- type ProfileUpdateRequest$1 = components["schemas"]["ProfileUpdateRequest"];
2220
- type ProfileView$1 = components["schemas"]["ProfileView"];
2221
- interface ProfileListParams {
2222
- pageSize?: number;
2223
- pageNumber?: number;
2224
- query?: string;
2225
- }
2226
- declare class Profiles {
2227
- private readonly http;
2228
- constructor(http: HttpClient);
2229
- /** Create a new browser profile. */
2230
- create(body?: ProfileCreateRequest$1): Promise<ProfileView$1>;
2231
- /** List profiles with pagination. */
2232
- list(params?: ProfileListParams): Promise<ProfileListResponse$1>;
2233
- /** Get profile details. */
2234
- get(profileId: string): Promise<ProfileView$1>;
2235
- /** Update a browser profile. */
2236
- update(profileId: string, body: ProfileUpdateRequest$1): Promise<ProfileView$1>;
2237
- /** Delete a browser profile. */
2238
- delete(profileId: string): Promise<void>;
2239
- }
2240
-
2241
- /** User-facing body: all fields are optional (API has defaults). */
2242
- type CreateSessionBody = Partial<components["schemas"]["CreateSessionRequest"]>;
2243
- type SessionItemView$1 = components["schemas"]["SessionItemView"];
2244
- type SessionListResponse$1 = components["schemas"]["SessionListResponse"];
2245
- type SessionView$1 = components["schemas"]["SessionView"];
2246
- type ShareView$1 = components["schemas"]["ShareView"];
2247
- type UpdateSessionRequest$1 = components["schemas"]["UpdateSessionRequest"];
2248
- interface SessionListParams {
2249
- pageSize?: number;
2250
- pageNumber?: number;
2251
- filterBy?: string;
2252
- }
2253
- declare class Sessions {
2254
- private readonly http;
2255
- constructor(http: HttpClient);
2256
- /** Create a new session. */
2257
- create(body?: CreateSessionBody): Promise<SessionItemView$1>;
2258
- /** List sessions with optional filtering. */
2259
- list(params?: SessionListParams): Promise<SessionListResponse$1>;
2260
- /** Get detailed session information. */
2261
- get(sessionId: string): Promise<SessionView$1>;
2262
- /** Update a session (generic PATCH). */
2263
- update(sessionId: string, body: UpdateSessionRequest$1): Promise<SessionView$1>;
2264
- /** Stop a session and all its running tasks. */
2265
- stop(sessionId: string): Promise<SessionView$1>;
2266
- /** Delete a session with all its tasks. */
2267
- delete(sessionId: string): Promise<void>;
2268
- /** Get public share information for a session. */
2269
- getShare(sessionId: string): Promise<ShareView$1>;
2270
- /** Create or return existing public share for a session. */
2271
- createShare(sessionId: string): Promise<ShareView$1>;
2272
- /** Remove public share for a session. */
2273
- deleteShare(sessionId: string): Promise<void>;
2274
- /** Purge all session data (ZDR projects only). */
2275
- purge(sessionId: string): Promise<void>;
2276
- }
2277
-
2278
- type CreateSkillRequest$1 = components["schemas"]["CreateSkillRequest"];
2279
- type CreateSkillResponse$1 = components["schemas"]["CreateSkillResponse"];
2280
- type ExecuteSkillRequest$1 = components["schemas"]["ExecuteSkillRequest"];
2281
- type ExecuteSkillResponse$1 = components["schemas"]["ExecuteSkillResponse"];
2282
- type RefineSkillRequest$1 = components["schemas"]["RefineSkillRequest"];
2283
- type RefineSkillResponse$1 = components["schemas"]["RefineSkillResponse"];
2284
- type SkillExecutionListResponse$1 = components["schemas"]["SkillExecutionListResponse"];
2285
- type SkillExecutionOutputResponse$1 = components["schemas"]["SkillExecutionOutputResponse"];
2286
- type SkillListResponse$1 = components["schemas"]["SkillListResponse"];
2287
- type SkillResponse$1 = components["schemas"]["SkillResponse"];
2288
- type UpdateSkillRequest$1 = components["schemas"]["UpdateSkillRequest"];
2289
- interface SkillListParams {
2290
- pageSize?: number;
2291
- pageNumber?: number;
2292
- isPublic?: boolean;
2293
- isEnabled?: boolean;
2294
- category?: string;
2295
- query?: string;
2296
- fromDate?: string;
2297
- toDate?: string;
2298
- }
2299
- interface SkillExecutionListParams {
2300
- pageSize?: number;
2301
- pageNumber?: number;
2302
- }
2303
- declare class Skills {
2304
- private readonly http;
2305
- constructor(http: HttpClient);
2306
- /** Create a new skill via automated generation. */
2307
- create(body: CreateSkillRequest$1): Promise<CreateSkillResponse$1>;
2308
- /** List all skills owned by the project. */
2309
- list(params?: SkillListParams): Promise<SkillListResponse$1>;
2310
- /** Get details of a specific skill. */
2311
- get(skillId: string): Promise<SkillResponse$1>;
2312
- /** Delete a skill. */
2313
- delete(skillId: string): Promise<void>;
2314
- /** Update skill metadata. */
2315
- update(skillId: string, body: UpdateSkillRequest$1): Promise<SkillResponse$1>;
2316
- /** Cancel the current in-progress generation for a skill. */
2317
- cancel(skillId: string): Promise<SkillResponse$1>;
2318
- /** Execute a skill with the provided parameters. */
2319
- execute(skillId: string, body: ExecuteSkillRequest$1): Promise<ExecuteSkillResponse$1>;
2320
- /** Refine a skill based on feedback. */
2321
- refine(skillId: string, body: RefineSkillRequest$1): Promise<RefineSkillResponse$1>;
2322
- /** Rollback to the previous version. */
2323
- rollback(skillId: string): Promise<SkillResponse$1>;
2324
- /** List executions for a specific skill. */
2325
- executions(skillId: string, params?: SkillExecutionListParams): Promise<SkillExecutionListResponse$1>;
2326
- /** Get presigned URL for downloading skill execution output. */
2327
- executionOutput(skillId: string, executionId: string): Promise<SkillExecutionOutputResponse$1>;
2328
- }
2329
-
2330
- /** User-facing body: only `task` is required; everything else has API defaults. */
2331
- type CreateTaskBody = Pick<components["schemas"]["CreateTaskRequest"], "task"> & Partial<Omit<components["schemas"]["CreateTaskRequest"], "task">>;
2332
- type TaskCreatedResponse$2 = components["schemas"]["TaskCreatedResponse"];
2333
- type TaskListResponse$1 = components["schemas"]["TaskListResponse"];
2334
- type TaskLogFileResponse$1 = components["schemas"]["TaskLogFileResponse"];
2335
- type TaskStatusView$1 = components["schemas"]["TaskStatusView"];
2336
- type TaskView$2 = components["schemas"]["TaskView"];
2337
- type UpdateTaskRequest$1 = components["schemas"]["UpdateTaskRequest"];
2338
- interface TaskListParams {
2339
- pageSize?: number;
2340
- pageNumber?: number;
2341
- sessionId?: string;
2342
- filterBy?: string;
2343
- after?: string;
2344
- before?: string;
2345
- }
2346
- declare class Tasks {
2347
- private readonly http;
2348
- constructor(http: HttpClient);
2349
- /** Create and start a new AI agent task. */
2350
- create(body: CreateTaskBody): Promise<TaskCreatedResponse$2>;
2351
- /** List tasks with optional filtering. */
2352
- list(params?: TaskListParams): Promise<TaskListResponse$1>;
2353
- /** Get detailed task information. */
2354
- get(taskId: string): Promise<TaskView$2>;
2355
- /** Update a task (generic PATCH). */
2356
- update(taskId: string, body: UpdateTaskRequest$1): Promise<TaskView$2>;
2357
- /** Stop a running task. */
2358
- stop(taskId: string): Promise<TaskView$2>;
2359
- /** Stop a running task and its associated browser session. */
2360
- stopTaskAndSession(taskId: string): Promise<TaskView$2>;
2361
- /** Get lightweight task status (optimized for polling). */
2362
- status(taskId: string): Promise<TaskStatusView$1>;
2363
- /** Get secure download URL for task execution logs. */
2364
- logs(taskId: string): Promise<TaskLogFileResponse$1>;
2365
- /** Poll until a task reaches a terminal status, then return the full TaskView. */
2366
- wait(taskId: string, opts?: {
2367
- timeout?: number;
2368
- interval?: number;
2369
- }): Promise<TaskView$2>;
2370
- }
2371
-
2372
- type TaskCreatedResponse$1 = components["schemas"]["TaskCreatedResponse"];
2373
- type TaskStepView$1 = components["schemas"]["TaskStepView"];
2374
- type TaskView$1 = components["schemas"]["TaskView"];
2375
- /** Task result with typed output. All TaskView fields are directly accessible. */
2376
- type TaskResult<T = string | null> = Omit<TaskView$1, "output"> & {
2377
- output: T;
2378
- };
2379
- interface RunOptions {
2380
- /** Maximum time to wait in milliseconds. Default: 300_000 (5 min). */
2381
- timeout?: number;
2382
- /** Polling interval in milliseconds. Default: 2_000. */
2383
- interval?: number;
2384
- }
2385
- /**
2386
- * Lazy task handle returned by `client.run()`.
2387
- *
2388
- * - `await client.run(...)` polls the lightweight status endpoint, returns a `TaskResult`.
2389
- * - `for await (const step of client.run(...))` polls the full task, yields new steps.
2390
- */
2391
- declare class TaskRun<T = string> implements PromiseLike<TaskResult<T>> {
2392
- private readonly _createPromise;
2393
- private readonly _tasks;
2394
- private readonly _schema?;
2395
- private readonly _timeout;
2396
- private readonly _interval;
2397
- private _taskId;
2398
- private _result;
2399
- constructor(createPromise: Promise<TaskCreatedResponse$1>, tasks: Tasks, schema?: z.ZodType<T>, options?: RunOptions);
2400
- /** Task ID (available after creation resolves). */
2401
- get taskId(): string | null;
2402
- /** Full task result (available after awaiting or iterating to completion). */
2403
- get result(): TaskResult<T> | null;
2404
- /** Enable `await client.run(...)` — polls status endpoint, returns TaskResult. */
2405
- then<R1 = TaskResult<T>, R2 = never>(onFulfilled?: ((value: TaskResult<T>) => R1 | PromiseLike<R1>) | null, onRejected?: ((reason: unknown) => R2 | PromiseLike<R2>) | null): Promise<R1 | R2>;
2406
- /** Enable `for await (const step of client.run(...))` — polls full task, yields new steps. */
2407
- [Symbol.asyncIterator](): AsyncGenerator<TaskStepView$1>;
2408
- private _ensureTaskId;
2409
- /** Poll lightweight status endpoint until terminal, return TaskResult. */
2410
- private _waitForOutput;
2411
- private _buildResult;
2412
- private _parseOutput;
2413
- }
2414
-
2415
- interface BrowserUseOptions {
2416
- apiKey?: string;
2417
- baseUrl?: string;
2418
- maxRetries?: number;
2419
- timeout?: number;
2420
- }
2421
- type RunTaskOptions = Partial<Omit<CreateTaskBody, "task">> & RunOptions & {
2422
- schema?: z.ZodType;
2423
- };
2424
- declare class BrowserUse {
2425
- readonly billing: Billing;
2426
- readonly tasks: Tasks;
2427
- readonly sessions: Sessions;
2428
- readonly files: Files;
2429
- readonly profiles: Profiles;
2430
- readonly browsers: Browsers;
2431
- readonly skills: Skills;
2432
- readonly marketplace: Marketplace;
2433
- private readonly http;
2434
- constructor(options?: BrowserUseOptions);
2435
- /**
2436
- * Run an AI agent task.
2437
- *
2438
- * ```ts
2439
- * // Simple — just get the output
2440
- * const output = await client.run("Find the top HN post");
2441
- *
2442
- * // Structured output (Zod)
2443
- * const data = await client.run("Find product info", { schema: ProductSchema });
2444
- *
2445
- * // Step-by-step progress
2446
- * for await (const step of client.run("Go to google.com")) {
2447
- * console.log(`[${step.number}] ${step.nextGoal}`);
2448
- * }
2449
- * ```
2450
- */
2451
- run(task: string, options?: Omit<RunTaskOptions, "schema">): TaskRun<string>;
2452
- run<T extends z.ZodType>(task: string, options: RunTaskOptions & {
2453
- schema: T;
2454
- }): TaskRun<z.output<T>>;
2455
- }
2456
-
2457
- type S = components["schemas"];
2458
- type AccountView = S["AccountView"];
2459
- type BrowserSessionItemView = S["BrowserSessionItemView"];
2460
- type BrowserSessionListResponse = S["BrowserSessionListResponse"];
2461
- type BrowserSessionView = S["BrowserSessionView"];
2462
- type CreateSkillResponse = S["CreateSkillResponse"];
2463
- type ExecuteSkillResponse = S["ExecuteSkillResponse"];
2464
- type FileView = S["FileView"];
2465
- type MarketplaceSkillListResponse = S["MarketplaceSkillListResponse"];
2466
- type MarketplaceSkillResponse = S["MarketplaceSkillResponse"];
2467
- type ParameterSchema = S["ParameterSchema"];
2468
- type PlanInfo = S["PlanInfo"];
2469
- type ProfileListResponse = S["ProfileListResponse"];
2470
- type ProfileView = S["ProfileView"];
2471
- type RefineSkillResponse = S["RefineSkillResponse"];
2472
- type SessionItemView = S["SessionItemView"];
2473
- type SessionListResponse = S["SessionListResponse"];
2474
- type SessionView = S["SessionView"];
2475
- type ShareView = S["ShareView"];
2476
- type SkillExecutionListResponse = S["SkillExecutionListResponse"];
2477
- type SkillExecutionOutputResponse = S["SkillExecutionOutputResponse"];
2478
- type SkillExecutionView = S["SkillExecutionView"];
2479
- type SkillListResponse = S["SkillListResponse"];
2480
- type SkillResponse = S["SkillResponse"];
2481
- type TaskCreatedResponse = S["TaskCreatedResponse"];
2482
- type TaskItemView = S["TaskItemView"];
2483
- type TaskListResponse = S["TaskListResponse"];
2484
- type TaskLogFileResponse = S["TaskLogFileResponse"];
2485
- type TaskOutputFileResponse = S["TaskOutputFileResponse"];
2486
- type TaskStatusView = S["TaskStatusView"];
2487
- type TaskStepView = S["TaskStepView"];
2488
- type TaskView = S["TaskView"];
2489
- type UploadFilePresignedUrlResponse = S["UploadFilePresignedUrlResponse"];
2490
- type CreateBrowserSessionRequest = S["CreateBrowserSessionRequest"];
2491
- type CreateSessionRequest = S["CreateSessionRequest"];
2492
- type CreateSkillRequest = S["CreateSkillRequest"];
2493
- type CreateTaskRequest = S["CreateTaskRequest"];
2494
- type CustomProxy = S["CustomProxy"];
2495
- type ExecuteSkillRequest = S["ExecuteSkillRequest"];
2496
- type ProfileCreateRequest = S["ProfileCreateRequest"];
2497
- type ProfileUpdateRequest = S["ProfileUpdateRequest"];
2498
- type RefineSkillRequest = S["RefineSkillRequest"];
2499
- type SessionSettings = S["SessionSettings"];
2500
- type UpdateBrowserSessionRequest = S["UpdateBrowserSessionRequest"];
2501
- type UpdateSessionRequest = S["UpdateSessionRequest"];
2502
- type UpdateSkillRequest = S["UpdateSkillRequest"];
2503
- type UpdateTaskRequest = S["UpdateTaskRequest"];
2504
- type UploadFileRequest = S["UploadFileRequest"];
2505
- type BrowserSessionStatus = S["BrowserSessionStatus"];
2506
- type BrowserSessionUpdateAction = S["BrowserSessionUpdateAction"];
2507
- type ParameterType = S["ParameterType"];
2508
- type ProxyCountryCode = S["ProxyCountryCode"];
2509
- type SessionStatus = S["SessionStatus"];
2510
- type SessionUpdateAction = S["SessionUpdateAction"];
2511
- type SkillCategory = S["SkillCategory"];
2512
- type SkillsGenerationStatus = S["SkillsGenerationStatus"];
2513
- type SupportedLLMs = S["SupportedLLMs"];
2514
- type TaskStatus = S["TaskStatus"];
2515
- type TaskUpdateAction = S["TaskUpdateAction"];
2516
-
2517
- export { type AccountView, Billing, type BrowserListParams, type BrowserSessionItemView, type BrowserSessionListResponse, type BrowserSessionStatus, type BrowserSessionUpdateAction, type BrowserSessionView, BrowserUse, type BrowserUseOptions, Browsers, type CreateBrowserBody, type CreateBrowserSessionRequest, type CreateSessionRequest, type CreateSkillRequest, type CreateSkillResponse, type CreateTaskBody, type CreateTaskRequest, type CustomProxy, type ExecuteSkillRequest, type ExecuteSkillResponse, type FileView, Files, Marketplace, type MarketplaceListParams, type MarketplaceSkillListResponse, type MarketplaceSkillResponse, type ParameterSchema, type ParameterType, type PlanInfo, type ProfileCreateRequest, type ProfileListParams, type ProfileListResponse, type ProfileUpdateRequest, type ProfileView, Profiles, type ProxyCountryCode, type RefineSkillRequest, type RefineSkillResponse, type RunOptions, type RunTaskOptions, type SessionItemView, type SessionListParams, type SessionListResponse, type SessionSettings, type SessionStatus, type SessionUpdateAction, type SessionView, Sessions, type ShareView, type SkillCategory, type SkillExecutionListParams, type SkillExecutionListResponse, type SkillExecutionOutputResponse, type SkillExecutionView, type SkillListParams, type SkillListResponse, type SkillResponse, Skills, type SkillsGenerationStatus, type SupportedLLMs, type TaskCreatedResponse, type TaskItemView, type TaskListParams, type TaskListResponse, type TaskLogFileResponse, type TaskOutputFileResponse, type TaskResult, TaskRun, type TaskStatus, type TaskStatusView, type TaskStepView, type TaskUpdateAction, type TaskView, Tasks, type UpdateBrowserSessionRequest, type UpdateSessionRequest, type UpdateSkillRequest, type UpdateTaskRequest, type UploadFilePresignedUrlResponse, type UploadFileRequest, type components as V2Types };