← Back to blog
Product·April 25, 2026·5 min read

The local agent, explained

Why Apirex builds run on your machine, what the agent installs, and how we keep your source code private.

AT
Apirex Team
Building Apirex · apirex.in
The local agent, explained

Most AI tools run their builds in the cloud. We don't. Apirex builds run locally on your laptop via the local agent. This is the most-questioned design decision we've made, so let's walk through it.

Why local#

Three reasons: privacy, cost, and speed. Privacy because your source code never leaves your filesystem. Cost because Android builds are CPU-heavy and we don't want to pass cloud-build minutes back to you as inflated pricing. Speed because incremental builds on your machine take 30 seconds; cloud cold-starts take 4 minutes.

What the agent installs#

On first run: JDK 17, Android SDK platform tools and build tools, the Gradle wrapper, and the Apirex CLI. Total disk: ~600 MB. The installer scripts are open and audited; you can read every line before running them.

How it talks to us#

The agent maintains an outbound websocket to our planning service. It sends app specs (structured JSON, never raw source) and receives generated Kotlin files. All transport is TLS 1.3 with certificate pinning. No inbound ports are opened on your machine.

What stays local#

Your repository, your keystore, your environment variables, your build cache, and your generated code. We never have a copy. If you cancel your subscription, the agent stops talking to us — but everything you've already built keeps building.

Headless mode for CI#

The same agent runs in CI (GitHub Actions, GitLab, Jenkins) without a UI. Your CI server becomes the build environment; planning still happens on our service. This is how teams set up automated nightly builds.