agent-device क्या है?
agent-device मोबाइल, टीवी और डेस्कटॉप ऐप का ऑटोमेशन, जो coding agent को चल रहे ऐप में अपने ही बदलावों की जाँच करने देता है. यह Agents & Automation टूल्स की Computer & Browser Use श्रेणी में आता है; ओपन सोर्स है, TypeScript में लिखा गया है और MIT लाइसेंस के तहत है।
सारांश
agent-device Callstack का एक ओपन सोर्स टूल है, जो coding agent और उस ऐप के बीच का लूप बंद करता है जिसे वह एडिट कर रहा है। कोई बदलाव लिखकर उम्मीद करने की बजाय, agent ऐप को simulator, emulator या असली डिवाइस पर खोल सकता है, स्क्रीन पर वास्तव में दिख रही चीज़ों की जाँच कर सकता है, टैप और टाइप कर सकता है, और सबूत के तौर पर screenshots, video और logs कैप्चर कर सकता है। यह iOS, Android और HarmonyOS के साथ-साथ tvOS, Android TV, Amazon Vega OS, वेब, macOS और Linux को भी कवर करता है।
इसे काम करने वाला डिज़ाइन फ़ैसला है accessibility snapshot। कच्चे screenshots पर model से तर्क करवाने की बजाय, agent-device उसे roles, labels और refs का एक token-efficient tree देता है, जैसे `@e2 [button] "Add"`। agent इन्हीं refs और selectors के ज़रिए काम करता है। UI बदलने वाले commands स्क्रीन के स्थिर होने का इंतज़ार कर सकते हैं और बदली हुई चीज़ों का diff लौटा सकते हैं, ताकि agent हर step पर दोबारा screenshot लिए बिना state पर नज़र रख सके।
वही runtime तीन तरीकों से उपलब्ध है: एक CLI, एक built-in stdio MCP server (`agent-device mcp`), और अपने agents को खुद orchestrate करने वाले कोड के लिए एक typed Node.js client। Sessions caller के git worktree तक सीमित रहते हैं, और host-local device claims parallel agents को एक-दूसरे के simulators छीनने से रोकते हैं। चल चुके runs को CI के लिए `.ad` replay scripts के रूप में सेव किया जा सकता है, या strict Maestro YAML में export किया जा सकता है।
यह क्या करता है
- Refs और selectors वाले accessibility-tree snapshots, ताकि agents अकेले screenshots के बजाय संरचित UI state पर काम करें
- तीन entry points के पीछे एक ही runtime: एक CLI, एक आधिकारिक stdio MCP server, और एक typed Node.js API
- iOS, Android और HarmonyOS simulators, emulators और असली डिवाइस के साथ-साथ tvOS, Android TV, Vega OS, वेब, macOS और Linux को सपोर्ट करता है
- डीबगिंग के लिए evidence capture: screenshots, video, logs, traces, network data, performance samples, crash details और React profiles
- Replay: किसी सफल run को `.ad` script के रूप में सेव करें, ताकि उसे लोकल या CI में दोबारा चलाया जा सके, या strict Maestro YAML export करें
- Worktree-scoped sessions और device claims, जो parallel agents को एक-दूसरे के डिवाइस हथियाने से रोकते हैं
- BrowserStack, AWS Device Farm और Limrun के लिए remote proxy और device-cloud routing
शुरू करें
agent-device के लिए Node.js 22.12 या उसके नए वर्शन की ज़रूरत है (वेब ऑटोमेशन के लिए Node.js 24+ चाहिए)। किसी agent को सौंपने से पहले CLI इंस्टॉल करें और `doctor` खुद चलाएँ, यह जाँचने के लिए कि आपके platform toolchains सेट हैं या नहीं।
CLI इंस्टॉल करें और setup जाँचें
ग्लोबली इंस्टॉल करें, फिर target की ज़रूरतें जाँचने के लिए doctor चलाएँ। `help workflow` debugging, replay और profiling guides से लिंक करता है, और हमेशा इंस्टॉल किए गए वर्शन से मेल खाता है।
npm install -g agent-device@latest
agent-device doctor
agent-device help workflowCLI से ऐप चलाएँ
Session खोलें, refs पाने के लिए snapshot लें, फिर उन पर कार्रवाई करें। `--settle` UI के स्थिर होने का इंतज़ार करता है और बदलावों का diff प्रिंट करता है; refs केवल सबसे नए output से ही मान्य होते हैं।
# Start a session
agent-device open Contacts --platform ios
# Inspect the screen (refs vary)
agent-device snapshot -i
# @e2 [button] "Add"
# Use the ref and wait for the UI to settle
agent-device press @e2 --settle
agent-device fill @e7 "Ada" --settle
# Capture evidence and close
agent-device screenshot ./contact-form.png
agent-device closeMCP के ज़रिए अपने agent को इससे जोड़ें
`agent-device mcp` आधिकारिक stdio MCP server शुरू करता है, जो इंस्टॉल किए गए commands को उसी execution path के ज़रिए structured tools के रूप में उपलब्ध कराता है जो CLI इस्तेमाल करता है। इसे अपने MCP client config में जोड़ें।
{
"mcpServers": {
"agent-device": {
"command": "agent-device",
"args": ["mcp"]
}
}
}Node.js से script लिखें
`createAgentDeviceClient()` उन्हीं commands तक typed पहुँच देता है, चाहे आप इन्हें अपने agent में model tools के रूप में इस्तेमाल करें या सादे orchestration code से।
import { createAgentDeviceClient } from 'agent-device';
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 });
const button = snapshot.nodes.find((node) => node.role === 'button');
if (button) await client.interactions.press({ ref: button.ref });
} finally {
await client.sessions.close();
}जाँचें कि कोई target क्या सपोर्ट करता है
सपोर्ट की गहराई target के हिसाब से अलग है। HarmonyOS और Vega OS जैसे नए backends commands के एक हिस्से को ही कवर करते हैं। अंदाज़ा लगाने के बजाय CLI से पूछें।
agent-device capabilities --platform androidकमांड और कोड प्रोजेक्ट के अपने दस्तावेज़ों से लिए गए हैं — हमेशा जांचें आधिकारिक repo ताज़ा जानकारी के लिए।
कब इस्तेमाल करें
- coding agent को एक screen इम्प्लीमेंट करने दें, उसे iOS simulator और Android emulator पर चलाएँ, और screenshots pull request से अटैच करें
- किसी डिवाइस पर crash को दोबारा पैदा करें और उससे पहले के logs और traces कैप्चर करें
- built-in React profiler capture का इस्तेमाल करके जाँचें कि कोई बदलाव React Native के अनावश्यक re-renders तो नहीं करवा रहा
- किसी exploratory run को `.ad` replay script के रूप में रिकॉर्ड करें और उसे CI में दोबारा चलाएँ, जिसमें screenshots और logs artifacts के रूप में रखे जाएँ
How agent-device compares
agent-device alongside other open-source computer & browser use tools AI/TLDR tracks, ranked by GitHub stars.
| टूल | स्टार | यह क्या करता है |
|---|---|---|
| Browser Use | ★ 123k | AI agents को असली ब्राउज़र नियंत्रित करने दें, ताकि वे सादी भाषा के निर्देशों से वेब काम पूरे कर सकें |
| Open Interpreter | ★ 69k | प्राकृतिक भाषा के अनुरोधों से आपके अपने कंप्यूटर पर कोड चलाने वाला टर्मिनल कोडिंग एजेंट |
| Chrome DevTools MCP | ★ 60.2k | एक MCP सर्वर, जो कोडिंग एजेंट को लाइव ब्राउज़र पर Chrome DevTools की पूरी ताकत देता है |
| agent-browser | ★ 55.1k | एक नेटिव Rust CLI जो AI एजेंट को एक ब्राउज़र देता है, जिसे वह एक समय में एक shell कमांड से चला सकता है |
| UI-TARS Desktop | ★ 39.6k | एक ओपन सोर्स GUI agent स्टैक, जो vision-language models की मदद से आपका कंप्यूटर और ब्राउज़र कंट्रोल करता है |
| CloakBrowser | ★ 35.3k | Playwright और Puppeteer के कोड में बिना कोई बदलाव किए चलने वाला stealth Chromium |
| Cua | ★ 33.8k | एजेंट के लिए तैयार sandboxes, जिनसे AI किसी भी OS पर पूरे डेस्कटॉप को कंट्रोल कर सके |
| agent-device | ★ 5.6k | मोबाइल, टीवी और डेस्कटॉप ऐप का ऑटोमेशन, जो coding agent को चल रहे ऐप में अपने ही बदलावों की जाँच करने देता है |
