Skip to main content

Windows Rollout

Status: Ready

Truth label: Current

Audience: Fleet operator

Reader outcome: Roll the stack out on Windows from prerequisites to a supervised, LAN-exposed fleet with distributed workers.

Last verified: 2026-09-13

Stand up the full AGENTASIAN stack on a Windows 10/11 box so it hosts everything, and any browser on the LAN becomes a client. The client interface already exists: Cortex UI derives its backend URLs from the page hostname, so a machine browsing to http://<windows-box-ip>:3000 gets a fully working dashboard with no rebuild and no per-client setup.

Target layout:

Runs on the Windows boxPortReachable from LAN clients
Forge API (task queue)8080Yes, required (the UI's JS calls it directly from the client's browser)
Brain API (chat + knowledge)8081Yes, required (same reason)
Cortex UI (static files)3000Yes, this is the client interface
Worker (claude-code engine)noneNo inbound; it polls Forge over localhost
Ollama (chat model)11434No, Brain reaches it over localhost

All three HTTP ports must be open to clients, not just 3000. The UI is a static page whose JavaScript calls Forge and Brain straight from the viewing browser.


Phase 0: Prerequisites (one-time installs)​

  • Python 3.11+ from python.org. Check "Add python.exe to PATH" during install. Verify: python --version
  • Git for Windows from git-scm.com. Needed to clone the repo, and the worker's changed-file detection shells out to git status in each project directory. Verify: git --version
  • Ollama for Windows from ollama.com (runs in the system tray). Then:
    ollama pull qwen3-coder
    ollama pull nomic-embed-text
    Skip this if Ollama already runs on another machine you intend to keep using; you will point OLLAMA_BASE_URL at it instead.
  • Claude Code CLI (the default execution engine). PowerShell:
    irm https://claude.ai/install.ps1 | iex
    Verify with claude --version, then run claude once interactively and complete the browser login. The worker inherits this login; no API key is ever needed for execution.
  • Codex CLI (optional second engine). PowerShell:
    powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"
    Verify with codex --version, then run codex once and sign in with a ChatGPT account. Skip if you only want Claude Code.

Prefer the native installers over npm shims. The worker launches these CLIs as subprocesses, and a real .exe on PATH avoids the Windows .cmd-shim argument-handling edge cases.

Phase 1: Get the code and configure​

  • Push any pending work from the dev machine first, then on the Windows box:
    git clone https://github.com/airwavetechio/agent_asian.git
    cd agent_asian
    git checkout feat/claude-code-executor
  • Create the venv and install:
    python -m venv .venv
    .venv\Scripts\activate
    pip install -e .
  • Configure:
    copy .env.example .env
    Then edit .env:
    LLM_PROVIDER=ollama
    LLM_MODEL=qwen3-coder
    OLLAMA_BASE_URL=http://localhost:11434
    OLLAMA_NUM_CTX=32768
    FORGE_WORKER_ENGINE=claude-code
    USER_NAME=Alex
    DATA_DIR=%USERPROFILE%\.agent_asian
    INFLUENCE_LIBRARY_DIR=%USERPROFILE%\Documents\agent_asian\influences
    VOICE_PACK_DIR=%USERPROFILE%\Documents\agent_asian\voice
    Use explicit Windows paths for DATA_DIR and KNOWLEDGE_DIR rather than ~. If Ollama stays on a different machine, set OLLAMA_BASE_URL to that machine's address; everything else is unchanged.
  • Copy your influence library and voice pack onto the box. The project ships neither, and nothing starts until both settings above point at real directories. Create them with agent influences init "%USERPROFILE%\Documents\agent_asian\influences" and agent voice-pack init "%USERPROFILE%\Documents\agent_asian\voice", then copy your own sources (.md, .txt, .pdf, .epub) into the influence directory. Keep both outside DATA_DIR, outside KNOWLEDGE_DIR, and out of any folder whose name begins with a dot; ingestion skips dot-prefixed paths entirely, which is why these do not live under .agent_asian.
  • Leave OPENAI_API_KEY and ANTHROPIC_API_KEY blank. The claude-code and codex engines authenticate through their own CLI logins. Keeping keys out of the environment also means Forge's unauthenticated /config/llm endpoint has no secrets to serve once the box is on the LAN. This is the single most important security decision in this rollout.

Phase 2: First launch and smoke test (still localhost)​

  • Check the configuration first: python -m brain.preflight. It must print OK before run-all.bat. Anything else is a named error block giving the setting, the configured and resolved spellings, and one command that fixes it; run-all.bat runs the same check in the foreground and refuses to start the stack until it passes.
  • Start everything:
    run-all.bat
    run-worker.bat
    run-all.bat opens three windows (Forge, Brain, UI); run-worker.bat opens the worker. The worker banner must show Engine: claude-code and list claude-code, with its version, under installed backends. If it says the CLI is not on PATH, fix Phase 0 before continuing.
  • Health check: curl http://localhost:8080/health and curl http://localhost:8081/health both return ok. (curl.exe ships with Windows 10+.)
  • Open http://localhost:3000. In the Projects tab create a project with a real Windows path (the form's create-folder option can make the directory). In the Tasks tab file a small task against it, for example "Create hello.py that prints Hello, Airwave!".
  • Watch the task row: pending, in progress, completed, refreshing live every 5 seconds. Confirm the file exists in the project directory. This proves the entire chain on the new box: UI to Forge to worker to the Claude Code CLI to code on disk.
  • Optional: test chat dispatch. Send "add a subtract function to <project name>" in the Chat tab and confirm exactly one task appears under Overview. Judge the outcome by the Tasks tab, not by the chat reply's wording; the local model's narration is known to misreport its own successful dispatches.

Phase 3: Open it to the LAN (the client interface)​

  • Give the box a stable address: a DHCP reservation for it in your router, or a static IP. Clients will bookmark this address.
  • Open the three ports to the private network only (admin PowerShell):
    netsh advfirewall firewall add rule name="AGENTASIAN UI" dir=in action=allow protocol=TCP localport=3000 profile=private
    netsh advfirewall firewall add rule name="AGENTASIAN Forge" dir=in action=allow protocol=TCP localport=8080 profile=private
    netsh advfirewall firewall add rule name="AGENTASIAN Brain" dir=in action=allow protocol=TCP localport=8081 profile=private
    profile=private keeps the rules inactive on public networks. Do not port-forward any of these through the router; nothing here has authentication.
  • From another machine (the Mac, a laptop, a phone on the same Wi-Fi), browse to http://<windows-box-ip>:3000. The full dashboard should work: chat, project creation, task dispatch, live status. That is the client interface, done.
  • Note for clients: project paths are paths on the Windows box, since that is where the worker executes. The "Open folder" link on project rows only works when browsing from the box itself.

Phase 4: Make it stick​

  • Auto-start on logon: press Win+R, run shell:startup, and drop shortcuts to run-all.bat and run-worker.bat there. This is the simplest reliable option since the .bat files open interactive windows. (Task Scheduler works too but needs "run only when user is logged on" to keep the windows visible.)
  • Back up these directories occasionally: %USERPROFILE%\.se_manager (projects, tasks, workers, sessions) and your DATA_DIR (knowledge base, conversations, learnings).
  • Unattended mode decision: by default the agent runs sandboxed (acceptEdits), which cannot run shell commands or tests. Once you trust the box and its project directories, set FORGE_WORKER_DANGEROUS=true in .env and restart the worker so agents can run tests and self-verify. This is the intended end state for a dedicated box; just understand it removes the sandbox.

Phase 5: Distributed workers​

Any LAN machine can run additional workers. Workers are outbound-only pollers, so no new firewall rules are needed anywhere, on the box or on the worker machines.

On each additional machine (the Mac, another PC):

  • Install Python 3.11+, Git, and the Claude Code CLI; run claude once to log in. CLI logins are per-machine.
  • Clone the repo and install, same as Phase 1 (git clone, checkout the branch, venv, pip install -e .). No .env needed; the flags below carry the config.
  • Start the worker pointed at the box:
    python -m forge.worker --central-url http://<windows-box-ip>:8080 --brain-url http://<windows-box-ip>:8081 --engine claude-code
  • Confirm it appears in the Cortex UI sidebar's worker roster. Workers register by hostname; restarting the same machine's worker updates its entry in place rather than duplicating it.

How work is routed across workers today, stated plainly:

  • A task executes in its project's path on whichever worker claims it first. Paths are machine-local, so a task whose project lives at C:\Users\... fails if the Mac worker claims it, and vice versa.
  • The supported routing mechanism is the task form's worker dropdown (assigned_worker_id): a pinned task is only ever handed to that worker. Forge's /tasks/next returns a task to a worker only if it is unassigned or assigned to that specific worker.
  • Capability tags are recorded at registration but not enforced for routing, and there is no automatic path mapping between machines; both are tracked in the task ledger. Until those land: pin every task to the worker whose machine holds the project, or register a machine-specific copy of the project (same repo cloned on each machine) as a separate project per machine.
  • Engine choice is per-worker (--engine), so a mixed fleet works fine: a claude-code worker on the box, a codex worker on the Mac, each claiming only what is pinned to it.
  • One worker process per machine: registration is keyed by hostname, so a second worker on the same box overwrites the first. Tracked in the task ledger.

Fleet option, centralized inference: a worker on any machine can run --engine codex-oss, which drives the codex agent harness against the box's Ollama instead of any cloud, at zero marginal cost. In that worker's environment set CODEX_OSS_BASE_URL=http://<windows-box-ip>:11434/v1 (the /v1 suffix is required; the bare port 404s). On the box, make Ollama listen beyond localhost by setting the OLLAMA_HOST=0.0.0.0 environment variable for the Ollama service, and open the port to the private profile:

netsh advfirewall firewall add rule name="AGENTASIAN Ollama" dir=in action=allow protocol=TCP localport=11434 profile=private

Verified end to end: a codex-oss run from the Mac against the box's gpt-oss:20b completed with the same event stream the cloud engines produce.


Security boundaries, stated plainly​

  • This stack is LAN-only by design. No route has authentication and CORS is wide open. The firewall rules above scope exposure to the private network profile; never expose 8080/8081/3000 to the internet.
  • Forge's /config/llm and Brain's /config/api-keys return whatever keys are in the environment, in plaintext, to any caller. With blank keys in .env (the Phase 1 instruction) these endpoints serve nothing useful. If you ever add a cloud key for the chat model, you widen what any LAN device can read.
  • FORGE_WORKER_DANGEROUS=true means an autonomous agent can run arbitrary shell commands in project directories on this box. Turn it on deliberately, not by default.

Windows-specific troubleshooting​

SymptomFix
Worker banner: engine's CLI "not on PATH"Reopen the terminal after installing (PATH changes need a fresh shell), or reinstall the CLI natively rather than via npm
A task fails on this box and passes on anotherCompare CLI versions. The worker banner prints them at startup and Cortex shows them in the fleet panel; python scripts/upgrade-clis.py upgrades this box, then restart the worker so it re-reports
claude works in a terminal but tasks failThe worker inherits the environment of the window that launched run-worker.bat; launch it from a fresh shell after the CLI install and login
Clients see the UI but chat/tasks fail to loadPorts 8080/8081 are not open to the LAN; the browser calls them directly. Re-check the firewall rules and that the client is on the private network
Task completes but files_changed is emptyThe project directory is not a git repository; change detection uses git status. Run git init in the project, or ignore the field
Ollama chat errors after rebootThe Ollama tray app did not start; launch it or enable its autostart
Smart quotes or path escapes mangled in task descriptionsPrefer the UI's task form over hand-written curl in cmd.exe; cmd's JSON escaping is hostile

Rollback​

Everything is additive. To stop hosting: close the four windows (or remove the startup shortcuts) and delete the three firewall rules:

netsh advfirewall firewall delete rule name="AGENTASIAN UI"
netsh advfirewall firewall delete rule name="AGENTASIAN Forge"
netsh advfirewall firewall delete rule name="AGENTASIAN Brain"

State lives only in %USERPROFILE%\.se_manager and DATA_DIR; deleting those resets the system.