AI Action
Overview
AI Action allows you to perform UI operations on your box using natural language instructions. Instead of manually specifying coordinates and click types, simply describe what you want to do in plain English.
This is a beta feature currently in testing phase. AI Action is currently only supported on Android boxes. Support for other box types (Linux) is coming soon. Please note that some functionalities might experience occasional instability as we continue to improve this feature.
How It Works
The AI will automatically:
- Analyze your instruction
- Identify the target UI elements
- Execute the appropriate action on the box
Common Use Cases
You can use natural language for various UI operations such as:
"click the login button"
"scroll down to find settings"
"input my email address"
"swipe left to the next page"
"tap on the search icon"
Quickstart
Getting Started
To use AI Action, you’ll need to create a box first, then call the box.action.ai()
method with your natural language instruction. The AI will analyze your request and perform the corresponding UI operation.
Basic Usage
Here’s a complete example showing how to use AI Action:
Understanding the Parameters
The AI Action method accepts either:
-
Simple string: Just pass your instruction directly
-
Object with context: Provide additional background information to help the AI make better decisions
Best Practices
- Be specific: Use clear, descriptive language like “click the blue Submit button” instead of just “click button”
- Provide context: When using the object format, include relevant background information to help the AI understand the scenario
- Use common UI terms: Terms like “click”, “tap”, “scroll”, “swipe”, “type”, “input” work well
- Be patient: AI actions may take a few seconds to analyze and execute
What Happens Next
When you call box.action.ai()
:
- The AI captures the current screen state
- Analyzes your instruction against the visible UI elements
- Determines the best action to take
- Executes the action automatically
- Returns the result of the operation