# Mix of Agents installation and runtime modes

## PowerShell baseline

Windows PowerShell 5.1 is the baseline runtime. Python is optional.

- `Start AgentOS.bat`: primary PowerShell console
- `Start AgentOSX.bat`: alternate PowerShell console
- `Start AgentOSH.bat`: browser chat interface
- `Start AgentOSP.bat`: optional Python console

## Installer

`Install Mix of Agents.bat` launches `Scripts\Install-Mix-of-Agents.ps1` for the current process. The installer:

- creates local workspace folders;
- records the operator-provided endpoint and model;
- stores an optional API key in `Config\Keys\<provider>.key.txt` and restricts the file ACL to the current Windows identity;
- detects or bootstraps the bundled Python runtime when available;
- continues in PowerShell-only mode if Python cannot run.

For scripted setup:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File ".\Scripts\Install-Mix-of-Agents.ps1" `
  -ProviderName "my-provider" `
  -Endpoint "https://provider.example/v1/chat/completions" `
  -Model "your-model-id" `
  -ApiKey "your-key" `
  -NonInteractive `
  -SkipPythonBootstrap
```

Use `-NoApiKey` for a local endpoint that does not require authorization. Avoid placing real keys in reusable shell history or scripts; interactive setup is preferable.

## Optional Python runtime

Detection order:

1. `Tools\Python\python.exe`
2. Windows Python launcher: `py.exe -3`
3. `python.exe` on `PATH`
4. bundled `Installers\Python\*.zip`, extracted into `Tools\Python`

## Constrained Language Mode

The PowerShell installer and OS/OSX prompt path avoid the known non-core type creation and SessionState path-method failures fixed in v0.3.1. Enterprise policy can still deny network requests, process launch, or writes outside allowed locations.

## Distribution hygiene

Public packages must not contain real key files, OAuth state, chat history, logs, outputs, test state, personal profiles, private endpoints, or machine-specific paths.
