feat: add AGX microVM SSH-lease provider#351
Conversation
Add `provider: agx` for direct AGX (https://www.agx.so) Linux microVM leases. AGX exposes fast-booting microVMs over a workspace SSH gateway (ssh <user>+<instance>@workspace.agx.so), so this is an SSH-lease backend: core keeps ownership of slugs, per-repo claims, per-lease keys, rsync sync, command streaming, and list/status rendering, while the adapter owns the AGX control-plane instance lifecycle and key registration. - internal/providers/agx: provider.go (registration + Spec), backend.go (Acquire/Resolve/List/Doctor/ReleaseLease/Touch/Cleanup + flags), client.go (provisional /v1/instances control-plane client), core.go (core helper wrappers), and fake-client tests that run without live credentials. - Register in internal/providers/all and add an AGXConfig surface (env/file/flags) with the API key read only from the environment. - Docs: docs/providers/agx.md, provider-metadata.json, regenerated provider matrix, README provider table, source-map, and a CHANGELOG entry. AGX is early access (ships Summer 2026) and does not publish a stable control-plane contract yet, so the /v1/instances API modeled here is provisional and overridable via --agx-api-url / --agx-workspace. Closes openclaw#341 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Codex review: needs real behavior proof before merge. Reviewed June 14, 2026, 11:19 AM ET / 15:19 UTC. Summary Reproducibility: yes. for the review finding: source inspection of the PR head shows Review metrics: 3 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Land AGX only after maintainers approve the built-in SSH-only provider contract, host-key handling is safe, the PR body matches the current head, and redacted live AGX proof shows the real lease flow. Do we have a high-confidence way to reproduce the issue? Yes for the review finding: source inspection of the PR head shows Is this the best way to solve the issue? No, not yet. The SSH-only provider shape is plausible, but merge-ready implementation should preserve normal SSH host-key protections or use an explicit maintainer-approved trust model, plus product approval and live provider proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d3d1891aafa7. Label changesLabel changes:
Label justifications:
Evidence reviewedSecurity concerns:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Research against AGX's published material (agx.so + Loophole Labs) found no control-plane API, auth contract, or CLI — only the SSH connection shape `ssh <user>+<instance>@workspace.agx.so` and the explicit stance "no SDK required, no custom client — if it can ssh, it can work on AGX." The first draft's invented /v1/instances REST client + API key contradicted that, so this reworks the provider to commit only to the documented interface: - Remove the REST control-plane client and API-key requirement; authenticate with the operator's own SSH key (cfg.SSHKey), as AGX onboarding registers it. - Provision on connect: build the `<user>+<instance>` SSH target and wait for readiness; the slug is the stable instance name. - Back List/Resolve with local lease claims and make release local-only (AGX reclaims idle sandboxes); drop FeatureCleanup since there is no inventory API. - Trim AGXConfig to workspace/user/workRoot (no token/apiUrl/region/image). - Update tests (no fake HTTP client), docs, provider metadata, and the regenerated matrix; document the early-access unknowns and cite Drafter. Closes openclaw#341 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Updated the provider to match AGX's published interface after checking their docs. Research finding: AGX (agx.so) currently publishes no control-plane API, auth contract, or CLI — only the SSH connection shape Change: the first draft invented a
Still pending a maintainer/product decision (the original issue is tagged Verified: |
Summary
Adds
provider: agxfor direct AGX Linux microVM leases, closing #341.AGX exposes fast-booting microVMs over a workspace SSH gateway —
ssh <user>+<instance>@workspace.agx.so("if it can ssh, it can work on AGX"). That maps to an SSH-lease backend (ProviderKindSSHLease), so core keeps ownership of slugs, per-repo claims, per-lease SSH keys, rsync sync, command streaming, andlist/statusrendering, while the adapter owns only the AGX control-plane instance lifecycle and per-lease key registration.Built to mirror the existing self-contained SSH-lease sandbox providers (Sprites/Morph): in-package API client, core helper reuse, and label-based ownership.
What's included
internal/providers/agx/:provider.go(registration +Spec),backend.go(Acquire/Resolve/List/Doctor/ReleaseLease/Touch/Cleanup+ flags),client.go(control-plane client),core.go(core helper wrappers), andbackend_test.go.internal/providers/all/all.go.AGXConfigconfig surface (env → file → flags). The API key is read only from the environment (CRABBOX_AGX_API_KEY/AGX_API_KEY/AGX_TOKEN), never persisted to config or placed on argv, perAGENTS.md.docs/providers/agx.md,docs/providers/provider-metadata.json, regenerateddocs/providers/README.mdmatrix, root README provider table,docs/source-map.md, and a CHANGELOG entry.Capabilities
FeatureSSH,FeatureCrabboxSync,FeatureCleanup; Linux only;CoordinatorNever.--class,--type, and--tailscaleare rejected. Conservative feature set on purpose — no over-claimed native checkpoint/fork surfaces.Config / secret implications
CRABBOX_AGX_API_KEY/AGX_API_KEY/AGX_TOKEN--agx-api-url/--agx-workspace/--agx-user/--agx-work-root/--agx-region/--agx-imageEarly-access caveat
AGX ships Summer 2026 and does not publish a stable control-plane contract yet. The
/v1/instanceslifecycle API modeled here is provisional and overridable via--agx-api-url/--agx-workspace; the SSH transport follows AGX's documented<user>+<instance>@<workspace>shape. Flagging for maintainer review since the original issue is taggedneeds-product-decision— happy to adjust the auth/lifecycle contract to whatever AGX publishes.Verification
All pass; tests use a stubbed HTTP transport and run without live credentials.
🤖 Generated with Claude Code