Enhanced mobile app automation and verification for AI coding agents. Substantial enhancement fork of callstack/agent-device adding AI-powered selector generation, performance-optimized snapshots, streaming MCP server, AI screen recording with evidence extraction, security scanning, interactive architecture documentation, and improved developer experience.
# Install globally
npm install -g @gict-africa/agent-device-enhanced@latest
# Verify setup
agent-device doctor
# Explore workflows
agent-device help workflow# Start a session on iOS Simulator
agent-device open Contacts --platform ios
# Inspect the screen (accessibility snapshot)
agent-device snapshot -i
# @e2 [button] "Add Contact"
# Use the ref and wait for UI to settle
agent-device press @e2 --settle
# Fill a field with AI-suggested selector
agent-device fill @e7 "Ada" --settle
# Get AI-powered selector suggestions
agent-device suggest-selector snapshot.json --target "Save button"
# Capture evidence and close
agent-device screenshot ./contact-form.png
agent-device close{
"mcpServers": {
"agent-device-enhanced": {
"command": "agent-device",
"args": ["mcp"]
}
}
}The enhanced MCP server supports streaming progress for long operations and rich tool descriptions for better agent discoverability.
import { createAgentDeviceClient } from '@gict-africa/agent-device-enhanced';
const client = createAgentDeviceClient({ session: 'qa-run' });
try {
await client.apps.open({ app: 'com.apple.Preferences', platform: 'ios' });
const snapshot = await client.capture.snapshot({ interactiveOnly: true });
// Get AI-powered selector suggestions
const selector = await client.ai.suggestSelector({
snapshot,
target: 'Save button',
platform: 'ios'
});
if (selector.primaryChain) {
await client.interactions.press({ ref: selector.primaryChain.targetRef });
}
} finally {
await client.sessions.close();
}| Feature | Description |
|---|---|
| π€ AI Selector Generation | LLM-powered resilient selectors with confidence scoring & fallback chains |
| β‘ Android Snapshot Optimization | Sub-2s snapshots via caching + batched geometry calls (fixes #3558) |
| π Streaming MCP Server | Progress updates for long ops, rich tool metadata, structured errors |
| π¬ AI Screen Recording | Auto highlight detection (errors, crashes, network failures), evidence extraction, .ad replay generation |
| π Security Scanning | Credential/PII detection, insecure storage audit, certificate pinning verification |
| π Interactive Architecture Docs | React Flow visualization - click through to source, expandable nodes |
| π Interactive REPL | agent-device repl for live session exploration & time-travel debugging |
All new functionality is delivered as independent, optional packages:
| Package | Purpose | Install |
|---|---|---|
@agent-device/ai-selector |
AI-powered selector generation from snapshots | Included |
@agent-device/screen-recording-ai |
AI-enhanced recording analysis | Included |
@agent-device/security-patterns |
Mobile security automation patterns | Included |
Each package can be used independently or via the main CLI.
- Inspect app state through accessibility snapshots, refs, selectors, React Native component trees
- Act on visible UI by tapping, pressing, filling, scrolling, gesturing, waiting, asserting
- π€ Generate resilient selectors using AI from natural language descriptions
- π± Record with AI analysis β automatic highlights, evidence extraction, replay scripts
- π Scan for security issues β credentials, PII, insecure storage, cert pinning
- π Stream progress via MCP for long-running operations
- π Debug interactively with REPL and time-travel debugging
- π Explore architecture with interactive visualization
βββββββββββββββ βββββββββββββββ βββββββββββββββ
β CLI ββββββΆβ Daemon ββββββΆβ Platform β
β (Enhanced) β β (Enhanced) β β Runtimes β
βββββββββββββββ ββββββββ¬βββββββ ββββββββ¬βββββββ
β β
ββββββββββββββΌβββββββββββββ β
βΌ βΌ βΌ βΌ
ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ
βAI Selectorβ βScreen Recβ β Security β β Providersβ
β (NEW) β β AI(NEW) β βPatterns β β(Cloud) β
ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ
π View Interactive Architecture β
Built-in security scanning for mobile apps:
# Scan session for credentials, PII, insecure storage, cert pinning
agent-device security-scan --session abc123 --app com.example.appDetects:
- π 40+ credential patterns (AWS, GitHub, GCP, Azure, Stripe, JWT, DB URIs)
- π PII (emails, phones, SSN, credit cards, medical records, crypto addresses)
- πΎ Insecure storage (SharedPreferences, Keychain, AsyncStorage, SQLite, Realm)
- π Certificate pinning (config extraction + MITM verification)
- π Network issues (cleartext HTTP, weak TLS)
| Document | Description |
|---|---|
| Architecture Visualization | Interactive React Flow diagram |
| DESIGN_DOCUMENT.md | Architecture decisions & rationale |
| PORTFOLIO_CASE_STUDY.md | Full case study with before/after |
| IMPROVEMENT_PLAN.md | Detailed enhancement plan |
| AI Agent Setup | Per-client setup (original docs) |
| Commands Reference | All CLI commands (original docs) |
# Run all tests
pnpm test
# Unit tests only
pnpm test:unit
# Integration tests
pnpm test:integration
# Mutation testing (critical paths)
pnpm mutation:run
# Performance benchmarks
pnpm bench:ios-snapshotSee CONTRIBUTING.md from the original project.
Enhancement contributions welcome! Focus areas:
- Additional LLM providers for AI selector
- More security patterns
- Platform-specific optimizations
- Architecture visualization improvements
MIT License β see LICENSE.
Original work: callstack/agent-device (MIT License)
Enhancements: George Nakisisa / GICT Africa Technologies (MIT License)
This project is a substantial enhancement fork of callstack/agent-device.
- Original authors: Callstack team and contributors
- Original license: MIT (preserved)
- Enhancements: Independent packages, performance optimizations, AI features, security scanning, documentation
We clearly distinguish:
- ORIGINAL PROJECT β callstack/agent-device
- GICT / GEORGE'S IMPROVEMENTS β This fork
"Engineering improvement and independent development based on open-source technology."
George Nakisisa
Senior Software Engineer Β· AI Engineer Β· Cybersecurity
Company: GICT Africa Technologies
Website: https://gictafrica.com
Email: nakisisageorge@gmail.com
GitHub: @nakisisageorge
Location: Kampala, Uganda πΊπ¬
- Repository: https://github.com/nakisisageorge/agent-device-enhanced
- Issues: https://github.com/nakisisageorge/agent-device-enhanced/issues
- Original Project: https://github.com/callstack/agent-device
- Original Docs: https://oss.callstack.com/agent-device/
- npm Package: https://www.npmjs.com/package/@gict-africa/agent-device-enhanced