Skip to content

Commit 9d62530

Browse files
committed
updates
1 parent 337f5b5 commit 9d62530

File tree

3 files changed

+131
-0
lines changed

3 files changed

+131
-0
lines changed

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,13 @@ export LLM_API_KEY="your-api-key"
9696

9797
# Run a predefined task
9898
./droidrun-client -server http://localhost:8000 -task tasks/whatsapp-reply.toml
99+
100+
# Discover deep links for an app
101+
./droidrun-client -server http://localhost:8000 -deeplinks com.instagram.android
102+
103+
# Run a task with a deep link (opens specific screen before the agent starts)
104+
./droidrun-client -server http://localhost:8000 -key $LLM_API_KEY \
105+
-app com.instagram.android -deeplink "instagram://mainfeed" "like the first post"
99106
```
100107

101108
### curl
@@ -122,6 +129,38 @@ curl -H "X-Server-Key: $DROIDRUN_SERVER_KEY" http://localhost:8000/task/TASK_ID
122129
curl -X DELETE -H "X-Server-Key: $DROIDRUN_SERVER_KEY" http://localhost:8000/task/TASK_ID
123130
```
124131

132+
### Task Files
133+
134+
Task files are TOML configs for reusable tasks. Example with a deep link:
135+
136+
```toml
137+
[task]
138+
name = "instagram-feed"
139+
description = "Like the first post on Instagram feed"
140+
141+
[task.goal]
142+
app = "com.instagram.android"
143+
deeplink = "instagram://mainfeed"
144+
prompt = """
145+
1. You are on the Instagram main feed.
146+
2. Like the first post you see.
147+
3. Return to home desktop when done.
148+
"""
149+
150+
[task.model]
151+
provider = "Google"
152+
model = "gemini-flash-latest"
153+
154+
[task.options]
155+
reasoning = true
156+
vision = false
157+
max_steps = 15
158+
```
159+
160+
Run with: `./droidrun-client -task tasks/instagram-feed.toml -server http://localhost:8000`
161+
162+
Use `-deeplinks` to discover available deep links for an app before writing task files.
163+
125164
## API Reference
126165

127166
**Base URL:** `http://localhost:8000`
@@ -154,10 +193,14 @@ X-API-Key: your-llm-api-key
154193
| Field | Type | Required | Default | Description |
155194
|-------|------|----------|---------|-------------|
156195
| `goal` | string | Yes | - | What you want the agent to do |
196+
| `app` | string | No | - | Android package to launch (e.g. `com.whatsapp`) |
197+
| `deeplink` | string | No | - | Deep link URI to open (e.g. `instagram://mainfeed`) |
157198
| `provider` | string | No | `Google` | LLM provider (see below) |
158199
| `model` | string | No | auto | Model name |
159200
| `max_steps` | int | No | `30` | Maximum steps (1-100) |
160201

202+
If both `app` and `deeplink` are set, the app is launched first, then the deep link is opened. If only `deeplink` is set, it opens directly (which implicitly opens the app).
203+
161204
**Providers:**
162205
| Provider | Default Model |
163206
|----------|---------------|
@@ -238,6 +281,34 @@ X-Server-Key: your-server-key
238281

239282
---
240283

284+
### GET /deeplinks
285+
286+
Discover available deep links for an installed app. Runs `adb shell dumpsys package` and parses intent filters for non-http/https URI schemes.
287+
288+
**Headers:**
289+
```
290+
X-Server-Key: your-server-key
291+
```
292+
293+
**Query Parameters:**
294+
| Parameter | Required | Description |
295+
|-----------|----------|-------------|
296+
| `app` | Yes | Android package name (e.g. `com.instagram.android`) |
297+
298+
**Response:** `200 OK`
299+
```json
300+
{
301+
"app": "com.instagram.android",
302+
"deeplinks": [
303+
"instagram://camera",
304+
"instagram://mainfeed",
305+
"instagram://reels_home"
306+
]
307+
}
308+
```
309+
310+
---
311+
241312
### GET /health
242313

243314
Health check. No authentication required.

tasks/instagram-notifications.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Instagram in-app notification reply task
2+
3+
[task]
4+
name = "instagram-notifications"
5+
description = "Navigate to Instagram notifications and reply to today's comments"
6+
7+
[task.goal]
8+
app = "com.instagram.android"
9+
prompt = """
10+
1. You are now in Instagram. Tap the house icon in the bottom left corner to go to the home feed.
11+
2. Tap the heart icon in the top right corner to open your notifications/activity.
12+
3. You are now in the notifications screen. Look for notifications from TODAY only:
13+
- Comments on your posts (these show the comment text)
14+
- Ignore likes, follows, suggestions, and older notifications
15+
4. For each COMMENT notification from today:
16+
- Tap on it to open the post with that comment
17+
- Find the comment and tap "Reply"
18+
- Write a friendly, relevant response to the comment
19+
- Post the reply
20+
- Tap the back arrow to return to notifications
21+
5. Continue until you've replied to all comment notifications from today.
22+
6. Return to home desktop when done.
23+
7. Report a summary of:
24+
- How many comments you found from today
25+
- What replies you sent and to whom
26+
"""
27+
28+
[task.model]
29+
provider = "Google"
30+
model = "gemini-flash-latest"
31+
32+
[task.options]
33+
reasoning = true
34+
vision = true
35+
max_steps = 40

tasks/whatsapp-joke.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# WhatsApp joke task - send a joke to Boss via deep link
2+
3+
[task]
4+
name = "whatsapp-joke"
5+
description = "Open WhatsApp chats, find Boss, and send him a joke"
6+
7+
[task.goal]
8+
app = "com.whatsapp"
9+
prompt = """
10+
1. Navigate to the Chats tab (not Updates, Communities, or Calls).
11+
2. Find the chat with "Boss" - scroll through the chat list if needed.
12+
3. Open the chat with Boss.
13+
4. Type and send a short, clean, work-appropriate joke.
14+
5. Return to home desktop when done.
15+
6. Report what joke you sent.
16+
"""
17+
18+
[task.model]
19+
provider = "Google"
20+
model = "gemini-flash-latest"
21+
22+
[task.options]
23+
reasoning = true
24+
vision = false
25+
max_steps = 15

0 commit comments

Comments
 (0)