mirror of
https://github.com/actionbook/actionbook.git
synced 2026-09-19 03:28:06 +08:00
7061f9f637
- Optimize marketplace display metadata for CUE-569 - Use X-API-Key header instead of Authorization Bearer - Handle 403 for invalid API key - Migrate browser_create_session to provider credentials - Remove all zh_Hans entries from YAML files - Remove deprecated utils/api_key.py
86 lines
3.1 KiB
YAML
86 lines
3.1 KiB
YAML
identity:
|
|
name: browser_create_session
|
|
author: actionbook
|
|
label:
|
|
en_US: Browser Create Session
|
|
description:
|
|
human:
|
|
en_US: >
|
|
Start a cloud browser session via Hyperbrowser.
|
|
Returns a WebSocket endpoint (cdp_url) to pass to browser_operator,
|
|
and a session_id to use with browser_stop_session when finished.
|
|
llm: >
|
|
Start a cloud browser session. Returns ws_endpoint (use as cdp_url in
|
|
browser_operator) and session_id (use with browser_stop_session).
|
|
|
|
IMPORTANT: Always call browser_stop_session with the session_id when the
|
|
workflow is complete to release cloud resources and avoid unnecessary billing.
|
|
|
|
WHEN TO USE:
|
|
- Before any browser_operator call (navigate, click, snapshot, etc.)
|
|
- Use profile_id to persist cookies/login state across multiple Dify tool calls
|
|
|
|
WORKFLOW:
|
|
1. Call browser_create_session → store ws_endpoint and session_id in variables
|
|
2. Call browser_operator with session_id and cdp_url = ws_endpoint
|
|
3. Call browser_stop_session with session_id when the workflow is done
|
|
|
|
STATE PERSISTENCE (Hyperbrowser):
|
|
- Set profile_id to a stable string (e.g., "user-{userId}") to persist
|
|
browser state (cookies, localStorage) across separate Dify invocations.
|
|
- This allows login to persist between workflow runs without re-authenticating.
|
|
parameters:
|
|
- name: provider
|
|
type: select
|
|
required: false
|
|
default: hyperbrowser
|
|
options:
|
|
- value: hyperbrowser
|
|
label:
|
|
en_US: Hyperbrowser
|
|
label:
|
|
en_US: Provider
|
|
human_description:
|
|
en_US: Cloud browser provider. Hyperbrowser uses Profile-based persistence (no idle billing).
|
|
llm_description: >
|
|
Cloud browser provider. Use "hyperbrowser" (default and only supported provider).
|
|
form: form
|
|
- name: profile_id
|
|
type: string
|
|
required: false
|
|
label:
|
|
en_US: Profile ID (for state persistence)
|
|
human_description:
|
|
en_US: >
|
|
Optional stable identifier for browser profile persistence.
|
|
Use the same profile_id across multiple Dify calls to retain cookies
|
|
and login state. Example: "user-abc123" or "workflow-xyz".
|
|
Leave empty for a stateless ephemeral session.
|
|
llm_description: >
|
|
Optional profile identifier for persisting browser state (cookies, localStorage)
|
|
across separate Dify tool calls. Use a stable ID like "user-{userId}".
|
|
Omit for ephemeral sessions that don't need state persistence.
|
|
form: llm
|
|
- name: use_proxy
|
|
type: select
|
|
required: false
|
|
default: "false"
|
|
options:
|
|
- value: "false"
|
|
label:
|
|
en_US: "No"
|
|
- value: "true"
|
|
label:
|
|
en_US: "Yes (residential proxy)"
|
|
label:
|
|
en_US: Use Proxy
|
|
human_description:
|
|
en_US: Route through a residential proxy to bypass geo-restrictions or bot detection.
|
|
llm_description: >
|
|
Set to "true" to route through a residential proxy. Useful for geo-restricted
|
|
sites or when the target website uses bot detection.
|
|
form: form
|
|
extra:
|
|
python:
|
|
source: tools/browser_create_session.py
|