The Comput AI Agent (ComputAgent / ComputAgentSheet) is an interactive, step-by-step assistant integrated into the Comput console. Unlike one-shot command generation in Commandium, the Agent plans a multi-step sequence of privileged shell commands and ADB module service executions, runs them with configurable approval gates, and summarizes the results in your language.
Wiki mirror: https://github.com/HmnDev-Tech/shevery/wiki/Comput-Agent
- Goal Input: Open the Comput tab, tap the Agent button (robot icon), and describe your goal in natural language (for example: "Check which apps wake up the device the most and list disabled system packages").
- Planning Phase (
PLANNING):- The agent queries your active AI provider (configured in Settings → AI → AI provider).
- Installed ADB modules that include a
service.shscript are passed as context (AgentModuleInfo), allowing the agent to trigger module services when relevant. - The AI returns a structured JSON plan (
{"steps": [...]}) containing up to 10 steps (MAX_STEPS_HARD = 10).
- Execution Phase (
EXECUTING):- Each step has a
kind(SHELLorMODULE_SERVICE), atarget(the shell command or module ID), and a localized one-sentencecommentexplaining what the step does. - Depending on your Safety Mode, Shevery either executes the step immediately or pauses to show an interactive approval card.
- Live
stdout/stderroutput and step status (PENDING,RUNNING,DONE,FAILED,DENIED,SKIPPED) are displayed in real time.
- Each step has a
- Summary Phase (
DONE):- Once all steps finish (or if you stop the run early), the agent sends the execution transcript back to the active model to generate a concise verdict and key findings in your current device locale.
| Step Kind | JSON type |
Target | Execution Path |
|---|---|---|---|
| Shell Command | shell |
Raw Android toybox shell command (pm, am, dumpsys, settings, cmd, service, getprop, wm, soc, etc.) |
Executed via IShizukuService.newProcess(["sh", "-c", cmd]) |
| Module Service | module_service |
Installed ADB module id (must have service.sh) |
Executed via AdbModuleManager service runner |
On-device constraints: The system prompt strictly forbids desktop Linux tools (
apt,dpkg,systemctl,journalctl,ifconfig,iptables) that do not exist on Android'stoyboxenvironment, and restrictsmodule_servicesteps to installed modules that actually provide aservice.shscript.
Configure the agent's behavior under Settings → AI → Comput agent:
| Safety Mode | Behavior |
|---|---|
Secure (secure, default) |
Prompts for confirmation before every step (both shell commands and module services). |
Turbo (turbo) |
Executes the entire plan automatically without pausing for confirmation. |
Custom (custom) |
Lets you choose the maximum number of steps and toggle confirmation per step type. |
When Safety mode is set to Custom, three additional settings appear in Settings → AI:
- Max steps:
3,5(default), or10steps per plan. - Ask before shell commands: Require approval before running
SHELLsteps. - Ask before module services: Require approval before running
MODULE_SERVICEsteps.
When a step requires approval, the Agent sheet displays an approval card with four choices:
- Allow: Run this step once.
- Edit & Allow: Edit the shell command or module ID inline before executing the step (
overrideTarget). - Deny: Skip this step (
DENIED) and move to the next step in the plan. - Allow always: Run this step and all remaining steps in the current plan without asking again.
The Agent sheet keeps a history of its chats so a task can be continued later:
- The history button in the sheet header opens the list of saved chats (title, time, message count), with New chat to start over and a delete button per chat.
- Opening a chat restores its transcript (your goals and the agent's answers) above the input; the next goal is sent with the previous turns as context, so the agent sees what was already discussed.
- Chats are stored on device as one JSON string in the same
SharedPreferencesfile as the Comput macros (ModuleSettings.getAgentChats/setAgentChats, keycomput_agent_chats, handled byAgentChats). Up to 30 chats and 200 messages per chat are kept; the oldest are dropped. - A finished turn is committed to the chat when the next run starts, when you switch chats, or when the sheet is closed.
manager/src/main/java/moe/shizuku/manager/comput/agent/ComputAgent.ktmanager/src/main/java/moe/shizuku/manager/comput/agent/AgentChats.ktmanager/src/main/java/moe/shizuku/manager/logs/ComputAgentSheet.ktmanager/src/main/java/moe/shizuku/manager/logs/ComputScreen.kt