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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ frontend/

reddit_python_posts.json

test/
test/
venvrun.sh
run.sh
3 changes: 3 additions & 0 deletions droidrun/agent/codeact/codeact_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,9 @@ async def handle_llm_input(
activity_name=phone_state.get("currentApp", "Unknown"),
)

# Store ui_state so it's available during code execution
await ctx.store.set("ui_state", a11y_tree)

# Stream formatted state for trajectory
ctx.write_event_to_stream(RecordUIStateEvent(ui_state=a11y_tree))

Expand Down
4 changes: 3 additions & 1 deletion droidrun/config/prompts/executor/system.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ No actions have been taken yet.
Whatever the current subgoal says to do, do that EXACTLY. Do not substitute with what you think is better. Do not optimize. Do not consider screen state. Parse the subgoal text literally and execute the matching atomic action.

IMPORTANT:
1. Do NOT repeat previously failed actions multiple times. Try changing to another action.
1. Do NOT repeat previously failed actions multiple times. If an action failed, try a DIFFERENT action or approach.
2. Must do the current subgoal.
3. If you have tried the same action 2+ times and it keeps failing, try a completely different approach. If truly stuck with no viable action, use `{"action": "wait", "duration": 1.0}` as a fallback and explain why in the Description (e.g., "No actionable element found for subgoal").
4. ALWAYS output a valid action. There is no "skip" or "do nothing" option — use `wait` with duration 1.0 if uncertain.

Provide your output in the following format, which contains three parts:

Expand Down