en-US/about_Install-TechAgentRuntime.help.txt
|
# about_Install-TechAgentRuntime ## SHORT DESCRIPTION Bootstraps the local .NET runtime/build used by Invoke-TechAgent and related AI/agent functions in TechToolbox. ## LONG DESCRIPTION Install-TechAgentRuntime restores and builds the C# TechToolbox.Agent project used by Invoke-TechAgent and other AI-capable tools within TechToolbox. ### What it does - Initializes the TechToolbox runtime via Initialize-TechToolboxRuntime. - Locates dotnet (uses -PythonPath if given for backward compatibility, otherwise falls back to dotnet on PATH). - Restores the TechToolbox.Agent project. - Builds the TechToolbox.Agent project in Release configuration. - Optionally pulls an Ollama model after installation when -PullModel is specified. - Returns a [PSCustomObject] summarising runtime details (dotnet version, executable, output path, etc.). ### Requirements - Windows with .NET 8 SDK/runtime available on PATH. - Ollama installed on PATH if -PullModel is used. - The agent project at <moduleRoot>\src\TechToolbox.Agent\TechToolbox.Agent.csproj must exist. ### Typical Usage Install the runtime without pulling a model: ```powershell Install-TechAgentRuntime ``` Build runtime and pull a specific model: ```powershell Install-TechAgentRuntime -UpgradePip -UpgradePackages -PullModel -Model "qwen3.6:35b" ``` Use an explicit dotnet executable path (via legacy parameter name): ```powershell Install-TechAgentRuntime -PythonPath "C:\Program Files\dotnet\dotnet.exe" ``` Legacy compatibility parameter (ignored for C# runtime): ```powershell Install-TechAgentRuntime -ForceRecreateVenv ``` ### Parameters - **PythonPath**: Specifies an explicit dotnet executable path to use. If omitted, the command searches PATH for dotnet. Parameter name retained for backward compatibility. - **ForceRecreateVenv**: Deprecated and ignored for the C# runtime. - **UpgradePip**: Deprecated and ignored for the C# runtime. - **UpgradePackages**: Deprecated and ignored for the C# runtime. - **PullModel**: When present, pulls an Ollama model after restore/build. - **Model**: Specifies the Ollama model name to pull. If omitted, defaults to the value of settings.agent.model from the TechToolbox configuration. ### Return Value Returns a [PSCustomObject] with these properties: - **ProjectPath**: Full path to TechToolbox.Agent.csproj. - **DotnetExecutable**: Path to the dotnet executable used. - **DotnetVersion**: Version string from dotnet --version. - **OutputPath**: Expected output DLL path in Release build output. - **ModelPulled**: Boolean indicating whether a model was pulled. - **Model**: The model name that was pulled (null if -PullModel not used). - **Success**: Always $true when the command completes without error. ### Notes - This function depends on Initialize-TechToolboxRuntime and must be able to locate the TechToolbox module root. - If dotnet is not found on PATH, an error is thrown suggesting installation or use of -PythonPath (legacy parameter name). - If the Ollama executable is not found when -PullModel is used, an error is thrown. - The command respects -WhatIf and -Confirm via SupportsShouldProcess for all mutating operations (project restore/build and model pulling). ## EXAMPLES ### Example 1: Default bootstrap ```powershell Install-TechAgentRuntime ``` Builds the C# runtime using dotnet and the configured default model (if any) from settings. ### Example 2: Full upgrade with model pull ```powershell Install-TechAgentRuntime -UpgradePip -UpgradePackages -PullModel -Model "qwen3.6:35b" ``` Runs restore/build for the C# runtime and pulls the specified Ollama model. ## SEE ALSO - Invoke-TechAgent - Initialize-TechToolboxRuntime - Get-TechToolboxConfig ## KEYWORDS Install-TechAgentRuntime, TechAgent, dotnet, Ollama, bootstrap, agent runtime |