How anushka2503769/ctrl-alt-codejam-2026 works
Purpose and entry points
Volc Agent Launchpad is a single-user proof-of-concept platform for creating agents, giving each a persistent workspace, and executing multi-turn Codex CLI tasks backed by Volcengine Ark’s Responses API. The server starts from apps/server/src/index.ts; its Fastify application is assembled in apps/server/src/app.ts. The browser client starts at apps/web/src/main.tsx and renders apps/web/src/App.tsx.
Web control surface
The React/Vite frontend implements agent lifecycle management and the chat Playground. It calls the server through a small API boundary in apps/web/src/api.ts, using shared UI-domain shapes in apps/web/src/types.ts. The web app is a control client; execution and persistence remain server-side.
HTTP control plane
Fastify routes in apps/server/src/app.ts expose agent CRUD, lifecycle controls, and asynchronous turn/run state. apps/server/src/agent-service.ts owns application-level orchestration: it validates lifecycle transitions, retrieves agent state, starts work, and coordinates persistence and runtime invocation. Error translation is centralized in apps/server/src/errors.ts.
Durable agent state and workspaces
apps/server/src/store.ts persists agent metadata, conversations/run state, and Codex session/thread identifiers in JSON-backed local storage. apps/server/src/workspace.ts creates and resolves per-agent filesystem workspaces; deleted agents are archived rather than immediately destroyed. This separates durable user/task context from disposable turn execution environments.
Runtime abstraction and Codex execution
apps/server/src/runner-factory.ts selects the configured execution provider. apps/server/src/codex-runner.ts executes Codex CLI directly in the application runtime, suitable for ECS/container deployment. apps/server/src/container-codex-runner.ts instead creates a disposable Docker-, Colima-, or Podman-backed container for each local turn while mounting persistent workspace/session state. First turns create a Codex session; subsequent turns resume its stored thread.
External model boundary and configuration
Codex is configured to call the OpenAI-compatible Volcengine Ark Responses API using ARK_API_KEY, ARK_MODEL, and optional base URL settings. Server configuration, paths, runtime provider, sandbox mode, timeouts, and resource settings are collected in apps/server/src/config.ts. The core runtime images are defined by Dockerfile and Dockerfile.runtime; the latter packages Codex for isolated local execution.
Deployment and operational topology
docker-compose.yml runs the web/API application with persistent mounted state and environment-provided Ark credentials. For cloud deployment, deploy/volcengine/main.tf provisions Volcengine infrastructure, with bootstrap configuration in deploy/volcengine/cloud-init.yaml.tftpl. The deployed ECS profile runs Codex in the application container, while local POC mode favors per-turn runtime containers. The platform intentionally lacks identity, audit, tracing, and hardened sandbox middleware.
Main entry points: app.ts HTTP routes · agent-service.ts Agent orchestration · runner-factory.ts Runner selection · container-codex-runner.ts Isolated Codex runner
Components 20
Web client
- Web entry
apps/web/src/main.tsx - Agent control UI · Agent lifecycle management and chat Playground.
apps/web/src/App.tsx - Server API client
apps/web/src/api.ts - UI domain types
apps/web/src/types.ts
API control plane
- Server entry
apps/server/src/index.ts - HTTP routes · Exposes agent CRUD, lifecycle, and asynchronous turn state.
apps/server/src/app.ts - Agent orchestration · Validates transitions and coordinates state with execution.
apps/server/src/agent-service.ts - Durable agent state · Stores agents, conversations, runs, and Codex session identifiers.
apps/server/src/store.ts - Agent workspaces · Creates persistent workspaces and archives deleted agents.
apps/server/src/workspace.ts - Error translation
apps/server/src/errors.ts - Runtime configuration · Collects provider, sandbox, paths, resources, timeouts, and Ark settings.
apps/server/src/config.ts
Execution runtime
- Runner selection
apps/server/src/runner-factory.ts - Direct Codex runner · Runs Codex CLI in the application container for ECS deployment.
apps/server/src/codex-runner.ts - Isolated Codex runner · Launches a disposable Docker, Colima, or Podman container per local turn.
apps/server/src/container-codex-runner.ts - Codex CLI · Creates or resumes sessions using persisted thread state.
- Volcengine Ark Responses API · OpenAI-compatible API configured by ARK credentials and model settings.
Deployment
- Compose deployment · Runs web/API with mounted persistent state and Ark environment credentials.
docker-compose.yml - Isolated runtime image · Packages Codex for local isolated execution.
Dockerfile.runtime - Volcengine ECS infrastructure · Provisions cloud infrastructure for direct application-container execution.
deploy/volcengine/main.tf - ECS bootstrap
deploy/volcengine/cloud-init.yaml.tftpl
Connections 22
- Web entry → Agent control UI: renders
- Agent control UI → Server API client: uses
- Agent control UI → UI domain types: uses
- Server API client → HTTP routes: HTTP control requests
- Server entry → HTTP routes: starts
- HTTP routes → Agent orchestration: dispatches
- HTTP routes → Error translation: translates failures
- Agent orchestration → Durable agent state: reads and persists
- Agent orchestration → Agent workspaces: manages
- Agent orchestration → Runner selection: starts turns through
- Runtime configuration → Runner selection: selects provider
- Runner selection → Direct Codex runner: ECS mode
- Runner selection → Isolated Codex runner: local isolated mode
- Direct Codex runner → Codex CLI: executes
- Isolated Codex runner → Codex CLI: executes in container
- Agent workspaces → Isolated Codex runner: mounts persistent workspace
- Durable agent state → Codex CLI: supplies session/thread
- Codex CLI → Volcengine Ark Responses API: Responses API calls
- Compose deployment → HTTP routes: runs
- Isolated runtime image → Isolated Codex runner: provides image
- Volcengine ECS infrastructure → ECS bootstrap: bootstraps with
- Volcengine ECS infrastructure → Direct Codex runner: deploys