Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

**[Watch it automate a logistics workflow in 60 seconds](https://x.com/ethanjlim/status/1999152070428148108?s=20)**

<sub>Driver texts a photo → Agent handles WhatsApp → Scanner app → Banking app → Invoice submitted</sub>
<sub>Driver texts a photo → Agent opens WhatsApp → uses scanner app → opens banking app → submits invoice</sub>

<br>

Expand Down Expand Up @@ -53,7 +53,7 @@ But the real economy runs on mobile devices, in places where laptops don't fit:

**Priority partnership area.** Android Use automating an entire logistics workflow:

### Before (Manual - 10+ minutes)
### Before Manual (10+ minutes)
```
1. Driver takes photo of Bill of Lading
2. Opens WhatsApp, sends to back office
Expand All @@ -63,7 +63,7 @@ But the real economy runs on mobile devices, in places where laptops don't fit:
6. Submits for payment
```

### After (Automated - 30 seconds)
### After Automated (30 seconds)
```python
# Driver just texts the photo. Agent does the rest.
run_agent("""
Expand Down Expand Up @@ -176,7 +176,7 @@ brew install android-platform-tools # macOS
# 4. Connect device & verify
adb devices

# 5. Set API key
# 5. Set your OpenAI API key:
export OPENAI_API_KEY="sk-..."

# 6. Run your first agent
Expand Down
9 changes: 6 additions & 3 deletions kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
import time
import subprocess
import json
from typing import Dict, Any
from typing import Dict, Any, List
from openai import OpenAI
import sanitizer
from dotenv import load_dotenv

load_dotenv()

# --- CONFIGURATION ---
ADB_PATH = "adb" # Ensure adb is in your PATH
MODEL = "gpt-4o" # Or "gpt-4-turbo" for faster/cheaper execution
MODEL = os.environ.get("MODEL") # Or "gpt-4-turbo" for faster/cheaper execution
SCREEN_DUMP_PATH = "/sdcard/window_dump.xml"
LOCAL_DUMP_PATH = "window_dump.xml"

client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"))
client = OpenAI(api_key=os.environ.get("OPENAI_API_KEY"), base_url=os.environ.get("BASE_URL"))

def run_adb_command(command: List[str]):
"""Executes a shell command via ADB."""
Expand Down
3 changes: 3 additions & 0 deletions sample.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
OPENAI_API_KEY=""
BASE_URL="https://api.openai.com/v1"
MODEL="gpt-4o"