Skip to content

Commit 10e4187

Browse files
feat: Add start_url
1 parent 31f8b87 commit 10e4187

File tree

3 files changed

+27
-22
lines changed

3 files changed

+27
-22
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 26
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browser-use%2Fbrowser-use-758a1c052b93e7e478fa650c1748f4b466653f44cb26f97fef1314c7a96924df.yml
3-
openapi_spec_hash: 9e0e99b613f2b9bf3993ac36aa0c7911
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browser-use%2Fbrowser-use-890b9140b139df6307d175ff31cba0bf14d703887bee2f0a8db9f5bffc78e11d.yml
3+
openapi_spec_hash: 7131a3daffe4f5b67bc1c7ccec06d961
44
config_hash: 9d52be5177b2ede4cb0633c04f4cc4ef

src/resources/tasks.ts

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -501,9 +501,9 @@ export interface TaskView {
501501
* View model for representing a session that a task belongs to
502502
*
503503
* Attributes: id: Unique identifier for the session status: Current status of the
504-
* session live_url: URL where the browser can be viewed live in real-time.
505-
* started_at: Timestamp when the session was created and started. finished_at:
506-
* Timestamp when the session was stopped (None if still active).
504+
* session (active/stopped) live_url: URL where the browser can be viewed live in
505+
* real-time. started_at: Timestamp when the session was created and started.
506+
* finished_at: Timestamp when the session was stopped (None if still active).
507507
*/
508508
session: TaskView.Session;
509509

@@ -542,9 +542,9 @@ export namespace TaskView {
542542
* View model for representing a session that a task belongs to
543543
*
544544
* Attributes: id: Unique identifier for the session status: Current status of the
545-
* session live_url: URL where the browser can be viewed live in real-time.
546-
* started_at: Timestamp when the session was created and started. finished_at:
547-
* Timestamp when the session was stopped (None if still active).
545+
* session (active/stopped) live_url: URL where the browser can be viewed live in
546+
* real-time. started_at: Timestamp when the session was created and started.
547+
* finished_at: Timestamp when the session was stopped (None if still active).
548548
*/
549549
export interface Session {
550550
id: string;
@@ -633,19 +633,20 @@ export interface TaskCreateParams {
633633
task: string;
634634

635635
/**
636-
* Configuration settings for the AI agent
636+
* Configuration settings for the agent
637637
*
638-
* Attributes: llm: The LLM model to use for the agent profile_id: Unique
639-
* identifier of the agent profile to use for the task
638+
* Attributes: llm: The LLM model to use for the agent start_url: Optional URL to
639+
* start the agent on (will not be changed as a step) profile_id: Unique identifier
640+
* of the agent profile to use for the task
640641
*/
641642
agentSettings?: TaskCreateParams.AgentSettings;
642643

643644
/**
644645
* Configuration settings for the browser session
645646
*
646647
* Attributes: session_id: Unique identifier of existing session to continue
647-
* profile_id: Unique identifier of browser profile to use save_browser_data:
648-
* Whether to save browser state/data for the user to download later
648+
* profile_id: Unique identifier of browser profile to use (use if you want to
649+
* start a new session)
649650
*/
650651
browserSettings?: TaskCreateParams.BrowserSettings;
651652

@@ -660,29 +661,30 @@ export interface TaskCreateParams {
660661

661662
export namespace TaskCreateParams {
662663
/**
663-
* Configuration settings for the AI agent
664+
* Configuration settings for the agent
664665
*
665-
* Attributes: llm: The LLM model to use for the agent profile_id: Unique
666-
* identifier of the agent profile to use for the task
666+
* Attributes: llm: The LLM model to use for the agent start_url: Optional URL to
667+
* start the agent on (will not be changed as a step) profile_id: Unique identifier
668+
* of the agent profile to use for the task
667669
*/
668670
export interface AgentSettings {
669671
llm?: TasksAPI.LlmModel;
670672

671673
profileId?: string | null;
674+
675+
startUrl?: string | null;
672676
}
673677

674678
/**
675679
* Configuration settings for the browser session
676680
*
677681
* Attributes: session_id: Unique identifier of existing session to continue
678-
* profile_id: Unique identifier of browser profile to use save_browser_data:
679-
* Whether to save browser state/data for the user to download later
682+
* profile_id: Unique identifier of browser profile to use (use if you want to
683+
* start a new session)
680684
*/
681685
export interface BrowserSettings {
682686
profileId?: string | null;
683687

684-
saveBrowserData?: boolean;
685-
686688
sessionId?: string | null;
687689
}
688690
}

tests/api-resources/tasks.test.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ describe('resource tasks', () => {
2424
test.skip('create: required and optional params', async () => {
2525
const response = await client.tasks.create({
2626
task: 'x',
27-
agentSettings: { llm: 'gpt-4o', profileId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
27+
agentSettings: {
28+
llm: 'gpt-4o',
29+
profileId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
30+
startUrl: 'startUrl',
31+
},
2832
browserSettings: {
2933
profileId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
30-
saveBrowserData: true,
3134
sessionId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
3235
},
3336
includedFileNames: ['string'],

0 commit comments

Comments
 (0)