YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
update mintlify docs
Louis Beaumont5d0745a79582
diff --git a/content/docs-mintlify-mig-tmp/openapi.yaml b/content/docs-mintlify-mig-tmp/openapi.yamlindex 564d9731b..f57cf6dda 100644--- a/content/docs-mintlify-mig-tmp/openapi.yaml+++ b/content/docs-mintlify-mig-tmp/openapi.yaml@@ -10,6 +10,7 @@ info:## Core Functionality- **Context Retrieval**: Search through screen recordings and audio transcriptions+ - **Computer Automation**: Control applications and automate desktop interactions- **Real-time Streams**: Stream OCR, UI elements, and audio transcriptions- **Device Management**: Control audio and video recording devices- **Pipes System**: Extend functionality with pluggable pipes@@ -19,6 +20,7 @@ info:The most commonly used endpoints are:1. `/search` - Main endpoint for retrieving contextual data+ 2. `/experimental/operator` - Desktop automation endpoints for controlling applicationspaths:/search:@@ -167,6 +169,153 @@ paths:application/json:schema:$ref: '#/components/schemas/SearchResponse'++ /experimental/operator:+ post:+ x-order: 2+ x-typescript-method: 'findElements'+ tags: ['Computer Automation']+ summary: 'Find UI elements in applications for automation'+ description: |+ Find UI elements in applications by role to enable desktop automation.++ ## Use Cases++ - Find buttons, text fields, and other UI elements for automation+ - Build workflows that interact with desktop applications+ - Create AI-powered desktop automation agents++ ## Examples++ ### Find all buttons in Chrome:+ ```js+ const buttons = await pipe.operator+ .getByRole("button", {+ app: "Chrome",+ activateApp: true+ })+ .all(5);+ ```++ ### Click a button:+ ```js+ const button = await pipe.operator+ .getByRole("button", { app: "Chrome" })+ .first();++ await pipe.operator+ .getById(button.id, { app: "Chrome" })+ .click();+ ```+ operationId: server_find_elements_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/FindElementsRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/FindElementsResponse'++ /experimental/operator/open-application:+ post:+ tags: ['Computer Automation']+ summary: 'Open an application'+ operationId: server_open_application_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/OpenApplicationRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/OpenApplicationResponse'++ /experimental/operator/open-url:+ post:+ tags: ['Computer Automation']+ summary: 'Open a URL in a browser'+ operationId: server_open_url_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/OpenUrlRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/OpenUrlResponse'++ /experimental/operator/click:+ post:+ tags: ['Computer Automation']+ summary: 'Click on a UI element'+ operationId: server_click_element_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/ClickElementRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/ActionResponse'++ /experimental/operator/type:+ post:+ tags: ['Computer Automation']+ summary: 'Type text into a UI element'+ operationId: server_type_text_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/TypeTextRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/ActionResponse'++ /experimental/operator/scroll:+ post:+ tags: ['Computer Automation']+ operationId: server_scroll_element_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/ScrollElementRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/ScrollElementResponse'+/audio/list:get:operationId: server_api_list_audio_devices@@ -228,6 +377,115 @@ paths:application/json:schema:$ref: '#/components/schemas/RemoveTagsResponse'++ /experimental/operator/press-key:+ post:+ tags: ['Computer Automation']+ operationId: server_press_key_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/PressKeyRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/PressKeyResponse'++ /experimental/operator/get_text:+ post:+ tags: ['Computer Automation']+ operationId: server_get_text_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/GetTextRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/GetTextResponse'++ /experimental/operator/list-interactable-elements:+ post:+ tags: ['Computer Automation']+ operationId: server_list_interactable_elements_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/ListInteractableElementsRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/ListInteractableElementsResponse'++ /experimental/operator/click-by-index:+ post:+ tags: ['Computer Automation']+ operationId: server_click_by_index_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/ClickByIndexRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/ClickByIndexResponse'++ /experimental/operator/type-by-index:+ post:+ tags: ['Computer Automation']+ operationId: server_type_by_index_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/TypeByIndexRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/TypeByIndexResponse'++ /experimental/operator/press-key-by-index:+ post:+ tags: ['Computer Automation']+ operationId: server_press_key_by_index_handler+ requestBody:+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/PressKeyByIndexRequest'+ required: true+ responses:+ '200':+ description: ''+ content:+ application/json:+ schema:+ $ref: '#/components/schemas/PressKeyByIndexResponse'+/pipes/info/{pipe_id}:get:operationId: server_get_pipe_info_handler@@ -431,8 +689,11 @@ paths:application/json:schema:$ref: '#/components/schemas/AddContentResponse'++ # Speaker management endpoints/speakers/unnamed:get:+ tags: ['Speaker Management']operationId: server_get_unnamed_speakers_handlerparameters:- name: limit@@ -464,6 +725,7 @@ paths:$ref: '#/components/schemas/Speaker'/speakers/update:post:+ tags: ['Speaker Management']operationId: server_update_speaker_handlerrequestBody:content:@@ -480,6 +742,7 @@ paths:$ref: '#/components/schemas/Speaker'/speakers/search:get:+ tags: ['Speaker Management']operationId: server_search_speakers_handlerparameters:- name: name@@ -499,6 +762,7 @@ paths:$ref: '#/components/schemas/Speaker'/speakers/delete:post:+ tags: ['Speaker Management']operationId: server_delete_speaker_handlerrequestBody:content:@@ -515,6 +779,7 @@ paths:type: object/speakers/hallucination:post:+ tags: ['Speaker Management']operationId: server_mark_as_hallucination_handlerrequestBody:content:@@ -531,6 +796,7 @@ paths:type: object/speakers/merge:post:+ tags: ['Speaker Management']operationId: server_merge_speakers_handlerrequestBody:content:@@ -547,6 +813,7 @@ paths:type: object/speakers/similar:get:+ tags: ['Speaker Management']operationId: server_get_similar_speakers_handlerparameters:- name: speaker_id@@ -568,6 +835,8 @@ paths:type: arrayitems:$ref: '#/components/schemas/Speaker'++ # Experimental features/experimental/frames/merge:post:operationId: server_merge_frames_handler@@ -600,14 +869,16 @@ paths:application/json:schema:type: object- /experimental/operator:++ /experimental/input_control:post:- operationId: server_find_elements_handler+ tags: ['Computer Automation']+ operationId: server_input_control_handlerrequestBody:content:application/json:schema:- $ref: '#/components/schemas/FindElementsRequest'+ $ref: '#/components/schemas/InputControlRequest'required: trueresponses:'200':@@ -615,47 +886,38 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/FindElementsResponse'- /experimental/operator/scroll:+ $ref: '#/components/schemas/InputControlResponse'++ # Audio control endpoints+ /audio/start:post:- operationId: server_scroll_element_handler- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/ScrollElementRequest'- required: true+ tags: ['Audio Control']+ operationId: server_start_audioresponses:'200':description: ''content:application/json:- schema:- $ref: '#/components/schemas/ScrollElementResponse'- /experimental/operator/click:+ schema: {}+ /audio/stop:post:- operationId: server_click_element_handler- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/ClickElementRequest'- required: true+ tags: ['Audio Control']+ operationId: server_stop_audioresponses:'200':description: ''content:application/json:- schema:- $ref: '#/components/schemas/ActionResponse'- /experimental/operator/type:+ schema: {}+ /audio/device/start:post:- operationId: server_type_text_handler+ tags: ['Audio Control']+ operationId: server_start_audio_devicerequestBody:content:application/json:schema:- $ref: '#/components/schemas/TypeTextRequest'+ $ref: '#/components/schemas/AudioDeviceControlRequest'required: trueresponses:'200':@@ -663,143 +925,16 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/ActionResponse'- /experimental/operator/press-key:- post:- operationId: server_press_key_handler- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/PressKeyRequest'- required: true- responses:- '200':- description: ''- content:- application/json:- schema:- $ref: '#/components/schemas/PressKeyResponse'- /experimental/operator/get_text:- post:- operationId: server_get_text_handler- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/GetTextRequest'- required: true- responses:- '200':- description: ''- content:- application/json:- schema:- $ref: '#/components/schemas/GetTextResponse'- /experimental/operator/list-interactable-elements:- post:- operationId: server_list_interactable_elements_handler- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/ListInteractableElementsRequest'- required: true- responses:- '200':- description: ''- content:- application/json:- schema:- $ref: '#/components/schemas/ListInteractableElementsResponse'- /experimental/operator/click-by-index:- post:- operationId: server_click_by_index_handler- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/ClickByIndexRequest'- required: true- responses:- '200':- description: ''- content:- application/json:- schema:- $ref: '#/components/schemas/ClickByIndexResponse'- /experimental/operator/type-by-index:- post:- operationId: server_type_by_index_handler- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/TypeByIndexRequest'- required: true- responses:- '200':- description: ''- content:- application/json:- schema:- $ref: '#/components/schemas/TypeByIndexResponse'- /experimental/operator/press-key-by-index:- post:- operationId: server_press_key_by_index_handler- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/PressKeyByIndexRequest'- required: true- responses:- '200':- description: ''- content:- application/json:- schema:- $ref: '#/components/schemas/PressKeyByIndexResponse'- /experimental/operator/open-application:- post:- operationId: server_open_application_handler- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/OpenApplicationRequest'- required: true- responses:- '200':- description: ''- content:- application/json:- schema:- $ref: '#/components/schemas/OpenApplicationResponse'- /experimental/operator/open-url:- post:- operationId: server_open_url_handler- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/OpenUrlRequest'- required: true- responses:- '200':- description: ''- content:- application/json:- schema:- $ref: '#/components/schemas/OpenUrlResponse'- /experimental/input_control:+ $ref: '#/components/schemas/AudioDeviceControlResponse'+ /audio/device/stop:post:- operationId: server_input_control_handler+ tags: ['Audio Control']+ operationId: server_stop_audio_devicerequestBody:content:application/json:schema:- $ref: '#/components/schemas/InputControlRequest'+ $ref: '#/components/schemas/AudioDeviceControlRequest'required: trueresponses:'200':@@ -807,25 +942,7 @@ paths:content:application/json:schema:- $ref: '#/components/schemas/InputControlResponse'- /audio/start:- post:- operationId: server_start_audio- responses:- '200':- description: ''- content:- application/json:- schema: {}- /audio/stop:- post:- operationId: server_stop_audio- responses:- '200':- description: ''- content:- application/json:- schema: {}+ $ref: '#/components/schemas/AudioDeviceControlResponse'/pipes/build-status/{pipe_id}:get:@@ -918,38 +1035,7 @@ paths:application/json:schema:$ref: '#/components/schemas/EmbeddingResponse'- /audio/device/start:- post:- operationId: server_start_audio_device- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/AudioDeviceControlRequest'- required: true- responses:- '200':- description: ''- content:- application/json:- schema:- $ref: '#/components/schemas/AudioDeviceControlResponse'- /audio/device/stop:- post:- operationId: server_stop_audio_device- requestBody:- content:- application/json:- schema:- $ref: '#/components/schemas/AudioDeviceControlRequest'- required: true- responses:- '200':- description: ''- content:- application/json:- schema:- $ref: '#/components/schemas/AudioDeviceControlResponse'+components:schemas:ActionResponse:@@ -1514,587 +1600,245 @@ components:type: objectproperties:id:- nullable: true+ type: string+ title:type: stringrole:type: string- label:+ enabled:+ type: boolean+ attributes:nullable: true+ type: object+ additionalProperties: true+ required:+ - id+ - title+ - role+ - enabled+ ElementSelector:+ type: object+ properties:+ id:type: string- description:+ app:nullable: truetype: string- text:+ activateApp:nullable: true- type: string- position:- $ref: '#/components/schemas/ElementPosition'- size:- $ref: '#/components/schemas/ElementSize'- properties:- type: object+ type: booleanrequired:- id- - role- - label- - description- - text- - position- - size- - properties- ElementPosition:+ EmbeddingRequest:type: objectproperties:- x:- type: integer- y:- type: integer+ input:+ type: array+ items:+ type: stringrequired:- - x- - y- ElementSelector:+ - input+ EmbeddingResponse:type: objectproperties:- app_name:+ data:+ type: array+ items:+ type: object+ properties:+ embedding:+ type: array+ items:+ type: number+ index:+ type: integer+ object:+ type: string+ required:+ - embedding+ - index+ - object+ model:type: string- window_name:- nullable: true+ object:+ type: string+ usage:+ type: object+ properties:+ prompt_tokens:+ type: integer+ total_tokens:+ type: integer+ required:+ - prompt_tokens+ - total_tokens+ required:+ - data+ - model+ - object+ - usage+ FindElementsRequest:+ type: object+ properties:+ role:type: string- locator:+ app:+ nullable: truetype: string- use_background_apps:+ strict:nullable: truetype: boolean- activate_app:+ activateApp:nullable: truetype: booleanrequired:- - app_name- - window_name- - locator- - use_background_apps- - activate_app- ElementSize:+ - role+ FindElementsResponse:type: objectproperties:- width:- type: integer- height:- type: integer- required:- - width- - height- ElementStats:- type: object- properties:- total:- type: integer- definitely_interactable:- type: integer- sometimes_interactable:- type: integer- non_interactable:- type: integer- by_role:- type: object- additionalProperties:- type: integer- required:- - total- - definitely_interactable- - sometimes_interactable- - non_interactable- - by_role- EmbeddingData:- type: object- properties:- object:- type: string- embedding:- type: array- items:- type: number- index:- type: integer- required:- - object- - embedding- - index- EmbeddingInput:- oneOf:- - type: string- - type: array- items:- type: string- EmbeddingRequest:- type: object- properties:- model:- type: string- input:- $ref: '#/components/schemas/EmbeddingInput'- encoding_format:- type: string- user:- nullable: true- type: string- required:- - model- - input- - encoding_format- - user- EmbeddingResponse:- type: object- properties:- object:- type: string- data:+ elements:type: arrayitems:- $ref: '#/components/schemas/EmbeddingData'- model:- type: string- usage:- $ref: '#/components/schemas/Usage'- required:- - object- - data- - model- - usage- EventsQuery:- type: object- properties:- images:- nullable: true- type: boolean+ $ref: '#/components/schemas/ElementInfo'+ cache:+ $ref: '#/components/schemas/ElementCacheInfo'required:- - images- FindElementsRequest:+ - elements+ - cache+ GetTextRequest:type: objectproperties:selector:$ref: '#/components/schemas/ElementSelector'- max_results:- nullable: true- type: integer- max_depth:- nullable: true- type: integerrequired:- selector- - max_results- - max_depth- FindElementsResponse:- type: object- properties:- data:- type: array- items:- $ref: '#/components/schemas/ElementInfo'- required:- - data- FrameContent:- type: object- properties:- file_path:- type: string- timestamp:- nullable: true- type: string- format: date-time- app_name:- nullable: true- type: string- window_name:- nullable: true- type: string- ocr_results:- nullable: true- type: array- items:- $ref: '#/components/schemas/OCRResult'- tags:- nullable: true- type: array- items:- type: string- required:- - file_path- - timestamp- - app_name- - window_name- - ocr_results- - tags- FrameData:- type: object- properties:- frame_id:- type: integer- timestamp:- type: string- format: date-time- offset_index:- type: integer- ocr_entries:- type: array- items:- $ref: '#/components/schemas/OCREntry'- audio_entries:- type: array- items:- $ref: '#/components/schemas/AudioEntry'- required:- - frame_id- - timestamp- - offset_index- - ocr_entries- - audio_entries- GetSimilarSpeakersRequest:- type: object- properties:- speaker_id:- type: integer- limit:- type: integer- required:- - speaker_id- - limit- GetTextMetadata:- type: object- properties:- extraction_time_ms:- type: integer- element_count:- type: integer- app_name:- type: string- timestamp:- type: string- format: date-time- required:- - extraction_time_ms- - element_count- - app_name- - timestamp- GetTextRequest:- type: object- properties:- app_name:- type: string- window_name:- nullable: true- type: string- max_depth:- nullable: true- type: integer- use_background_apps:- nullable: true- type: boolean- activate_app:- nullable: true- type: boolean- required:- - app_name- - window_name- - max_depth- - use_background_apps- - activate_appGetTextResponse:type: objectproperties:- success:- type: booleantext:type: string- metadata:- $ref: '#/components/schemas/GetTextMetadata'required:- - success- text- - metadata- GetUnnamedSpeakersRequest:- type: object- properties:- limit:- type: integer- offset:- type: integer- speaker_ids:- nullable: true- type: array- items:- type: integer- required:- - limit- - offset- - speaker_idsHealthCheckResponse:type: objectproperties:status:type: string- status_code:- type: integer- last_frame_timestamp:- nullable: true- type: string- format: date-time- last_audio_timestamp:- nullable: true- type: string- format: date-time- last_ui_timestamp:- nullable: true- type: string- format: date-time- frame_status:- type: string- audio_status:- type: string- ui_status:- type: string- message:- type: string- verbose_instructions:- nullable: true- type: string- device_status_details:- nullable: true- type: stringrequired:- status- - status_code- - last_frame_timestamp- - last_audio_timestamp- - last_ui_timestamp- - frame_status- - audio_status- - ui_status- - message- - verbose_instructions- - device_status_details- InputAction:- oneOf:- - type: object- properties:- type:- type: string- enum:- - KeyPress- data:- type: string- required:- - type- - data- - type: object- properties:- type:- type: string- enum:- - MouseMove- data:- type: object- properties:- x:- type: integer- y:- type: integer- required:- - x- - y- required:- - type- - data- - type: object- properties:- type:- type: string- enum:- - MouseClick- data:- type: string- required:- - type- - data- - type: object- properties:- type:- type: string- enum:- - WriteText- data:- type: string- required:- - type- - dataInputControlRequest:type: objectproperties:- action:- $ref: '#/components/schemas/InputAction'- required:- - action- InputControlResponse:- type: object- properties:- success:- type: boolean- required:- - success- InteractableElement:- type: object- properties:- index:- type: integer- role:- type: string- interactability:+ type:type: string- text:+ key:+ nullable: truetype: string+ modifiers:+ nullable: true+ type: array+ items:+ type: stringposition:- $ref: '#/components/schemas/ElementPosition'- size:- $ref: '#/components/schemas/ElementSize'- element_id:+ nullable: true+ $ref: '#/components/schemas/Position'+ text:nullable: truetype: stringrequired:- - index- - role- - interactability- - text- - position- - size- - element_id- KeywordSearchRequest:+ - type+ InputControlResponse:type: objectproperties:- query:- type: string- limit:- type: integer- offset:- type: integer- start_time:- nullable: true- type: string- format: date-time- end_time:- nullable: true+ status:type: string- format: date-time- fuzzy_match:- type: boolean- order:- $ref: '#/components/schemas/Order'- app_names:- nullable: true- type: array- items:- type: stringrequired:- - query- - limit- - offset- - start_time- - end_time- - fuzzy_match- - order- - app_names+ - statusListDeviceResponse:type: objectproperties:+ id:+ type: integername:type: string- is_default:- type: boolean+ device_type:+ $ref: '#/components/schemas/DeviceType'+ device_control:+ $ref: '#/components/schemas/DeviceControl'required:+ - id- name- - is_default+ - device_type+ - device_controlListInteractableElementsRequest:type: objectproperties:- app_name:- type: string- window_name:+ app:nullable: truetype: string- with_text_only:- nullable: true- type: boolean- interactable_only:- nullable: true- type: boolean- include_sometimes_interactable:- nullable: true- type: boolean- max_elements:- nullable: true- type: integer- use_background_apps:- nullable: true- type: boolean- activate_app:- nullable: true- type: boolean- required:- - app_name- - window_name- - with_text_only- - interactable_only- - include_sometimes_interactable- - max_elements- - use_background_apps- - activate_app+ required: []ListInteractableElementsResponse:type: objectproperties:elements:type: arrayitems:- $ref: '#/components/schemas/InteractableElement'- stats:- $ref: '#/components/schemas/ElementStats'- cache_info:- $ref: '#/components/schemas/ElementCacheInfo'+ type: object+ properties:+ index:+ type: integer+ role:+ type: string+ title:+ type: string+ required:+ - index+ - role+ - titlerequired:- elements- - stats- - cache_infoMarkAsHallucinationRequest:type: objectproperties:- speaker_id:+ id:type: integerrequired:- - speaker_id+ - idMergeSpeakersRequest:type: objectproperties:- speaker_to_keep_id:+ source_id:type: integer- speaker_to_merge_id:+ target_id:type: integerrequired:- - speaker_to_keep_id- - speaker_to_merge_id+ - source_id+ - target_idMergeVideosRequest:type: objectproperties:- video_paths:+ frame_ids:type: arrayitems:- type: string+ type: integer+ output_path:+ nullable: true+ type: stringrequired:- - video_paths+ - frame_idsMergeVideosResponse:type: objectproperties:- video_path:+ success:+ type: boolean+ message:+ type: string+ output_path:type: stringrequired:- - video_path+ - success+ - message+ - output_pathMonitorInfo:type: objectproperties:@@ -2106,15 +1850,25 @@ components:type: integerheight:type: integer- is_default:+ recording:type: booleanrequired:- id- name- width- height- - is_default- OCRContent:+ - recording+ OCRResult:+ type: object+ properties:+ text:+ type: string+ confidence:+ type: number+ required:+ - text+ - confidence+ OCRSearchMatch:type: objectproperties:frame_id:@@ -2161,115 +1915,20 @@ components:- frame_name- browser_url- focused- OCREntry:- type: object- properties:- text:- type: string- app_name:- type: string- window_name:- type: string- device_name:- type: string- video_file_path:- type: string- required:- - text- - app_name- - window_name- - device_name- - video_file_path- OCRResult:- type: object- properties:- frame_id:- type: integer- frame_name:- type: string- ocr_text:- type: string- text_json:- type: string- timestamp:- type: string- format: date-time- file_path:- type: string- offset_index:- type: integer- app_name:- type: string- ocr_engine:- type: string- window_name:- type: string- tags:- type: array- items:- type: string- browser_url:- nullable: true- type: string- focused:- nullable: true- type: boolean- required:- - frame_id- - frame_name- - ocr_text- - text_json- - timestamp- - file_path- - offset_index- - app_name- - ocr_engine- - window_name- - tags- - browser_url- - focused- OcrEngine:- oneOf:- - type: object- properties:- Custom:- type: object- properties:- api_url:- type: string- api_key:- type: string- timeout_ms:- type: integer- required:- - api_url- - api_key- - timeout_ms- required:- - Custom- - type: string- enum:- - Unstructured- - Tesseract- - WindowsNative- - AppleNativeOpenApplicationRequest:type: objectproperties:- app_name:+ appName:type: stringrequired:- - app_name+ - appNameOpenApplicationResponse:type: objectproperties:success:type: boolean- message:- type: stringrequired:- success- - messageOpenUrlRequest:type: objectproperties:@@ -2280,55 +1939,44 @@ components:type: stringrequired:- url- - browserOpenUrlResponse:type: objectproperties:success:type: boolean- message:- type: stringrequired:- success- - messageOrder:type: stringenum:- - ascending- - descending- PaginationInfo:+ - timestamp_asc+ - timestamp_desc+ - relevance+ Position:type: objectproperties:- limit:- type: integer- offset:- type: integer- total:- type: integer- required:- - limit- - offset- - total- PaginationQuery:- type: object- properties:- limit:+ x:type: integer- offset:+ y:type: integerrequired:- - limit- - offset+ - x+ - yPressKeyByIndexRequest:type: objectproperties:element_index:type: integer- key_combo:+ key:type: string+ modifiers:+ nullable: true+ type: array+ items:+ type: stringrequired:- element_index- - key_combo+ - keyPressKeyByIndexResponse:type: objectproperties:@@ -2344,11 +1992,16 @@ components:properties:selector:$ref: '#/components/schemas/ElementSelector'- key_combo:+ key:type: string+ modifiers:+ nullable: true+ type: array+ items:+ type: stringrequired:- selector- - key_combo+ - keyPressKeyResponse:type: objectproperties:@@ -2361,6 +2014,11 @@ components:- messagePurgePipeRequest:type: object+ properties:+ pipe_id:+ type: string+ required:+ - pipe_idRawSqlQuery:type: objectproperties:@@ -2399,7 +2057,7 @@ components:direction:type: stringamount:- type: number+ type: integerrequired:- selector- direction@@ -2417,35 +2075,25 @@ components:SearchMatch:type: objectproperties:- frame_id:+ id:type: integertimestamp:type: stringformat: date-time- text_positions:- type: array- items:- $ref: '#/components/schemas/TextPosition'- app_name:- type: string- window_name:- type: string- confidence:- type: number- text:+ snippet:type: string- url:+ app_name:+ nullable: truetype: string+ score:+ type: numberrequired:- - frame_id+ - id- timestamp- - text_positions+ - snippet- app_name- - window_name- - confidence- - text- - url- SearchQuery:+ - score+ SearchRequest:type: objectproperties:q:@@ -2490,270 +2138,34 @@ components:focused:nullable: truetype: boolean- browser_url:- nullable: true- type: stringrequired:- - q- limit- offset- content_type- - start_time- - end_time- - app_name- - window_name- - frame_name- include_frames- - min_length- - max_length- - speaker_ids- - focused- - browser_urlSearchResponse:type: objectproperties:- data:+ results:type: arrayitems:$ref: '#/components/schemas/ContentItem'- pagination:- $ref: '#/components/schemas/PaginationInfo'- required:- - data- - pagination- SearchResult:- oneOf:- - type: object- properties:- OCR:- type: object- properties:- frame_id:- type: integer- frame_name:- type: string- ocr_text:- type: string- text_json:- type: string- timestamp:- type: string- format: date-time- file_path:- type: string- offset_index:- type: integer- app_name:- type: string- ocr_engine:- type: string- window_name:- type: string- tags:- type: array- items:- type: string- browser_url:- nullable: true- type: string- focused:- nullable: true- type: boolean- required:- - frame_id- - frame_name- - ocr_text- - text_json- - timestamp- - file_path- - offset_index- - app_name- - ocr_engine- - window_name- - tags- - browser_url- - focused- required:- - OCR- - type: object- properties:- Audio:- type: object- properties:- audio_chunk_id:- type: integer- transcription:- type: string- timestamp:- type: string- format: date-time- file_path:- type: string- offset_index:- type: integer- transcription_engine:- type: string- tags:- type: array- items:- type: string- device_name:- type: string- device_type:- $ref: '#/components/schemas/DeviceType'- speaker:- $ref: '#/components/schemas/Speaker'- start_time:- nullable: true- type: number- end_time:- nullable: true- type: number- required:- - audio_chunk_id- - transcription- - timestamp- - file_path- - offset_index- - transcription_engine- - tags- - device_name- - device_type- - speaker- - start_time- - end_time- required:- - Audio- - type: object- properties:- UI:- type: object- properties:- id:- type: integer- text:- type: string- timestamp:- type: string- format: date-time- app_name:- type: string- window_name:- type: string- initial_traversal_at:- nullable: true- type: string- format: date-time- file_path:- type: string- offset_index:- type: integer- frame_name:- nullable: true- type: string- browser_url:- nullable: true- type: string- required:- - id- - text- - timestamp- - app_name- - window_name- - initial_traversal_at- - file_path- - offset_index- - frame_name- - browser_url- required:- - UI- SearchSpeakersRequest:- type: object- properties:- name:- nullable: true- type: string- required:- - name- SemanticSearchQuery:- type: object- properties:- text:- type: string- limit:- nullable: true+ total:type: integer- threshold:- nullable: true- type: numberrequired:- - text- - limit- - threshold+ - results+ - totalSpeaker:type: objectproperties:id:type: integername:- type: string- metadata:+ nullable: truetype: stringrequired:- id- name- - metadata- TagContentType:- type: string- enum:- - vision- - audio- TextBounds:- type: object- properties:- left:- type: number- top:- type: number- width:- type: number- height:- type: number- required:- - left- - top- - width- - height- TextPosition:- type: object- properties:- text:- type: string- confidence:- type: number- bounds:- $ref: '#/components/schemas/TextBounds'- required:- - text- - confidence- - bounds- TimeSeriesChunk:- type: object- properties:- frames:- type: array- items:- $ref: '#/components/schemas/FrameData'- start_time:- type: string- format: date-time- end_time:- type: string- format: date-time- required:- - frames- - start_time- - end_timeTypeByIndexRequest:type: objectproperties:@@ -2784,7 +2196,7 @@ components:required:- selector- text- UiContent:+ UIResult:type: objectproperties:id:@@ -2838,99 +2250,53 @@ components:properties:pipe_id:type: string- source:+ version:type: stringrequired:- pipe_id- - source+ - versionUpdateSpeakerRequest:type: objectproperties:id:type: integername:- nullable: true- type: string- metadata:- nullable: truetype: stringrequired:- id- name- - metadata- Usage:- type: object- properties:- prompt_tokens:- type: integer- total_tokens:- type: integer- required:- - prompt_tokens- - total_tokens- ValidateMediaParams:- type: object- properties:- file_path:- type: string- required:- - file_path- VideoMetadata:- type: object- properties:- creation_time:- type: string- format: date-time- fps:- type: number- duration:- type: number- device_name:- nullable: true- type: string- name:- nullable: true- type: string- required:- - creation_time- - fps- - duration- - device_name- - name- VisionDeviceControlRequest:- type: object- properties:- device_id:- type: integer- required:- - device_id+parameters:ContentTypeParam:name: content_type+ description: Type of contentschema:type: string+ enum:+ - ocr+ - audio+ - ui+ in: path+ required: true+ FrameIdParam:+ name: frame_id+ description: ID of the frame+ schema:+ type: integerin: pathrequired: true- style: simpleIdParam:name: id+ description: ID of the content itemschema:type: integerin: pathrequired: true- style: simplePipeIdParam:name: pipe_id+ description: ID of the pipeschema:type: stringin: pathrequired: true- style: simple- FrameIdParam:- name: frame_id- schema:- type: integer- in: path- required: true- style: simplediff --git a/content/docs-mintlify-mig-tmp/operator-api.mdx b/content/docs-mintlify-mig-tmp/operator-api.mdxnew file mode 100644index 000000000..8b302d4e8--- /dev/null+++ b/content/docs-mintlify-mig-tmp/operator-api.mdx@@ -0,0 +1,359 @@+# operator api++the operator api allows for powerful desktop automation using accessibility roles and elements. it provides a robust way to interact with applications programmatically.++<Note>+ <strong>compatibility note:</strong> operator api currently works on macos only. on windows/linux, please use the <a href="/sdk-reference#input-control-api">input control api</a> instead.+</Note>++to understand roles better, open the macos accessibility inspector and examine the roles for any application.++## installation++<Tabs>+ <Tab title="npm">+ ```bash+ npm install @screenpipe/browser+ ```+ </Tab>+ <Tab title="pnpm">+ ```bash+ pnpm add @screenpipe/browser+ ```+ </Tab>+ <Tab title="bun">+ ```bash+ bun add @screenpipe/browser+ ```+ </Tab>+ <Tab title="yarn">+ ```bash+ yarn add @screenpipe/browser+ ```+ </Tab>+</Tabs>++this also works in node.js using `@screenpipe/js`++## basic usage++```typescript+import { pipe } from '@screenpipe/browser'++async function simpleAutomation() {+ try {+ // open an application+ await pipe.operator.openApplication("Chrome")++ // navigate to a website+ await pipe.operator.openUrl("https://github.com/mediar-ai/screenpipe")++ // find search fields by role+ const searchFields = await pipe.operator+ .getByRole("searchfield", {+ app: "Chrome",+ activateApp: true+ })+ .all(3)++ if (searchFields.length > 0) {+ // fill the search field+ await pipe.operator+ .getById(searchFields[0].id, { app: "Chrome" })+ .fill("automation")++ // click a button+ const buttons = await pipe.operator+ .getByRole("button", { app: "Chrome" })+ .all(5)++ if (buttons.length > 0) {+ await pipe.operator+ .getById(buttons[0].id, { app: "Chrome" })+ .click()+ }++ // scroll page content+ await pipe.operator+ .getById(searchFields[0].id, { app: "Chrome" })+ .scroll("down", 300)+ }+ } catch (error) {+ console.error("automation failed:", error)+ }+}+```++## core methods++the operator api provides a set of intuitive methods for automating desktop interactions:++| method | description | example |+|--------|-------------|---------|+| `openApplication(name)` | launches an application | `pipe.operator.openApplication("Chrome")` |+| `openUrl(url, browser?)` | opens a url in a browser | `pipe.operator.openUrl("github.com")` |+| `getByRole(role, options)` | finds elements by accessibility role | `pipe.operator.getByRole("button", {app: "Chrome"})` |+| `getById(id, options)` | gets element by id | `pipe.operator.getById("element-123", {app: "Chrome"})` |+| `.click()` | clicks an element | `pipe.operator.getById(id).click()` |+| `.fill(text)` | enters text in a field | `pipe.operator.getById(id).fill("hello")` |+| `.scroll(direction, amount)` | scrolls an element | `pipe.operator.getById(id).scroll("down", 300)` |++## common accessibility roles++when using `getByRole()`, you'll need to specify the accessibility role. here are common ones:++- `"button"` - clickable buttons+- `"textfield"` - text input fields+- `"searchfield"` - search input fields+- `"checkbox"` - checkbox elements+- `"radiobutton"` - radio button elements+- `"combobox"` - dropdown menus+- `"link"` - hyperlinks+- `"image"` - images+- `"statictext"` - text labels+- `"scrollarea"` - scrollable containers++## advanced usage examples++### automating form filling++```typescript+async function fillContactForm() {+ // open the app and navigate to form+ await pipe.operator.openApplication("Chrome")+ await pipe.operator.openUrl("https://example.com/contact")++ // wait for page to load (simple delay)+ await new Promise(resolve => setTimeout(resolve, 2000))++ // find form fields+ const nameField = await pipe.operator+ .getByRole("textfield", {+ app: "Chrome",+ activateApp: true+ })+ .first()++ const emailField = await pipe.operator+ .getByRole("textfield", {+ app: "Chrome"+ })+ .first()++ const messageField = await pipe.operator+ .getByRole("textfield", {+ app: "Chrome"+ })+ .first()++ // fill the form+ await pipe.operator+ .getById(nameField.id, { app: "Chrome" })+ .fill("john doe")++ await pipe.operator+ .getById(emailField.id, { app: "Chrome" })+ .fill("[email protected]")++ await pipe.operator+ .getById(messageField.id, { app: "Chrome" })+ .fill("this is an automated message from screenpipe!")++ // find and click submit button+ const submitButton = await pipe.operator+ .getByRole("button", {+ app: "Chrome"+ })+ .first()++ await pipe.operator+ .getById(submitButton.id, { app: "Chrome" })+ .click()+}+```++### automating app workflows++```typescript+async function processImages() {+ // open photoshop+ await pipe.operator.openApplication("Adobe Photoshop")+ await new Promise(resolve => setTimeout(resolve, 3000)) // wait for app to launch++ // open file+ await pipe.operator+ .getByRole("menuitem", {+ app: "Adobe Photoshop"+ })+ .first()+ .then(menu => pipe.operator.getById(menu.id, { app: "Adobe Photoshop" }).click())++ await pipe.operator+ .getByRole("menuitem", {+ app: "Adobe Photoshop"+ })+ .first()+ .then(menu => pipe.operator.getById(menu.id, { app: "Adobe Photoshop" }).click())++ // navigate file picker (simplified)+ // in practice, you'd need more complex logic to navigate the file picker++ // apply filter+ await pipe.operator+ .getByRole("menuitem", {+ app: "Adobe Photoshop"+ })+ .first()+ .then(menu => pipe.operator.getById(menu.id, { app: "Adobe Photoshop" }).click())++ // and so on...+}+```++## ai-powered automation++for more powerful automation, combine the operator api with vercel ai sdk to enable ai-driven desktop interactions:++```typescript+import { useState } from "react"+import { streamText, convertToCoreMessages } from "ai"+import { createOpenAI } from "@ai-sdk/openai"+import { pipe } from "@screenpipe/browser"+import { z } from "zod"++export function AIAutomationAgent() {+ const [input, setInput] = useState("")+ const [output, setOutput] = useState("")++ const handleSubmit = async (e) => {+ e.preventDefault()+ setOutput("")++ const model = createOpenAI({+ apiKey: process.env.OPENAI_API_KEY+ })("gpt-4o")++ const result = streamText({+ model,+ messages: convertToCoreMessages([{+ role: "user",+ content: input+ }]),+ system: "you are a desktop automation assistant. help users by performing actions on their computer.",+ tools: {+ openApplication: {+ description: "open an application",+ parameters: z.object({+ appName: z.string().describe("the name of the application to open")+ }),+ execute: async ({ appName }) => {+ const success = await pipe.operator.openApplication(appName)+ return success+ ? `opened ${appName} successfully`+ : `failed to open ${appName}`+ }+ },++ openUrl: {+ description: "open a url in a browser",+ parameters: z.object({+ url: z.string().describe("the url to open"),+ browser: z.string().optional().describe("the browser to use")+ }),+ execute: async ({ url, browser }) => {+ const success = await pipe.operator.openUrl(url, browser)+ return success+ ? `opened ${url} in ${browser || "default browser"}`+ : `failed to open ${url}`+ }+ },++ findAndClick: {+ description: "find an element by role and click it",+ parameters: z.object({+ app: z.string().describe("the application name"),+ role: z.string().describe("the accessibility role of the element")+ }),+ execute: async ({ app, role }) => {+ try {+ const elements = await pipe.operator+ .getByRole(role, { app, activateApp: true })+ .all(5)++ if (elements.length > 0) {+ await pipe.operator+ .getById(elements[0].id, { app })+ .click()+ return `clicked ${role} element in ${app}`+ }+ return `no ${role} elements found in ${app}`+ } catch (error) {+ return `error: ${error.message}`+ }+ }+ },++ fillText: {+ description: "fill text in a form field",+ parameters: z.object({+ app: z.string().describe("the application name"),+ role: z.string().describe("the role of the element to fill"),+ text: z.string().describe("the text to enter")+ }),+ execute: async ({ app, role, text }) => {+ try {+ const elements = await pipe.operator+ .getByRole(role, { app, activateApp: true })+ .all(5)++ if (elements.length > 0) {+ await pipe.operator+ .getById(elements[0].id, { app })+ .fill(text)+ return `filled text in ${role} element in ${app}`+ }+ return `no ${role} elements found in ${app}`+ } catch (error) {+ return `error: ${error.message}`+ }+ }+ }+ },+ toolCallStreaming: true,+ maxSteps: 5+ })++ for await (const chunk of result.textStream) {+ setOutput(prev => prev + chunk)+ }+ }++ return (+ <div>+ <form onSubmit={handleSubmit}>+ <input+ value={input}+ onChange={e => setInput(e.target.value)}+ placeholder="e.g., 'open chrome and go to github'"+ />+ <button type="submit">run</button>+ </form>+ <div>{output}</div>+ </div>+ )+}+```++for a complete implementation with automatic tool selection, see the [hello-world-computer-use](https://github.com/mediar-ai/screenpipe/blob/main/pipes/hello-world-computer-use/components/chat.tsx) example pipe.++## troubleshooting++if you're having issues with the operator api:++1. **macos permissions**: ensure screenpipe has accessibility permissions in system settings > privacy & security > accessibility+2. **app names**: use exact app names as they appear in the applications folder+3. **timing issues**: add delays between operations, as ui elements may take time to load+4. **debugging**: log element ids and roles to help identify the right elements+5. **app focus**: use the `activateApp: true` option to ensure the target app is in focus++for more detailed debugging, use the macos accessibility inspector to identify exact roles and properties of ui elements.diff --git a/content/docs-mintlify-mig-tmp/plugins.mdx b/content/docs-mintlify-mig-tmp/plugins.mdxindex afd3c61af..6bf099186 100644--- a/content/docs-mintlify-mig-tmp/plugins.mdx+++ b/content/docs-mintlify-mig-tmp/plugins.mdx@@ -1,4 +1,3 @@-import { Tabs, Tab } from 'nextra/components'# plugins (pipes)@@ -121,4 +120,4 @@ paste these links into your Cursor chat for context:- <https://github.com/mediar-ai/screenpipe/blob/main/pipes/search/src/components/search-chat.tsx>- <https://github.com/mediar-ai/screenpipe/blob/main/pipes/rewind/src/lib/hooks/use-app-name-suggestion.tsx>- <https://github.com/mediar-ai/screenpipe/blob/main/screenpipe-server/src/server.rs>-- <https://github.com/mediar-ai/screenpipe/blob/main/screenpipe-core/src/pipes.rs>\ No newline at end of file+- <https://github.com/mediar-ai/screenpipe/blob/main/screenpipe-core/src/pipes.rs>diff --git a/content/docs-mintlify-mig-tmp/sdk-reference.mdx b/content/docs-mintlify-mig-tmp/sdk-reference.mdxindex 6f29cc4cb..827ae0dad 100644--- a/content/docs-mintlify-mig-tmp/sdk-reference.mdx+++ b/content/docs-mintlify-mig-tmp/sdk-reference.mdx@@ -783,11 +783,9 @@ async function streamMeetingInsights(settings: Settings) {check out our [production pipe examples](https://github.com/mediar-ai/screenpipe/tree/main/pipes) on github to see more ai integration patterns.--### operator api-the operator api allows for more powerful desktop automation using accessibility roles and elements. it provides a robust way to interact with applications programmatically.+for detailed information about using the operator api for desktop automation, see the dedicated [operator api](/operator-api) page.OPERATOR ONLY WORKS ON MACOS FOR NOW - screenpipe backend need to be running also@@ -795,201 +793,6 @@ on Windows/Linux, please use the [input control api](#input-control-api) insteadto understand better roles, feel free to open MacOS Accessibility Inspector and see the roles for any application.-```typescript-import { pipe } from '@screenpipe/browser'--async function simpleAutomation() {- try {- // open an application- await pipe.operator.openApplication("Chrome")-- // navigate to a website- await pipe.operator.openUrl("https://github.com/mediar-ai/screenpipe")-- // find search fields by role- const searchFields = await pipe.operator- .getByRole("searchfield", {- app: "Chrome",- activateApp: true- })- .all(3)-- if (searchFields.length > 0) {- // fill the search field- await pipe.operator- .getById(searchFields[0].id, { app: "Chrome" })- .fill("automation")-- // click a button- const buttons = await pipe.operator- .getByRole("button", { app: "Chrome" })- .all(5)-- if (buttons.length > 0) {- await pipe.operator- .getById(buttons[0].id, { app: "Chrome" })- .click()- }-- // scroll page content- await pipe.operator- .getById(searchFields[0].id, { app: "Chrome" })- .scroll("down", 300)- }- } catch (error) {- console.error("automation failed:", error)- }-}-```--#### core operator methods--| method | description | example |-|--------|-------------|---------|-| `openApplication(name)` | launches an application | `pipe.operator.openApplication("Chrome")` |-| `openUrl(url, browser?)` | opens a url in a browser | `pipe.operator.openUrl("github.com")` |-| `getByRole(role, options)` | finds elements by accessibility role | `pipe.operator.getByRole("button", {app: "Chrome"})` |-| `getById(id, options)` | gets element by id | `pipe.operator.getById("element-123", {app: "Chrome"})` |-| `.click()` | clicks an element | `pipe.operator.getById(id).click()` |-| `.fill(text)` | enters text in a field | `pipe.operator.getById(id).fill("hello")` |-| `.scroll(direction, amount)` | scrolls an element | `pipe.operator.getById(id).scroll("down", 300)` |--#### using operator api with vercel ai sdk--for more powerful automation, combine the operator api with vercel ai sdk to enable ai-driven desktop interactions:--```typescript-import { useState } from "react"-import { streamText, convertToCoreMessages } from "ai"-import { createOpenAI } from "@ai-sdk/openai"-import { pipe } from "@screenpipe/browser"-import { z } from "zod"--export function AIAutomationAgent() {- const [input, setInput] = useState("")- const [output, setOutput] = useState("")-- const handleSubmit = async (e) => {- e.preventDefault()- setOutput("")-- const model = createOpenAI({- apiKey: process.env.OPENAI_API_KEY- })("gpt-4o")-- const result = streamText({- model,- messages: convertToCoreMessages([{- role: "user",- content: input- }]),- system: "you are a desktop automation assistant. help users by performing actions on their computer.",- tools: {- openApplication: {- description: "open an application",- parameters: z.object({- appName: z.string().describe("the name of the application to open")- }),- execute: async ({ appName }) => {- const success = await pipe.operator.openApplication(appName)- return success- ? `opened ${appName} successfully`- : `failed to open ${appName}`- }- },-- openUrl: {- description: "open a url in a browser",- parameters: z.object({- url: z.string().describe("the url to open"),- browser: z.string().optional().describe("the browser to use")- }),- execute: async ({ url, browser }) => {- const success = await pipe.operator.openUrl(url, browser)- return success- ? `opened ${url} in ${browser || "default browser"}`- : `failed to open ${url}`- }- },-- findAndClick: {- description: "find an element by role and click it",- parameters: z.object({- app: z.string().describe("the application name"),- role: z.string().describe("the accessibility role of the element")- }),- execute: async ({ app, role }) => {- try {- const elements = await pipe.operator- .getByRole(role, { app, activateApp: true })- .all(5)-- if (elements.length > 0) {- await pipe.operator- .getById(elements[0].id, { app })- .click()- return `clicked ${role} element in ${app}`- }- return `no ${role} elements found in ${app}`- } catch (error) {- return `error: ${error.message}`- }- }- },-- fillText: {- description: "fill text in a form field",- parameters: z.object({- app: z.string().describe("the application name"),- role: z.string().describe("the role of the element to fill"),- text: z.string().describe("the text to enter")- }),- execute: async ({ app, role, text }) => {- try {- const elements = await pipe.operator- .getByRole(role, { app, activateApp: true })- .all(5)-- if (elements.length > 0) {- await pipe.operator- .getById(elements[0].id, { app })- .fill(text)- return `filled text in ${role} element in ${app}`- }- return `no ${role} elements found in ${app}`- } catch (error) {- return `error: ${error.message}`- }- }- }- },- toolCallStreaming: true,- maxSteps: 5- })-- for await (const chunk of result.textStream) {- setOutput(prev => prev + chunk)- }- }-- return (- <div>- <form onSubmit={handleSubmit}>- <input- value={input}- onChange={e => setInput(e.target.value)}- placeholder="e.g., 'open chrome and go to github'"- />- <button type="submit">run</button>- </form>- <div>{output}</div>- </div>- )-}-```--for a complete implementation with automatic tool selection, see the [hello-world-computer-use](https://github.com/mediar-ai/screenpipe/blob/main/pipes/hello-world-computer-use/components/chat.tsx) example pipe.-### input control apirequires building the backend with the `experimental` feature flag.