Codex Virtual Assistant is a WTL GAN-policy based web personal virtual assistant for browser-centric office work. The product source of truth is PRD.md; code under specs/ remains reference material only.
This repository now includes the first runnable product foundation outside specs/:
cmd/assistantdboots a local HTTP server.internal/assistantdefines shared run, task, attempt, evaluation, artifact, evidence, and wait-state types, plusTaskSpecnormalization defaults.internal/assistantappowns background run creation, status lookup, resume/input, and cancel orchestration over the engine and store.internal/promptingdefines the planner and evaluator JSON contracts plus strict output decoding.internal/storeowns the local SQLite schema and repository methods for runs, events, attempts, artifacts, evidence, evaluations, tool calls, web steps, and wait requests.internal/wtlnow contains the core run engine plus a concrete Codex-oriented runtime that maps agent-browser style execution traces into persisted tool calls, browser steps, evidence, and screenshot artifacts.internal/apinow exposes the run lifecycle routes and an SSE event stream backed by persisted run events and a live event broker.internal/config,internal/app, andinternal/policy/ganestablish the product bootstrap and lifecycle policy package layout.web/now contains the embedded operator UI shell served by the app.
Copy and paste this instruction to your favorite coding agent to start.
Clone this repository, install prerequisites, build it, and run it locally.
1. Clone the repository and enter it:
- Repository URL: https://github.com/siisee11/CodexVirtualAssistant
- git clone git@github.com:siisee11/CodexVirtualAssistant.git
- cd CodexVirtualAssistant
2. Install prerequisites:
- Install Go 1.26 or newer.
- Install sqlite3 and make sure it is on PATH.
- Install `ffmpeg` and make sure it is on PATH. CVA uses it to turn captured browser frames into the report video replay.
- Install the codex CLI and authenticate it so `codex app-server` can run.
- Install the `agent-browser` skill at project scope:
- npx skills add https://github.com/vercel-labs/agent-browser --skill agent-browser
3. Build the server binary:
- mkdir -p dist
- go build -o dist/assistantd ./cmd/assistantd
4. Start the app:
- ./dist/assistantd
- or run with full Codex filesystem access: ./dist/assistantd --yolo
5. Open the UI:
- http://127.0.0.1:8080
go run ./cmd/assistantdThen open http://127.0.0.1:8080.
To force the Codex app server to run with danger-full-access, start the server with:
go run ./cmd/assistantd --yoloThe server now uses codex app-server as the default execution runtime for planner/generator/evaluator phases. Make sure the codex CLI is installed, authenticated, and able to run codex app-server on your machine before you start a run from the UI.
If you want browser activity to appear as an embedded replay video in the final supervisor report, ffmpeg must also be installed and available on PATH.
Environment variables:
ASSISTANT_HTTP_ADDR: override the listen address, default127.0.0.1:8080ASSISTANT_DATA_DIR: root directory for local state, default./workspaceASSISTANT_PROJECTS_DIR: project workspace root, default<data dir>/projectsASSISTANT_DATABASE_PATH: SQLite database path, default<data dir>/assistant.dbASSISTANT_ARTIFACT_DIR: directory for generated artifacts, default<data dir>/artifactsASSISTANT_MAX_GENERATION_ATTEMPTS: default generator retry budget, default3ASSISTANT_CODEX_BIN: Codex CLI path, defaultcodexASSISTANT_CODEX_CWD: working directory given to Codex app server, default current repo rootASSISTANT_CODEX_APPROVAL_POLICY: Codex approval policy, defaultneverASSISTANT_CODEX_SANDBOX: Codex sandbox mode, defaultworkspace-writeASSISTANT_CODEX_NETWORK_ACCESS: outbound network access for Codex workspace-write turns, defaulttrue
Current completed foundation:
- local config loading and validation
- data directory and SQLite-path bootstrapping
- TaskSpec normalization and planner JSON contracts
- SQLite-backed persistence for the core run records
- WTL lifecycle orchestration for planner, generator, evaluator, retry, waiting, resume, and cancel flows
- Codex-style runtime mapping for browser-oriented evidence, tool activity, and screenshot artifacts
- run lifecycle HTTP routes and SSE event streaming
- a usable web UI skeleton for starting tasks, following live progress, reviewing evidence and artifacts, and handling waiting states
Open http://127.0.0.1:8080, describe the task in plain language, and start the run from the top form.
The page then keeps a single run view updated through the run status API and SSE stream:
- current task summary and status
- live progress timeline
- recent browser and tool activity
- collected evidence and generated artifacts
- waiting cards for approvals, clarification, or authentication
Current local runtime behavior:
- the app boots a single-user local server with embedded static assets
- run state is stored in SQLite and created automatically on startup
- the default shipped executor starts
codex app-serverand runs each phase through a real Codex turn - the product does not call
agent-browseritself; Codex chooses and invokes available tools during the turn, and the app maps resulting tool, command, and browser-like events back into persisted evidence - runs move through
queued,planning,generating,evaluating,waiting, and terminal states while persisting attempts, events, evidence, tool calls, browser steps, evaluations, and artifacts - app-server approval or user-input requests are converted into product-level
waitingstates until the operator resumes the run with approval or missing context
Local state locations:
- SQLite database:
data/assistant.dbby default - generated artifacts directory:
data/artifactsby default
Useful local verification commands:
GOCACHE=/tmp/cva-go-build go test ./cmd/assistantd ./internal/... ./web
node --check web/static/app.jsPOST /api/v1/runsGET /api/v1/runs/:idGET /api/v1/runs/:id/eventsPOST /api/v1/runs/:id/inputPOST /api/v1/runs/:id/resumePOST /api/v1/runs/:id/cancel
- Go 1.26+
codexCLI installed and authenticated; the default runtime shells out tocodex app-serversqlite3available on the local machine; the current repository layer uses the system SQLite CLI for local persistence in this sandboxed environmentffmpegavailable on the local machine; browser-session report videos are generated only whenffmpegis present onPATH- Node.js is optional, but useful for checking the browser script during local development