Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

AWS Architecture Blog 12 min read Case study mediumAdept

AI coding agents on Amazon EC2 Mac: How Cognition scales Devin for macOS

Cognition runs Devin's macOS workspaces as Apple Virtualization framework guest VMs on bare-metal EC2 Mac Dedicated Hosts across six AWS Regions, starting a fresh VM per session in under a minute with two guests per host as the macOS license allows. Session state persists through a host-side snapshot process exposed to the guest over NBD, since the framework lacks vhost-user. About 90% of idle sessions release their VM and resume from S3 snapshots in seconds. A user-space Ethernet gateway on file-handle attachments avoids pf conflicts with Apple's NAT and enforces per-session network policy. Images are pre-provisioned with permissions to skip TCC dialogs, the live view bounds frame queues and restarts from keyframes to avoid stale video, and Devin drives apps through the accessibility tree rather than screenshot-only computer use.

Related posts

  • We gave AI agents a mobile dev environment

    Shopify Engineering mediumAdept

    Shopify built Remote Dev so its Slack-based coding agent River can build and test iOS and Android apps in parallel on a fleet of remote Macs instead of developers' laptops. Each agent claims a warm Mac (monorepo checked out, apps prebuilt, caches warm) over SSH, plus an Android emulator running on a separate Linux VM because macOS lacks nested virtualization; this cut setup from 30+ minutes to a few minutes. A skill, a CLI wrapping SSH, and observable tmux panes taught River to use the remote machine. Live Preview streams simulators to the browser over WebSockets, and internal evangelism plus a classifier-driven feedback loop raised River's share of merged mobile PRs from 6% to 61%.

  • Running Self-Hosted AI Agents

    Oxide mediumAdept

    Self-hosted AI agents on the Oxide Cloud Computer run best as a long-lived orchestrator VM that spawns an ephemeral VM per agent session. VMs are preferred over containers because a separate guest kernel gives stronger isolation. With Claude Code self-hosted environments, a spawn-runner hook creates each runner VM, a systemd unit powers it off when the session ends, and a separate reaper polls the Oxide API to delete stopped VMs and their disks. Amp self-hosted orbs are simpler because the dispatch contract has explicit spawn, pause and delete operations, so pausing deletes the instance and keeps its boot disk. Open problems are cold-start latency, cleanup signaling and multi-rack scale, and Oxide is exploring a microVM-style primitive to address them.

  • ScreenEnv: Deploy your full stack Desktop Agent

    Hugging Face mediumAdept

    ScreenEnv is a Python library that runs isolated Ubuntu desktop environments in Docker containers so GUI (computer-use) agents can see the screen, click, type, launch apps, manage files and record sessions. It exposes two integration modes: a direct Sandbox API for custom backends and an MCP server for MCP-capable AI systems. It integrates natively with smolagents: you subclass DesktopAgentBase, define an action space of tools such as click, write, press and launch_app, plug in any VLM backend, and run tasks like writing a document in LibreOffice. Containers start in under 10 seconds on AMD64 and ARM64, and Android, macOS and Windows support is planned.

  • Browser Use in Managed Deep Agents

    LangChain mediumAdept

    Managed Deep Agents in LangSmith now runs a remote browser in its own sandbox and gives agents Stagehand-based tools: browser_snapshot (accessibility tree with element IDs), browser_run (batched actions or Playwright-style JavaScript in one call to keep page content out of context), browser_screenshot, and browser_handoff for letting a human sign in without exposing credentials. Sessions can be scoped per thread or per user so logins persist, and a private localhost bridge lets the browser reach apps running in the agent's sandbox for end-to-end testing, with passing runs exportable as Playwright scripts. On 100 WebVoyager tasks the toolset passed 90% for $1.98 total, versus 89% at 9x the cost for Browserbase's MCP server.

  • Building with Modal and the OpenAI Agents SDK

    Modal mediumAdept

    A custom agent harness built on the OpenAI Agents SDK runs coding agents inside Modal Sandboxes, optionally with GPUs, rather than on the host, where an unsandboxed exec tool can be abused by malicious prompts. The harness grows step by step: SQLite-backed Sessions for memory, an orchestrator that delegates to subagents with fresh context windows to limit context rot, and an asyncio-based subagent pool for parallel, non-blocking work. Hooks and a set_status tool let the orchestrator monitor subagents, and per-GPU-type quotas cap spend. Filesystem snapshots are also used to avoid duplicated work. The worked example targets OpenAI's Parameter Golf challenge, with parallel MNIST training as an intermediate test.

The quest for software engineering knowledge.

Look:
Layout: