Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/zai-org/Open-AutoGLM
/ functions
Functions
223 in github.com/zai-org/Open-AutoGLM
⨍
Functions
223
◇
Types & classes
32
↓ 45 callers
Method
run
Run the agent to complete a task. Args: task: Natural language description of the task. Returns: Fi
phone_agent/agent.py:84
↓ 29 callers
Function
_run_hdc_command
Run HDC command with optional verbose output. Args: cmd: Command list to execute. **kwargs: Additional arguments for subproc
phone_agent/hdc/connection.py:17
↓ 12 callers
Function
get_device_factory
Get the global device factory instance. Returns: The device factory instance.
phone_agent/device_factory.py:157
↓ 12 callers
Function
get_messages
Get UI messages dictionary by language. Args: lang: Language code, 'cn' for Chinese, 'en' for English. Returns: Diction
phone_agent/config/i18n.py:54
↓ 8 callers
Function
_get_adb_prefix
Get ADB command prefix with optional device specifier.
phone_agent/adb/device.py:248
↓ 8 callers
Function
_get_hdc_prefix
Get HDC command prefix with optional device specifier.
phone_agent/hdc/device.py:303
↓ 7 callers
Function
_get_wda_session_url
Get the correct WDA URL for a session endpoint. Args: wda_url: Base WDA URL. session_id: Optional session ID. endpoi
phone_agent/xctest/device.py:11
↓ 6 callers
Function
_get_wda_session_url
Get the correct WDA URL for a session endpoint. Args: wda_url: Base WDA URL. session_id: Optional session ID. endpoi
phone_agent/xctest/input.py:6
↓ 6 callers
Method
is_wda_ready
Check if WebDriverAgent is running and accessible. Args: timeout: Request timeout in seconds. Returns:
phone_agent/xctest/connection.py:196
↓ 5 callers
Method
_convert_relative_to_absolute
Convert relative coordinates (0-1000) to absolute pixels.
phone_agent/actions/handler_ios.py:118
↓ 5 callers
Method
_convert_relative_to_absolute
Convert relative coordinates (0-1000) to absolute pixels.
phone_agent/actions/handler.py:110
↓ 4 callers
Function
_get_adb_prefix
Get ADB command prefix with optional device specifier.
phone_agent/adb/input.py:105
↓ 4 callers
Function
_get_hdc_prefix
Get HDC command prefix with optional device specifier.
phone_agent/hdc/input.py:145
↓ 4 callers
Method
build_screen_info
Build screen info string for the model. Args: current_app: Current app name. **extra_info: Additional info t
phone_agent/model/client.py:278
↓ 4 callers
Method
create_user_message
Create a user message with optional image. Args: text: Text content. image_base64: Optional base64-encoded i
phone_agent/model/client.py:228
↓ 4 callers
Method
execute
Execute an action from the AI model. Args: action: The action dictionary from the model. screen_width: Curre
phone_agent/actions/handler.py:45
↓ 4 callers
Function
finish
Helper function for creating 'finish' actions.
phone_agent/actions/handler.py:396
↓ 4 callers
Function
get_message
Get a single UI message by key and language. Args: key: Message key. lang: Language code, 'cn' for Chinese, 'en' for English
phone_agent/config/i18n.py:69
↓ 4 callers
Method
get_wda_status
Get WebDriverAgent status information. Returns: Status dictionary or None if not available.
phone_agent/xctest/connection.py:255
↓ 4 callers
Method
list_devices
List all connected devices. Returns: List of DeviceInfo objects.
phone_agent/hdc/connection.py:165
↓ 3 callers
Function
_create_fallback_screenshot
Create a black fallback image when screenshot fails.
phone_agent/hdc/screenshot.py:111
↓ 3 callers
Function
_create_fallback_screenshot
Create a black fallback image when screenshot fails.
phone_agent/adb/screenshot.py:95
↓ 3 callers
Method
_execute_step
Execute a single step of the agent loop.
phone_agent/agent_ios.py:154
↓ 3 callers
Method
_execute_step
Execute a single step of the agent loop.
phone_agent/agent.py:136
↓ 3 callers
Function
list_devices
Quick helper to list connected iOS devices. Returns: List of DeviceInfo objects.
phone_agent/xctest/connection.py:374
↓ 3 callers
Method
list_devices
List all connected iOS devices. Returns: List of DeviceInfo objects. Note: Requires libimobiledevic
phone_agent/xctest/connection.py:57
↓ 3 callers
Method
list_devices
List all connected devices. Returns: List of DeviceInfo objects.
phone_agent/adb/connection.py:120
↓ 2 callers
Method
connect
Connect to a remote device via TCP/IP. Args: address: Device address in format "host:port" (e.g., "192.168.1.100:5555").
phone_agent/hdc/connection.py:91
↓ 2 callers
Method
connect
Connect to a remote device via TCP/IP. Args: address: Device address in format "host:port" (e.g., "192.168.1.100:5555").
phone_agent/adb/connection.py:56
↓ 2 callers
Method
create_assistant_message
Create an assistant message.
phone_agent/model/client.py:256
↓ 2 callers
Method
create_system_message
Create a system message.
phone_agent/model/client.py:223
↓ 2 callers
Method
disconnect
Disconnect from a remote device. Args: address: Device address to disconnect. If None, disconnects all. Returns
phone_agent/hdc/connection.py:131
↓ 2 callers
Function
get_screenshot
Capture a screenshot from the connected iOS device. Args: wda_url: WebDriverAgent URL. session_id: Optional WDA session ID.
phone_agent/xctest/screenshot.py:24
↓ 2 callers
Function
get_system_prompt
Get system prompt by language. Args: lang: Language code, 'cn' for Chinese, 'en' for English. Returns: System prompt st
phone_agent/config/__init__.py:19
↓ 2 callers
Method
list_devices
List connected devices.
phone_agent/device_factory.py:124
↓ 2 callers
Method
pair_device
Pair with an iOS device (required for some operations). Args: device_id: Device UDID. If None, uses first available devi
phone_agent/xctest/connection.py:274
↓ 2 callers
Function
parse_action
Parse action from model response. Args: response: Raw response string from the model. Returns: Parsed action dictionary
phone_agent/actions/handler.py:332
↓ 2 callers
Method
remove_images_from_message
Remove image content from a message to save context space. Args: message: Message dictionary. Returns:
phone_agent/model/client.py:261
↓ 2 callers
Method
request
Send a request to the model. Args: messages: List of message dictionaries in OpenAI format. Returns:
phone_agent/model/client.py:53
↓ 2 callers
Method
reset
Reset the agent state for a new task.
phone_agent/agent.py:131
↓ 2 callers
Method
run
Run the agent to complete a task. Args: task: Natural language description of the task. Returns: Fi
phone_agent/agent_ios.py:102
↓ 2 callers
Method
step
Execute a single step of the agent. Useful for manual control or debugging. Args: task: Task description (only
phone_agent/agent.py:112
↓ 2 callers
Function
type_text
Type text into the currently focused input field using ADB Keyboard. Args: text: The text to type. device_id: Optional ADB d
phone_agent/adb/input.py:8
↓ 1 callers
Function
_clear_with_backspace
Clear text by sending backspace keys. Args: wda_url: WebDriverAgent URL. session_id: Optional WDA session ID. max_ba
phone_agent/xctest/input.py:106
↓ 1 callers
Function
_create_fallback_screenshot
Create a black fallback image when screenshot fails. Args: is_sensitive: Whether the failure was due to sensitive content. Retu
phone_agent/xctest/screenshot.py:159
↓ 1 callers
Function
_get_adb_prefix
Get ADB command prefix with optional device specifier.
phone_agent/adb/screenshot.py:88
↓ 1 callers
Method
_get_device_details
Get detailed information about a specific device. Args: udid: Device UDID. Returns: Dictionary with
phone_agent/xctest/connection.py:115
↓ 1 callers
Method
_get_handler
Get the handler method for an action.
phone_agent/actions/handler_ios.py:98
↓ 1 callers
Method
_get_handler
Get the handler method for an action.
phone_agent/actions/handler.py:90
↓ 1 callers
Function
_get_hdc_prefix
Get HDC command prefix with optional device specifier.
phone_agent/hdc/screenshot.py:104
↓ 1 callers
Function
_get_screenshot_idevice
Capture screenshot using idevicescreenshot (libimobiledevice). Args: device_id: Optional device UDID. timeout: Timeout in se
phone_agent/xctest/screenshot.py:106
↓ 1 callers
Function
_get_screenshot_wda
Capture screenshot using WebDriverAgent. Args: wda_url: WebDriverAgent URL. session_id: Optional WDA session ID. tim
phone_agent/xctest/screenshot.py:60
↓ 1 callers
Method
_parse_response
Parse the model response into thinking and action parts. Parsing rules: 1. If content contains 'finish(message=', everything
phone_agent/model/client.py:176
↓ 1 callers
Function
back
Navigate back (swipe from left edge). Args: wda_url: WebDriverAgent URL. session_id: Optional WDA session ID. delay:
phone_agent/xctest/device.py:284
↓ 1 callers
Method
back
Press back button.
phone_agent/device_factory.py:94
↓ 1 callers
Function
check_model_api
Check if the model API is accessible and the specified model exists. Checks: 1. Network connectivity to the API endpoint 2. Model ex
main.py:272
↓ 1 callers
Function
check_system_requirements
Check system requirements before running the agent. Checks: 1. libimobiledevice tools installed 2. At least one iOS device connected
ios.py:31
↓ 1 callers
Function
check_system_requirements
Check system requirements before running the agent. Checks: 1. ADB/HDC/iOS tools installed 2. At least one device connected 3. A
main.py:37
↓ 1 callers
Function
clear_text
Clear text in the currently focused input field. Args: device_id: Optional ADB device ID for multi-device setups.
phone_agent/adb/input.py:40
↓ 1 callers
Method
clear_text
Clear text.
phone_agent/device_factory.py:112
↓ 1 callers
Method
detect_and_set_adb_keyboard
Detect and set keyboard.
phone_agent/device_factory.py:116
↓ 1 callers
Method
disconnect
Disconnect from a remote device. Args: address: Device address to disconnect. If None, disconnects all. Returns
phone_agent/adb/connection.py:97
↓ 1 callers
Function
double_tap
Double tap at the specified coordinates using WebDriver W3C Actions API. Args: x: X coordinate. y: Y coordinate. wda
phone_agent/xctest/device.py:124
↓ 1 callers
Method
double_tap
Double tap at coordinates.
phone_agent/device_factory.py:62
↓ 1 callers
Method
enable_tcpip
Enable TCP/IP debugging on a USB-connected device. This allows subsequent wireless connections to the device. Args:
phone_agent/hdc/connection.py:256
↓ 1 callers
Function
example_basic_task
Basic task example / 基础任务示例
examples/basic_usage.py:15
↓ 1 callers
Function
get_bundle_id
Get the iOS bundle ID for an app. Args: app_name: The display name of the app. Returns: The iOS bundle ID, or None if n
phone_agent/config/apps_ios.py:204
↓ 1 callers
Method
get_connection_class
Get the connection class (ADBConnection or HDCConnection).
phone_agent/device_factory.py:128
↓ 1 callers
Function
get_current_app
Get the currently focused app name. Args: device_id: Optional HDC device ID for multi-device setups. Returns: The app n
phone_agent/hdc/device.py:13
↓ 1 callers
Function
get_current_app
Get the currently active app bundle ID and name. Args: wda_url: WebDriverAgent URL. session_id: Optional WDA session ID.
phone_agent/xctest/device.py:31
↓ 1 callers
Method
get_current_app
Get current app name.
phone_agent/device_factory.py:52
↓ 1 callers
Method
get_device_ip
Get the IP address of a connected device. Args: device_id: Device ID. If None, uses first available device. Ret
phone_agent/hdc/connection.py:294
↓ 1 callers
Method
get_screenshot
Get screenshot from device.
phone_agent/device_factory.py:48
↓ 1 callers
Function
handle_device_commands
Handle iOS device-related commands. Returns: True if a device command was handled (should exit), False otherwise.
ios.py:371
↓ 1 callers
Function
handle_device_commands
Handle device-related commands. Returns: True if a device command was handled (should exit), False otherwise.
main.py:602
↓ 1 callers
Function
handle_ios_device_commands
Handle iOS device-related commands. Returns: True if a device command was handled (should exit), False otherwise.
main.py:527
↓ 1 callers
Function
hide_keyboard
Hide the on-screen keyboard. Args: wda_url: WebDriverAgent URL. session_id: Optional WDA session ID.
phone_agent/xctest/input.py:184
↓ 1 callers
Function
home
Press the home button. Args: wda_url: WebDriverAgent URL. session_id: Optional WDA session ID. delay: Delay in secon
phone_agent/xctest/device.py:325
↓ 1 callers
Method
home
Press home button.
phone_agent/device_factory.py:98
↓ 1 callers
Method
is_connected
Check if a device is connected. Args: device_id: Device UDID to check. If None, checks if any device is connected.
phone_agent/xctest/connection.py:176
↓ 1 callers
Function
launch_app
Launch an app by name. Args: app_name: The app name (must be in APP_PACKAGES). wda_url: WebDriverAgent URL. session_
phone_agent/xctest/device.py:353
↓ 1 callers
Method
launch_app
Launch an app.
phone_agent/device_factory.py:102
↓ 1 callers
Function
list_supported_apps
Get a list of all supported app names. Returns: List of app names.
phone_agent/config/apps.py:220
↓ 1 callers
Function
list_supported_apps
Get a list of all supported iOS app names. Returns: List of app names.
phone_agent/config/apps_ios.py:233
↓ 1 callers
Function
long_press
Long press at the specified coordinates using WebDriver W3C Actions API. Args: x: X coordinate. y: Y coordinate. dur
phone_agent/xctest/device.py:177
↓ 1 callers
Method
long_press
Long press at coordinates.
phone_agent/device_factory.py:68
↓ 1 callers
Function
main
Main entry point.
ios.py:446
↓ 1 callers
Function
main
Main entry point.
main.py:684
↓ 1 callers
Function
main
(lang: str = "cn")
examples/demo_thinking.py:15
↓ 1 callers
Function
parse_args
Parse command line arguments.
ios.py:250
↓ 1 callers
Function
parse_args
Parse command line arguments.
main.py:355
↓ 1 callers
Method
reset
Reset the agent state for a new task.
phone_agent/agent_ios.py:149
↓ 1 callers
Method
restore_keyboard
Restore keyboard.
phone_agent/device_factory.py:120
↓ 1 callers
Function
send_keys
Send a sequence of keys. Args: keys: List of keys to send. wda_url: WebDriverAgent URL. session_id: Optional WDA ses
phone_agent/xctest/input.py:137
↓ 1 callers
Function
set_device_type
Set the global device type. Args: device_type: The device type to use (ADB or HDC).
phone_agent/device_factory.py:146
↓ 1 callers
Function
set_hdc_verbose
Set HDC verbose mode globally.
phone_agent/hdc/connection.py:41
↓ 1 callers
Method
start_wda_session
Start a new WebDriverAgent session. Returns: Tuple of (success, session_id or error_message).
phone_agent/xctest/connection.py:221
↓ 1 callers
Function
swipe
Swipe from start to end coordinates using WDA dragfromtoforduration endpoint. Args: start_x: Starting X coordinate. start_y:
phone_agent/xctest/device.py:231
↓ 1 callers
Method
swipe
Swipe from start to end.
phone_agent/device_factory.py:79
↓ 1 callers
Function
tap
Tap at the specified coordinates using WebDriver W3C Actions API. Args: x: X coordinate. y: Y coordinate. wda_url: W
phone_agent/xctest/device.py:75
next →
1–100 of 223, ranked by callers