architecture13 min read

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

1 similar post
  • Amazon EC2 Mac
  • Amazon S3
  • Devin
  • Xcode
  • iOS Simulator

AI Summary

Cognition scaled its AI software engineer, Devin, to support macOS by running virtualized instances on Amazon EC2 Mac dedicated hosts. By leveraging the Apple Virtualization framework, a custom NBD-backed snapshotting storage architecture, and user-space Ethernet gateways for security policies, Cognition starts fresh macOS development environments in under a minute. This allows Devin to autonomously build, test, and interact with iOS and macOS applications using the native accessibility tree and iOS Simulator.

Key Takeaways

  • Cognition runs up to two macOS guest VMs per bare metal EC2 Mac host to comply with Apple's Software License Agreement limits.
  • A custom Network Block Device (NBD) frontend connects the Virtualization framework to Cognition's snapshot storage system for fast VM initialization.
  • Using file-handle network attachments and a user-space Ethernet gateway avoids conflicts with macOS pf rules, ensuring robust session policy enforcement.

Why it matters

Running macOS workloads in the cloud presents distinct licensing, hardware virtualization, and networking challenges. This architecture provides a blueprint for engineering teams looking to scale Apple platforms for automated agents, continuous integration, or large-scale testing fleets without maintaining physical data center hardware.

Conversation0

What would you add from your experience?

Checking your session…

Every good conversation starts with one perspective.