Skip to content

feat: ate-local — zero-Kubernetes local Substrate Control + Router daemon (Apple container & Podman) with cross-cluster task mobility #602

Not planned

Description

@ghchinoy

Context & Relationship to ax local (#603)

PR #603 (ax local <start|status|stop|delete>, closing #526) gives AX a self-contained Kubernetes 1.36 (kind) + Agent Substrate v1.0.0 + gVisor parity stack. By design, ValidateContainerHost in #603 enforces the host requirements of nested K8s + atelet:

  1. A rootful Docker or Podman engine (on macOS: OrbStack, Docker Desktop, or Colima with a persistent 4–8 GiB RAM Linux VM).
  2. A Linux >= 6.8 kernel (required by Substrate's fsconfig OverlayFS lowerdir+ image cache).
  3. Registry-pushed @sha256 digests for --server-image and task images.

Meanwhile, the Local Development roadmap (#560: "Install and run AX locally without having to set up container tooling or a Kubernetes cluster"), AX Studio (#543 / #627: zero-dependency laptop sandboxes), and developers on Apple Silicon laptops or rootless Podman / Linux < 6.8 hosts benefit from a fast, zero-Kubernetes tier that still speaks the exact Agent Substrate APIs:

Dimension ax local Kind Backend (#603) ate-local Backend (#602 — Apple container & Podman)
Target Use Case Full K8s + gVisor + Envoy MITM credential injection + SPIFFE mTLS parity before GKE Sub-second agent/skill/MCP iteration, multi-agent swarms, zero-VM laptop mode for AX Studio (#543 / #627)
Cold Bootstrap / Wakeup ~45–90s cluster bootstrap (~10 system images) ~3.3s stack up; 0.70s microVM resume
macOS Idle Footprint Persistent 4–8 GiB RAM Linux VM (Colima / OrbStack / Docker Desktop) 0 GiB persistent VM on native macOS Apple container (0.07% idle CPU; microVMs stop on ax suspend)
Rootless Podman / Docker Blocked (proxy_arp node sysctls & privileged atelet DaemonSet require rootful mode) Supported (--runtime podman uses unprivileged -p 127.0.0.1::<port> port publishing)
Linux Host Kernel < 6.8 Blocked (requires fsconfig lowerdir+) Supported (standard OCI container/microVM rootfs + .tar.gz /workspace staging)
Local / Unpinned Images Requires registry @sha256 digests (crane.Digest) Runs host ax-server directly + local image tags (debian:12, python:3.12-slim) with /opt/ax & /usr/local/bin runner injection (#620)

Proposal: ate-local

Add cmd/ate-local (internal/atelocal), a lightweight local daemon that implements both the Agent Substrate v1.0.0 Control gRPC API (go.ate.dev/substrate/api/ateapi/v1.ControlServer) and an embedded atenet-router data plane (ate-target-actor HTTP/1.1 + unencrypted HTTP/2 h2c reverse proxy with on-demand actor wake-up), backed directly by native macOS Apple container (Virtualization.framework) or Podman.

ax-server and ax connect to ate-local using their existing flags and environment variables—requiring zero changes to core AX packages (internal/{server,controller,substrate,store}, runner/, pkg/apis/v1alpha1):

ax CLI ──gRPC (:8090)──────────> ax-server ──Control gRPC (:50051)──> ate-local ──> Apple container / Podman
  │                                  │                                    ▲
  └─ATENET_ROUTER_ADDR (:50051)──────┴──ate-target-actor (h2c / HTTP)─────┘

Capabilities Implemented (Rebased on main at f4a9203)

  1. Pluggable Local Runtimes (apple & podman):
    • runtime: apple (default on macOS): Uses /usr/local/bin/container on Virtualization.framework; each resumed actor receives a routable vmnet IP (192.168.64.x).
    • runtime: podman (rootless or rootful): Launches containers with -p 127.0.0.1::<port> and reports 127.0.0.1:<hostPort> so macOS Podman Machine and rootless Linux namespaces work without privileged bridges.
  2. Embedded atenet-router (ATENET_ROUTER_ADDR):
  3. v1alpha1 Profile, Gateway, Runner Volume (controller, substrate: mount the runner from a read-only image volume #620) & Snapshot Tag Parity (Epic: v1alpha1 API updates (Profile, Workspace, Task, Gateway) #563, feat(workspace): support pre-warmed workspace snapshots #584–task: update v1alpha1 Task and ObjectMeta schema and update codebase #587):
  4. Single-Cluster & Multi-Cluster Task Mobility (examples/ate_local/local-stack.sh):
    • make local-up (~3s startup): Starts PostgreSQL, ate-local, and ax-server.
    • make local-multi-up + local-stack.sh migrate <task>: Runs Cluster A on Apple container (:8090/:50051) and Cluster B on podman (:8091/:50052) sharing .ax-local/snapshots/, complementing ax promote (ax: add promote to copy a task to another cluster #618) with live /workspace snapshot hydration across clusters.

Plugging into ax local (#603) & pkg/axclient (#640)

Following up on the review discussion in #603 about plugging #602 behind a provider interface:

Questions for Maintainers & Proposed PR Breakdown

  1. Packaging / Home: Would you like ate-local in-tree under internal/atelocal + cmd/ate-local (and wired behind a K8s-agnostic ax local --backend=ate-local backend alongside Kind), upstream in agent-substrate/substrate as a local ControlServer emulator, or distributed as a companion binary in ~/.ax/bin (like ax-studio in feat(cli): add ax studio launcher and install.sh studio download #627)?
  2. Proposed Stacked PRs (if in-tree looks good, scoped so each review stays small and touches 0 core AX packages in PRs 1–2):

Reference Implementation, Design Notes & Live 5/5 Hero Demo Video

A working, live-validated implementation rebased onto main (f4a9203, 0 core AX Go files modified, passing go test ./...) is available for review:

Activity

  1. added a commit that references this issue on Nov 15, 2026
  2. ghchinoy commented on Nov 16, 2026

    @ghchinoy
    Author

    Live Walkthrough Video: 5/5 v0.1 Hero Demo on ate-local (Apple container + Rootless podman)

    Recorded a ~3-minute end-to-end walkthrough running all 5 steps of the v0.1 Hero Demo (#590) live (5/5 🟢 PASS) against ate-local—with zero Kubernetes and zero Docker/Colima—driven from AX Central (wrapping the headless CLI/scripts per #543):

    What's shown live in the recording:

    1. Dual-cluster zero-K8s Substrate: Cluster A on macOS native Apple container (:8090 / :50051) + Cluster B on default rootless podman (:8091 / :50052), each speaking ateapi/v1.ControlServer gRPC + embedded atenet-router (ate-target-actor HTTP/2 h2c).
    2. Pre-boot warm Tag snapshot (feat(workspace): support pre-warmed workspace snapshots #584): hero-demo-ws runs spec.setup.commands once and mints a COMPLETED hero-demo-ws-warm Tag.
    3. Multi-turn A2A session across scale-to-zero: Digest-pinned starter agent adds subtract(a, b) + unit test on Turn 1, suspends to 0 CPU/RAM, cold-boots on resume, and recalls Turn 1 on Turn 2 (with OTel trace waterfall + wake-on-prompt).
    4. Unmodified stock python:3.12-slim: ate-local injects ax-task-runner and mounts the warm snapshot before PID 1 boots—skipping git init on an image without git and passing 2/2 unit tests (add + subtract).
    5. Cross-cluster promotion & Move Task: Unchanged manifests promoted onto Podman Cluster B via shared snapshot store, plus zero-shared-storage /workspace streaming over ax ssh.
  3. ghchinoy commented on Nov 25, 2026

    @ghchinoy
    Author

    Quick status update: I rebased ghchinoy:feat/ate-local-apple-container onto main (0bbe4f6) with the post-#688 / #731 / #756 / #757 architecture (TaskManager, --router-url, inbound port-80 push, ActorState-aligned TaskState, zero core AX packages modified; removed the temporary pull-runner OIDC shim for -203 LOC).

    I also ran the new ./hack/tour.sh end-to-end against ate-local (Apple container microVMs) in ~35s: Task, Gateway, Workspace setup (git + files + commands) & Tag snapshot fan-out, ax ssh, suspend/resume, multi-tenant atespaces, and Model CRUD all pass. I documented the two expected atenet-egress L7/Kubernetes Secret deltas in docs/ate-local.md.

  4. rakyll commented on Nov 25, 2026

    @rakyll
    Member

    Closing as stale; it was built on ax-task-runner, and ax local covers the local tier.

    We are closing this as part of a cleanup after the significant changes in v0.4.0, because it is probably obsolete or out of scope now. If you think this is a mistake, please reopen it (or leave a comment if you can't reopen it).

  5. ghchinoy commented on Nov 25, 2026

    @ghchinoy
    Author

    Makes sense — thanks for the clarity on keeping google/ax focused on Kind-based ax local. Since the daemon only implements Agent Substrate's v1.0.0 ControlServer + atenet-router with zero changes to google/ax, I extracted it into a standalone repo at https://github.com/ghchinoy/substrate-local (pkg/sublocal) that works against unmodified upstream ax / ax-server (v0.4.0-rc.2+), so there's no need to reopen this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions