Skip to content

Refresh ax server dependency(go.mod) and use the shared ax client - #7

Merged
YoyinZyc merged 2 commits into
agentexecutor:web-studiofrom
YoyinZyc:web-studio
Nov 19, 2026
Merged

YoyinZyc merged 2 commits into
agentexecutor:web-studiofrom
YoyinZyc:web-studio

Conversation

@YoyinZyc

Copy link
Copy Markdown
Collaborator

What changed

  1. AX dependency bump: go.mod now points at google/ax main (f3566111).
  2. Connections go through the public github.com/google/ax/client: Studio's own copy of the tunnel and kubeconfig code is deleted (internal/kube/tunnel.go, context.go, local.go). Every handler passes its request context to dialAXForContext.
  3. Local cluster state comes from ax local status -o json: Studio no longer probes the container engine and kind itself.
  4. Running on another cluster is ax promote only: Studio's own move is deleted (move.go, /api/tasks/move, and its UI).

It should address #4 (comment)

Behaviour changes relative to #4

Run on another cluster (the biggest change)

  • The "Copy its files" option is gone; ax promote does not copy the sandbox's /workspace.
  • You can't stop a send in progress, and there is no step-by-step progress list. Cancel is disabled while sending.
  • There is no fallback where Studio sends the task itself when ax has no promote. Whatever ax promote prints as an error is shown as is.
  • The background task-move operation is gone, along with its toasts and the "Show it" button.
  • "Delete it" still works: Studio deletes the original after ax promote succeeds.

Local environment checks

  • The status and wording of the container-runtime row now come from ax, so they may differ from what Serve the new AX Studio UX from the web app and connect live AX flows #4's own probing said.
  • It needs an ax that supports ax local status -o json (after #640). If that can't be read, the row shows a warning and does not block start.
  • The kind-prefix context fallback is removed; the local cluster's context is whatever ax reports.

Connections

  • Port-forwards now share the same tunnel records as the ax CLI.
  • A cancelled request stops waiting for a port-forward that is still starting; one that is already up is unaffected.

Studio now builds against AX main, where the proto field numbers, the
goal field (goal.text) and the Delete RPCs' responses changed.

- Connect through github.com/google/ax/client (ServerURL, Dial,
  CurrentContext, ListContexts) and drop Studio's own copy of the tunnel
  and kubeconfig code. Every handler passes its request context, so a
  request that is cancelled stops waiting for a port-forward.
- Read the local cluster from `ax local status -o json` instead of
  probing the container engine and kind.
- Running a task on another cluster is `ax promote` only. Studio's own
  move (POST /api/tasks/move) and its UI are removed.
Set up, Start, Update, Repair, Stop and Remove each get a tooltip that
names the ax command it runs and what happens to your tasks.

@mayawang mayawang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Yuchen! Nice to see the tunnel code go through the shared client. @Raji14 might be worth a quick look since this touches your #4 code

@YoyinZyc
YoyinZyc merged commit 85878b4 into agentexecutor:web-studio Nov 19, 2026
YoyinZyc added a commit that referenced this pull request Nov 19, 2026
* Add the baseline for ax studio web app- #3

AX Studio was an Electron app whose main process ran `ax` for the UI. It is
now one Go binary, ax-studio, that serves the React UI and a small API on
127.0.0.1:8080 and opens it in the browser.

The server stays thin: `ax` remains the source of truth, and the server only
does what a browser cannot.

- Run an allow-list of `ax` subcommands for the UI (version, ctx, get,
  apply, delete, suspend, resume, promote).
- Stream the output of `ax local start|stop|delete` and `ax install` to the
  page.
- Show, discard, apply locally, and push the uncommitted Git changes in a
  debug task's sandbox, over `ax ssh`.
- Store an API key as a cluster Secret labelled ax.io/credential, read from
  stdin, for a Gateway to inject.
- Bridge `ax ssh` sessions to the in-page terminal.

The UI is updated for the v1alpha1 API: goal, sessionId, profile, workspace
setup, and Gateways with egress allow-lists. Promotion runs `ax promote`.

The server binds only to loopback, rejects other Host and Origin values, and
requires a per-process session cookie plus a CSRF token for every change.

From AX it imports only github.com/google/ax/pkg/apis/v1alpha1.

* Serve the new AX Studio UX from the web app and connect live AX flows (#4)

* Serve the new AX Studio UX from the web app and connect live AX flows

Serves ux/ at / from ax-studio (embedded in the binary, or from disk with
--ux-dir for development; when dist/ is also built, the previous React pages
stay at /classic/ for comparison). In a plain static server (python3 -m
http.server in ux/), ux/env.js leaves window.AX_STUDIO null so the demo and
review routes continue to run unchanged.

Connected to the Go server (/api/* and /api/events SSE) and verified against a
live ax-local Kind + Agent Substrate + gVisor cluster:
- First-run setup (Set up AX on this computer) with real preflight checks,
  custom server and task-runner image digests, streamed setup progress, and
  Start / Stop / Remove lifecycle controls (including a checkpoint guard that
  offers to pause running tasks before ax local stop).
- Where agents run: AX on this computer plus every cluster in the kubeconfig,
  with Spring-to-Lake Aqueduct visual and per-cluster reachability, version
  mismatch, and missing-install diagnostics. Studio remembers the selected
  cluster locally without mutating the user's kubeconfig.
- Home: live task list grouped by multi-turn session, 4-stage pipeline bar,
  quick-goal launcher, starter ideas, and Axel in the Clear Spring pool.
- New task and multi-turn follow-up: Antigravity, Claude Code, and Your own
  image templates, prompt-clarity helper pills, 4-step readiness card with
  Axel, visual Guardrails gateMap, editable ax.io/v1alpha1 Gateway + Workspace
  + Task YAML, Secret creation outside the sandbox, and automatic goal.text to
  goal.spec fallback for older ax-server images.
- Task page: Pause (SuspendTask), Resume (ResumeTask), Delete, Send a
  follow-up, Run on another cluster (ax promote --preflight-only then promote),
  uncommitted sandbox Changes with per-file diffs, per-file Discard, Apply to a
  local folder, Push to a branch, in-page interactive Terminal (ax ssh over
  /api/sessions/* and SSE), and Sandbox & network gateMap.
- Live Command Palette (Cmd/Ctrl+K), keyboard shortcuts (?), and "Why an
  axolotl?" story dialog.

Server fixes and additions:
- internal/studio/tasks.go: GET /api/tasks, GET /api/tasks/get, POST
  /api/tasks/{suspend,resume,delete,apply-yaml}.
- internal/studio/sandbox.go & server.go: POST /api/tasks/discard-file and
  git status --untracked-files=all so new files inside new directories show up
  in Changes.
- internal/studio/guest.go: per-cluster mutex around EnsureGuestEndpoint so
  concurrent requests share a single port-forward tunnel.
- internal/studio/env.go: container runtime check distinguishes "not installed"
  from "daemon not running" on Linux; local-up retries once after a 2s warm-up
  on transient kube-apiserver RBAC 403 ("nodes is forbidden") right after
  docker start, and clears stale failed local-up state once ax-local is healthy.
- internal/kube/exec.go & local.go: BinDir() honors AX_HOME when AX_BIN_DIR is
  unset, and InspectLocalCluster falls back to kind-<name> context if needed.

* Complete live AX Studio UX parity, task move fallback, All tasks, and Settings

- Environment (Where agents run): tool discovery, local health states with
  Update/Repair, stage durations, cancelable operations with exit codes,
  AX image persistence, read-only remote cluster checks, install/upgrade/
  uninstall flows, and collapsible cluster guide disclosures.
- Tasks & resources: searchable/filterable All tasks view (#/tasks), worker
  Logs tab with agent-exit error detection, Workspaces/Gateways/Models
  listing and unused cleanup, multi-shell sandbox terminal with history/ANSI
  colors/Ctrl keys, and Studio-managed task move fallback (/api/tasks/move)
  when ax lacks promote.
- New task, Home, Settings & navigation: prototype four-step New task layout
  with Customize workspace and More options, user greeting on Home, cluster
  switcher in the sidebar footer card, deep links, browser notifications,
  and consolidated Settings tabs.

* Remove default task image setting (#9)

* Remove the default task image from Studio

AX is dropping the default task image: a task that names no image will
be rejected. Studio no longer asks for one at setup or install, passes
--default-task-image to `ax local start` and `ax install`, or reads
AX_DEFAULT_TASK_IMAGE to show it in Settings and suggest it on New task.
The AX server image and the runner volume image stay.

* Show this computer and the kubeconfig before the first cluster answers

The page drew nothing until the task list came back, so with a cluster
that can't be reached it stayed on "Checking…" for over a minute.
Render as soon as the environment is read.

* Add a tag-triggered release workflow (#8)

* Add a tag-triggered release workflow

Pushing a vX.Y.Z[-PRERELEASE] tag tests ax-studio, builds it for Linux and
macOS (amd64 and arm64) with `make dist`, and publishes the four archives
and checksums.txt to a GitHub release for the tag. The binary reports the
tag as its version, and a tag with a "-" is published as a prerelease.

A manual run builds the archives and keeps them as workflow artifacts
without publishing.

The build runs npm packages, so the checkout leaves no token in the git
config and only the publishing step is given one.

* remove clobber

* Refresh ax server dependency(go.mod) and use the shared ax client (#7)

* Use the ax client package and ax promote, and build against current AX

Studio now builds against AX main, where the proto field numbers, the
goal field (goal.text) and the Delete RPCs' responses changed.

- Connect through github.com/google/ax/client (ServerURL, Dial,
  CurrentContext, ListContexts) and drop Studio's own copy of the tunnel
  and kubeconfig code. Every handler passes its request context, so a
  request that is cancelled stops waiting for a port-forward.
- Read the local cluster from `ax local status -o json` instead of
  probing the container engine and kind.
- Running a task on another cluster is `ax promote` only. Studio's own
  move (POST /api/tasks/move) and its UI are removed.

* Say what the buttons for AX on this computer do when you point at them

Set up, Start, Update, Repair, Stop and Remove each get a tooltip that
names the ax command it runs and what happens to your tasks.

---------

Co-authored-by: Rajitha Leonhard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants