# AgentXPro installer for Windows (PowerShell 5.1+ / 7+). # # irm https://agentxpro-site.vercel.app/install.ps1 | iex # # With a model endpoint: # $env:AGENTXPRO_BASE_URL = "https://your-endpoint/v1"; irm https://agentxpro-site.vercel.app/install.ps1 | iex # # Installs, all under %USERPROFILE%\.agentxpro (no admin rights needed): # runtime\node a private Node.js 22.19.0 (checksum-verified) # runtime the agent runtime (@deepseek-ai/dsh@0.1.1-rc.2) from npm # profiles\... the AgentXPro client (checksum-verified) # plus a launcher at %USERPROFILE%\.agentxpro\bin\agentxpro.cmd, added to your user PATH. # Everything runs in a child scope so `irm | iex` leaves no variables or # preference changes behind in the user's session, and errors `throw` rather # than `exit` (which would close the user's PowerShell window under iex). & { $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' # Invoke-WebRequest is very slow with the progress bar on 5.1 [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 $Version = '0.1.2' $BundleSha256 = '60d2abc4abebdde00c76f25861ae87fdeb81453d28abd97a6d847f0e65a358db' $NodeVersion = '22.19.0' $DshVersion = '0.1.1-rc.2' $Base = if ($env:AGENTXPRO_DOWNLOAD_BASE) { $env:AGENTXPRO_DOWNLOAD_BASE } else { 'https://agentxpro-site.vercel.app/downloads' } $AxpHome = Join-Path $env:USERPROFILE '.agentxpro' $Runtime = Join-Path $AxpHome 'runtime' function Say($m) { Write-Host "==> $m" } function Fail($m) { throw "AgentXPro install failed: $m" } function Sha256($p) { (Get-FileHash -Algorithm SHA256 -Path $p).Hash.ToLower() } # 32-bit PowerShell on 64-bit Windows reports x86 here; the real CPU is in *W6432. $cpu = if ($env:PROCESSOR_ARCHITEW6432) { $env:PROCESSOR_ARCHITEW6432 } else { $env:PROCESSOR_ARCHITECTURE } $arch = switch ($cpu) { 'ARM64' { 'arm64' } 'AMD64' { 'x64' } default { Fail "unsupported CPU $cpu" } } $tmp = Join-Path ([IO.Path]::GetTempPath()) ("agentxpro-" + [Guid]::NewGuid().ToString('N')) New-Item -ItemType Directory -Path $tmp | Out-Null try { # 1. private Node.js --------------------------------------------------------- $nodeDir = Join-Path $Runtime 'node' $node = Join-Path $nodeDir 'node.exe' if ((Test-Path $node) -and ((& $node -v) -eq "v$NodeVersion")) { Say "Node.js v$NodeVersion already present" } else { $dist = "node-v$NodeVersion-win-$arch" Say "downloading Node.js v$NodeVersion (win-$arch)" Invoke-WebRequest -UseBasicParsing "https://nodejs.org/dist/v$NodeVersion/$dist.zip" -OutFile "$tmp\node.zip" $sums = (Invoke-WebRequest -UseBasicParsing "https://nodejs.org/dist/v$NodeVersion/SHASUMS256.txt").Content $want = ($sums -split "`n" | Where-Object { $_ -match " $([regex]::Escape("$dist.zip"))$" }) -replace ' .*', '' if (-not $want -or (Sha256 "$tmp\node.zip") -ne $want.Trim()) { Fail 'Node.js checksum mismatch' } if (Test-Path $nodeDir) { Remove-Item -Recurse -Force $nodeDir } Expand-Archive -Path "$tmp\node.zip" -DestinationPath $tmp -Force New-Item -ItemType Directory -Force -Path $Runtime | Out-Null Move-Item (Join-Path $tmp $dist) $nodeDir } $npm = Join-Path $nodeDir 'npm.cmd' # 2. AgentXPro bundle -------------------------------------------------------- Say "downloading AgentXPro $Version" Invoke-WebRequest -UseBasicParsing "$Base/agentxpro-$Version.tgz" -OutFile "$tmp\axp.tgz" if ((Sha256 "$tmp\axp.tgz") -ne $BundleSha256) { Fail 'AgentXPro bundle checksum mismatch' } New-Item -ItemType Directory -Path "$tmp\axp" | Out-Null tar.exe -xzf "$tmp\axp.tgz" -C "$tmp\axp" # bundled with Windows 10 1803+ / 11 if ($LASTEXITCODE -ne 0) { Fail 'could not extract the AgentXPro bundle' } # 3. agent runtime — exact tested tree from the bundle's lockfile ------------ Say "installing agent runtime $DshVersion" $env:Path = "$nodeDir;$env:Path" New-Item -ItemType Directory -Force -Path $Runtime | Out-Null Copy-Item "$tmp\axp\runtime\package.json", "$tmp\axp\runtime\package-lock.json" $Runtime -Force Push-Location $Runtime try { & $npm ci --omit=dev --no-audit --no-fund --loglevel=error --update-notifier=false | Out-Null } finally { Pop-Location } if ($LASTEXITCODE -ne 0) { Fail 'agent runtime install failed' } # 4. install + launcher ------------------------------------------------------ $extra = @() if ($env:AGENTXPRO_BASE_URL) { $extra = @('--base-url', $env:AGENTXPRO_BASE_URL) } & $node "$tmp\axp\install.mjs" --runtime $Runtime --node $node @extra if ($LASTEXITCODE -ne 0) { Fail 'install step failed' } Write-Host "Open a new terminal (Windows Terminal recommended) and run: agentxpro" } finally { Remove-Item -Recurse -Force $tmp -ErrorAction SilentlyContinue } }