Skip to content

Prebuilt images #493

Done
Done

Description

@rakyll

Once TaskSpec is finalized, publish prebuilt Task images for common workloads, so running one doesn't require writing and maintaining a Dockerfile:

  • Antigravity: runs a program that uses the Antigravity SDK.
  • Claude Code: Node.js and the claude CLI (@anthropic-ai/claude-code).
  • Codex: Node.js and the codex CLI (@openai/codex).
  • Jupyter: Python with Jupyter installed, so a task can run notebooks, for example with jupyter nbconvert --execute.
  • Browser: Playwright with headless Chromium, for web-browsing agents and end-to-end tests of web apps.

The images take care of the plumbing: MCP servers, skills, and other configuration declared in the task's Workspaces are set up in each harness automatically, so users don't have to configure every agent themselves.

apiVersion: ax.io/v1alpha1
kind: Task
metadata:
  name: fix-tests
spec:
  image: gcr.io/ax-substrate/ate-images/claude-code  # name to be decided
  command: ["claude", "-p", "Fix the failing tests"]
  workspaces:
    - name: default-workspace

API server

The coding agent images (Antigravity, Claude Code, and Codex) can also expose an API server, so clients can interact with the agent running in a task instead of only passing it a prompt through command. The protocol is TBD.

Activity

  1. added
    devx
    on Oct 15, 2026
  2. MushuEE commented on Nov 14, 2026

    @MushuEE
    Collaborator

    Live E2E check: Claude Code task image + mock Anthropic fake

    We ran the Claude Code task image end to end on AX, using the mock-anthropic fake from agentexecutor/images#2 instead of the real API. These are the results and how the test is set up.

    Setup

    Component Version
    Agent Substrate v1.0.0 (published images), gVisor sandbox class, 3-worker gVisor WorkerPool on GKE
    AX main @ 6887762 (ax-server + PostgreSQL, built from source)
    Claude Code task image Dockerfile.claude-code on top of the ax-task-runner image from the same commit; Claude Code 2.1.325
    Fake inference server fakes/mock-anthropic from agentexecutor/images#2 @ a1a71b4, unmodified, running as a Deployment and Service in its own namespace, outside the sandbox

    How it fits together:

    sequenceDiagram
      participant H as Test harness
      participant AX as ax-server
      participant CC as Claude Code (runner, gVisor actor)
      participant E as Substrate egress
      participant F as mock-anthropic (in cluster)
      H->>F: POST /_mock/reset
      H->>AX: ax apply (Gateway + Task), ax resume
      AX->>CC: resume actor, runner starts claude --print
      CC->>E: POST /v1/messages (x-api-key from spec.env)
      E->>F: allowed by the Gateway http rule
      F-->>CC: SSE reply (MOCK_OK) or 401
      H->>F: GET /_mock/requests (count, auth_ok)
    
    Loading
    • Gateway: a single egress rule, http to the fake's Service hostname on port 8080. No allow-all.
    • Task:
      • spec.config sets prompt, model, maxTurns: 3 and dangerouslySkipPermissions: true.
      • spec.env sets ANTHROPIC_BASE_URL (pointing at the fake) and ANTHROPIC_API_KEY, a throwaway value that matches the fake's EXPECTED_KEY.
      • spec.gateway points at the Gateway above.
    • Assertions:
      • The fake's request log: count, path, auth_ok, key_presented.
      • The runner's log line for the command exit, plus the Claude Code output.
      • The AX task state.

    Results

    Case Fake request log Claude Code AX task state
    Happy path (correct key) 1 × POST /v1/messages?beta=true, auth_ok=true Printed MOCK_OK, exit 0 about 1.4 s after start Working / Ready=True
    Wrong key 11 × POST /v1/messages?beta=true, all auth_ok=false Invalid API key, exit 1 after about 3 min Working / Ready=True

    What we learned:

    1. The image, the launcher, egress and the fake work together. The narrow Gateway rule was enough. With CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1 (set in the image), Claude Code sent only /v1/messages: no count_tokens, no model listing, no side requests.
    2. AX doesn't move a task to Completed or Failed when its command exits. Task state follows the actor's state only, so the task stays Working and keeps its worker until it is suspended or deleted. runner.Config.OnCommandExit exists but isn't wired to anything that reports the exit to the server. Until it is, "task reaches Completed/Failed" can't be asserted in E2E tests. This deserves its own issue.
    3. A wrong key doesn't fail fast. Claude Code retried the rejected request 11 times over about 3 minutes before exiting. Every request had x-stainless-retry-count: 0, so these are Claude Code's own retries, not the SDK's. E2E time budgets for auth-failure cases need to allow for this, or the image should set a Claude Code retry limit.
    4. Scripted tool use, fault modes, the Vertex path, suspend/resume and gateway credential injection aren't covered yet. They're next on the same setup.
  3. rakyll commented on Nov 25, 2026

    @rakyll
    MemberAuthor

    This is done now.

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

    devx

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions