Repository navigation
Description
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:
- A rootful Docker or Podman engine (on macOS: OrbStack, Docker Desktop, or Colima with a persistent 4–8 GiB RAM Linux VM).
- A Linux >= 6.8 kernel (required by Substrate's
fsconfigOverlayFSlowerdir+image cache). - Registry-pushed
@sha256digests for--server-imageand 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)
- Pluggable Local Runtimes (
apple&podman):runtime: apple(default on macOS): Uses/usr/local/bin/containeronVirtualization.framework; each resumed actor receives a routablevmnetIP (192.168.64.x).runtime: podman(rootless or rootful): Launches containers with-p 127.0.0.1::<port>and reports127.0.0.1:<hostPort>so macOS Podman Machine and rootless Linux namespaces work without privileged bridges.
- Embedded
atenet-router(ATENET_ROUTER_ADDR):- Multiplexes HTTP/1.1 (
/readyz) and unencrypted HTTP/2 (h2cgRPC forax sshand A2A) on theate-locallistener usingate-target-actor: <atespace>/<actor>, waking suspended actors on demand (AX keeps saying a task is Suspended after a request wakes it #502, task: update v1alpha1 Task and ObjectMeta schema and update codebase #587).
- Multiplexes HTTP/1.1 (
v1alpha1Profile,Gateway, Runner Volume (controller, substrate: mount the runner from a read-only image volume #620) & SnapshotTagParity (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):- Supports
Profile(image, CPU/memoryresources,ateActorTemplate),Gateway(defaultActorEgressPolicy),ActorUid/CreateTime/UpdateTime(The Ready condition's update time changes on every read, even when nothing changed #539, Expose live Substrate actor UIDs in task status and describe output #556),/opt/ax/ax-task-runnerrunner-volume mounts (controller, substrate: mount the runner from a read-only image volume #620), andTagCRUD (CreateTag,GetTag,ListTags,DeleteTag) +CreateActor(source_tag)seeding. - Implements
SNAPSHOT_FIDELITY_VOLUMESviasnapshot_dir:SuspendActorarchives/workspace(preserving/workspace/.ax/initializedper Workspace maiden-run marker under /ax is lost on volumes-only resume #518/workspace: keep the maiden-run marker on the workspace volume (#518) #551, with host-dir fallback for exited batch tasks) andResumeActorpre-stages it before PID 1 boots (including lazy warmTagpre-warming forWorkspaceSpec.setupuntilSetupCoordinatorin feat(workspace): support pre-warmed workspace snapshots #584 is wired).
- Supports
- Single-Cluster & Multi-Cluster Task Mobility (
examples/ate_local/local-stack.sh):make local-up(~3s startup): Starts PostgreSQL,ate-local, andax-server.make local-multi-up+local-stack.sh migrate <task>: Runs Cluster A on Applecontainer(:8090/:50051) and Cluster B onpodman(:8091/:50052) sharing.ax-local/snapshots/, complementingax promote(ax: add promote to copy a task to another cluster #618) with live/workspacesnapshot 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:
- In feat(cli): add ax local, ax install/uninstall, and one-line installer #603,
cluster.Provider(Up() -> KubeContext) abstracts Step 1 (the K8s cluster) beforerunLocalcalls K8s-specificinstallsubstrate.Bootstrapandaxdeploy.Install. - Lifting a small K8s-agnostic
local.Backendinterface (Start,Stop,Status,Delete) one level up incmd/ax/install_cmd.go—paired with a lightweight non-K8s local context entry in~/.ax/resolved byinternal/tunnel/pkg/axclient(feat(axclient): add a public client package for reaching ax-server #640)—letsax local --backend=kind|ate-local(andax ctx,ax promote,ax studio) work uniformly across Applecontainer, rootless Podman, Kind, and GKE withoutsource .ax-local/env.
Questions for Maintainers & Proposed PR Breakdown
- Packaging / Home: Would you like
ate-localin-tree underinternal/atelocal+cmd/ate-local(and wired behind a K8s-agnosticax local --backend=ate-localbackend alongside Kind), upstream inagent-substrate/substrateas a localControlServeremulator, or distributed as a companion binary in~/.ax/bin(likeax-studioin feat(cli): add ax studio launcher and install.sh studio download #627)? - Proposed Stacked PRs (if in-tree looks good, scoped so each review stays small and touches 0 core AX packages in PRs 1–2):
- PR 1:
internal/atelocal+cmd/ate-localcoreControlServer, embeddedatenet-routerproxy,apple+podmanrunners,/opt/axrunner-volume mirroring (controller, substrate: mount the runner from a read-only image volume #620), and unit tests (0 core AX files touched). - PR 2:
/workspacesnapshot archive/restore, pre-boot warmTaghydration +source_tagseeding, and cross-cluster (apple<->podman) migration tests. - PR 3: Either
examples/ate_local/local-stack.sh+docs/ate-local.md, or directax local --backend=ate-local+~/.axcontext integration on top of feat(cli): add ax local, ax install/uninstall, and one-line installer #603 / feat(axclient): add a public client package for reaching ax-server #640.
- PR 1:
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:
- Experiment Track & Post-feat(cli): add ax local, ax install/uninstall, and one-line installer #603 Integration Notes:
ghchinoy/ax-experiments/ate-local(seeAX-SETUP.mdfor howate-localplugs intoax local) - Live Walkthrough Video (5/5 v0.1 Hero Demo across Apple
container+ rootlesspodman): Watch ~3m Recording (Walkthrough Guide) - Branch:
ghchinoy/ax@feat/ate-local-apple-container - Diff against
main:main...ghchinoy:ax:feat/ate-local-apple-container - Architecture & Dual-Cluster Walkthrough Doc:
docs/ate-local.md
Activity
docs(atelocal): link google#602, index docs/ate-local.md in README, a…
ghchinoy commentedon Nov 16, 2026
Live Walkthrough Video: 5/5 v0.1 Hero Demo on
ate-local(Applecontainer+ Rootlesspodman)Recorded a ~3-minute end-to-end walkthrough running all 5 steps of the v0.1 Hero Demo (#590) live (
5/5 🟢 PASS) againstate-local—with zero Kubernetes and zero Docker/Colima—driven from AX Central (wrapping the headless CLI/scripts per #543):ghchinoy/ax-central:docs/hero-demo.mdghchinoy/ax-experiments:hero-demo/run-live.sh(andRUN_LIVE_STEPS=1 ATE_LOCAL=1 ./hack/hero-demo/run.shon the reference branch)What's shown live in the recording:
container(:8090/:50051) + Cluster B on default rootlesspodman(:8091/:50052), each speakingateapi/v1.ControlServergRPC + embeddedatenet-router(ate-target-actorHTTP/2h2c).Tagsnapshot (feat(workspace): support pre-warmed workspace snapshots #584):hero-demo-wsrunsspec.setup.commandsonce and mints aCOMPLETEDhero-demo-ws-warmTag.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).python:3.12-slim:ate-localinjectsax-task-runnerand mounts the warm snapshot before PID 1 boots—skippinggit initon an image withoutgitand passing 2/2 unit tests (add+subtract).Move Task: Unchanged manifests promoted onto Podman Cluster B via shared snapshot store, plus zero-shared-storage/workspacestreaming overax ssh.docs(atelocal): link google#602, index docs/ate-local.md in README, a…
docs(atelocal): document architecture, multi-cluster mobility, and up…
docs(atelocal): document architecture, multi-cluster mobility, and up…
docs(atelocal): document architecture, multi-cluster mobility, and up…
docs(atelocal): document architecture, multi-cluster mobility, and up…
docs(atelocal): document architecture, multi-cluster mobility, and up…
ghchinoy commentedon Nov 25, 2026
Quick status update: I rebased
ghchinoy:feat/ate-local-apple-containerontomain(0bbe4f6) with the post-#688 / #731 / #756 / #757 architecture (TaskManager,--router-url, inbound port-80 push,ActorState-alignedTaskState, zero core AX packages modified; removed the temporary pull-runner OIDC shim for-203LOC).I also ran the new
./hack/tour.shend-to-end againstate-local(ApplecontainermicroVMs) in ~35s:Task,Gateway,Workspacesetup (git+files+commands) &Tagsnapshot fan-out,ax ssh,suspend/resume, multi-tenant atespaces, andModelCRUD all pass. I documented the two expectedatenet-egressL7/Kubernetes Secret deltas indocs/ate-local.md.rakyll commentedon Nov 25, 2026
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).
docs(atelocal): document architecture, multi-cluster mobility, and up…
docs(atelocal): document architecture, multi-cluster mobility, and up…
ghchinoy commentedon Nov 25, 2026
Makes sense — thanks for the clarity on keeping
google/axfocused on Kind-basedax local. Since the daemon only implements Agent Substrate'sv1.0.0ControlServer+atenet-routerwith zero changes togoogle/ax, I extracted it into a standalone repo at https://github.com/ghchinoy/substrate-local (pkg/sublocal) that works against unmodified upstreamax/ax-server(v0.4.0-rc.2+), so there's no need to reopen this.