
agent-device
io.github.callstack由 GitHub 帳號 callstack 發布v0.21.36更新於 Nov 3, 2026
Open source device layer for AI agents: control mobile, web, TV, and desktop apps over MCP
概覽
開源裝置層,讓 AI 程式代理透過 MCP、CLI 或 Node.js API 檢視、控制、除錯並驗證行動、電視、網頁與桌面應用程式。
- 可以做什麼
- 透過無障礙快照、ref 與選擇器檢視應用程式狀態,並分析 React Native 渲染效能
- 操作可見介面:點擊、按壓、填寫欄位、捲動、手勢、等待、斷言狀態與處理提示視窗
- 以截圖、錄影、日誌、追蹤、網路資料、效能取樣與當機資訊診斷失敗
- 將可用步驟存成回放腳本供本機或 CI 使用,並可匯出 Maestro YAML
- 在平行代理工作區之間協調裝置佔用,並連接遠端裝置雲
- 適用情境
- 適合讓程式代理在 iOS、Android、HarmonyOS、電視、網頁、macOS 或 Linux 上驗證變更、重現當機,或錄製可重複的介面流程供 CI 使用。偏向 QA 與除錯流程,而非靜態程式碼審查。
- 執行需求
- 以 npm 套件 agent-device 在本機執行,透過 stdio 以 mcp 參數啟動。需要 Node.js 22.12 或更新版本,網頁自動化需要 Node.js 24 或更新版本。各目標平台需要各自的工具鏈,例如模擬器、模擬裝置、ADB、HDC 或 XCTest。使用 BrowserStack、AWS Device Farm、TestMu AI 或 Limrun 等遠端裝置雲需另行設定。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 agent-device,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
agent-device
[npm version] [CI] [License: MIT] [Glama MCP server]
Open source device layer for AI coding agents. Let coding agents control mobile, web, TV, and desktop apps on devices and simulators, locally or in the cloud, through a CLI, built-in MCP server, or typed Node.js API.
Let your coding agent verify its changes in the running app. agent-device lets agents inspect, control, debug, and verify apps on iOS, Android, and HarmonyOS (simulators, emulators, and physical devices), plus tvOS, Android TV, Fire TV (Fire OS), Amazon Vega OS TV (Vega Virtual Device), web, macOS, and Linux. Agents read token-efficient accessibility snapshots instead of reasoning over screenshots alone, act through refs and selectors, and save evidence for review. It also coordinates device access across parallel agent worktrees and connects to remote device clouds.
Works with Claude Code, Codex, Cursor, Windsurf, Cline, Goose, and any agent that can run a CLI or connect over MCP, or as the runtime under agents you build with the AI SDK or Eve. Developers at Expensify, Shopify, and others use it to verify their apps.
agent-device powers mobile automation in [圖片] e2e and [圖片] T3 Code.
Quick start
Install the CLI and check setup. It requires Node.js 22.12 or newer; web automation requires Node.js 24 or newer. See Installation for target requirements.
Run doctor yourself before you hand the CLI to an agent. help workflow links to the guides for debugging, replay, and profiling.
Drive an app from the CLI
Add a contact in the built-in iOS Contacts app:
Refs are valid only in the latest output: after a --settle command, use the refs in its diff, and take a new snapshot only if the diff omits what you need. Snapshots come from the app's accessibility tree, so clear labels, roles, and test IDs make agent runs more reliable; use screenshots and video as evidence or when accessibility data is poor.
Add MCP tools to your agent
agent-device mcp starts the official stdio MCP server, exposing the installed commands as structured tools over the same execution path as the CLI:
See AI agent setup for per-client setup and when to prefer plain CLI over MCP.
Script it from Node.js
createAgentDeviceClient() gives Node.js code typed access to the same commands, as model tools in your own agent or from orchestration code:
See the Node.js API, the runnable examples, and the AI SDK and Eve integration guides.
What agents can do
- Inspect app state through accessibility snapshots, refs, and selectors, and profile React Native renders to find what makes an interaction slow.
- Act on visible UI by tapping or pressing elements, filling fields, scrolling, making gestures, waiting, asserting state, and handling alerts.
- Diagnose failures with screenshots, video, logs, traces, network data, performance samples, crash details, and React profiles.
- Repeat workflows by saving working steps as
.adscripts for local use or CI. Export strict Maestro YAML when needed.
See Commands for the commands and evidence each target supports.
What to ask your agent
With the CLI installed, prompts like these work end to end:
- "Implement the onboarding screen, run it on the iOS simulator and Android emulator, and attach screenshots."
- "Reproduce this crash and capture the logs that lead up to it."
- "Check whether this change causes unnecessary React Native re-renders."
- "Explore the checkout flow once, save it as a replay script, and run it in CI."
- "Verify this pull request on a physical device and attach reviewable evidence."
Next steps
- AI agent setup: skills, project rules, and per-client setup for Cursor, Codex, Claude Code, Windsurf, and others.
- Quick start: open an app, read its UI, and interact with it from the command line.
- Replay and E2E testing and Debugging and profiling: repeatable tests and bug hunting.
Where to run agent-device
The same session and evidence model works at every step: the agent explores the app, captures evidence, saves a replay, runs it in CI, and moves onto remote devices.
How it works
agent-device keeps device state in sessions. It uses a local accessibility bridge for iOS Simulator snapshots and XCTest for iOS interactions, physical iOS, and tvOS; ADB and the snapshot helper on Android, Android TV, and Fire OS; HDC and ArkUI uitest on HarmonyOS; Vega CLI/VDA on the Vega Virtual Device; a local helper on macOS, including Electron and other Chromium-based apps through the accessibility tree; and AT-SPI on Linux.
Support depth varies by target. Some backends, such as HarmonyOS and Vega OS, cover a subset of commands; run agent-device capabilities --platform <platform> to see what a target supports. The capabilities matrix shows which commands each target, desktop, web, and cloud provider supports.
Sessions are scoped to the caller's git worktree, and host-local device claims stop parallel agents from taking over each other's simulators and emulators. Run agent-device device status to inspect ownership without a daemon, and agent-device device release --stale to release claims whose owner is provably no longer running. The same commands drive hosted devices on BrowserStack, AWS Device Farm, TestMu AI, and Limrun.
agent-device uses the inspect-act-verify process from Vercel's agent-browser for mobile, TV, and desktop apps. Basic --platform web support runs agent-browser in the same session and replay system.
FAQ
What is agent-device?
agent-device is a command-line tool and MCP server that lets AI coding agents inspect, control, and verify mobile apps and save evidence for review. It supports iOS, Android, HarmonyOS, TV, web, macOS, and Linux.
Is there an MCP server for mobile app automation?
Yes. agent-device mcp starts the official stdio MCP server. The Quick start above has the client config, and AI agent setup covers per-client details.
Does it work with React Native, Expo, Flutter, and native apps?
Yes. agent-device supports native iOS and Android apps, plus React Native, Expo, and Flutter apps on supported targets. The commands and evidence vary by target.
How is it different from mobile MCP servers?
The MCP server is one entry point to the same runtime used by the CLI and typed Node.js API. Sessions, device ownership, selectors, evidence, replay, CI workflows, and cloud routing stay consistent across all three.
Can I build my own agent or QA product on agent-device?
Yes. The typed Node.js client is a public surface over that same runtime, so an agent you build inherits everything above. Start from the Node.js API, AI SDK, or Eve guides.
How is it different from Appium, Detox, or Maestro?
With agent-device, an agent reads app state and chooses each command at run time. For stable, repeatable test suites, use e2e, a TypeScript testing framework for web and mobile apps. agent-device can also save its runs as .ad scripts or export them as strict Maestro YAML.
Can agent-device run in CI?
Yes. Record a run as an .ad script, replay it in CI, and keep the screenshots and logs as artifacts; the EAS workflow template is a working example.
Articles and videos
Articles
- Build an AI QA agent for Expo apps with EAS Workflows
- Agent Device: iOS & Android automation for AI agents
- Building mobile QA agents with Vercel Eve
- How we optimized Agent Device for mobile app automation
Videos
- Verifying mobile apps with agent-device
- Using agent-device in an AI coding workflow
- Cloud agents that test mobile apps on real devices
Who uses agent-device?
Teams and developers at Callstack, JPMorgan Chase, Expensify, Shopify, Kindred, Total Wine & More, LegendList, HerLyfe, App & Flow, and others use agent-device.
Documentation
Contributing
See CONTRIBUTING.md.
Made at Callstack
agent-device is open source under the MIT license. Visit agent-device.dev or contact Callstack.
來源:README.md,提交 3b9e8d1
工具
0版本歷史
18- v0.21.36最新Nov 3, 2026
- v0.21.35Oct 29, 2026
- v0.21.31Oct 22, 2026
- v0.21.30Oct 21, 2026
- v0.21.28Oct 15, 2026
- v0.21.27Oct 12, 2026
- v0.21.26Oct 12, 2026
- v0.21.25Oct 11, 2026
- v0.21.24Oct 9, 2026
- v0.21.22Oct 6, 2026
- v0.21.21Oct 6, 2026
- v0.21.18Sep 30, 2026
- v0.21.15Sep 25, 2026
- v0.21.12Sep 23, 2026
- v0.21.10Sep 22, 2026
- v0.21.9Sep 22, 2026
- v0.21.8Sep 21, 2026
- v0.21.4Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分