This repository contains an AI agent skill for secure UPI/USSD payment automation on Android devices using ADB, scrcpy, and uiautomator2.
It is designed for terminal-based agent workflows where natural-language payment requests are parsed, validated, and executed with strict safety guardrails.
pip install -r scripts/requirements.txt
python -m uiautomator2 initadb devices
scrcpy --versionThen update runtime guardrails in scripts/config.json before any execution.
- Human-in-the-loop finalization: automation must stop before UPI PIN/biometric approval.
- Fail-closed execution: unknown UI states, disconnects, and validation mismatches abort the transaction.
- Runtime guardrails: per-transaction limits, daily caps, app allowlists, and optional payee allowlists are enforced from config.
- Audit trail support: screenshots and execution state are captured to support traceability.
- Intent Parsing: convert natural-language requests into structured payment intents.
- Pre-flight Validation: validate amount, app, time window, and policy limits before execution.
- UPI Deep Link Execution: launch
upi://payintents for reliable app handoff. - USSD Initiation (
*99#): trigger interactive USSD flows through Android dial intents. - App UI Automation: optionally drive supported UPI apps via uiautomator2 when needed.
SKILL.mdβ skill manifest, architecture, workflow, and security model.scripts/upi_agent.pyβ core Python implementation.scripts/config.jsonβ policy and runtime configuration.scripts/README.mdβ script-level setup details.
For full execution and architecture details, see SKILL.md.