Topwater.Agents 0.1.0-preview.9

This is a prerelease version of Topwater.Agents.
dotnet add package Topwater.Agents --version 0.1.0-preview.9
                    
NuGet\Install-Package Topwater.Agents -Version 0.1.0-preview.9
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Topwater.Agents" Version="0.1.0-preview.9" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Topwater.Agents" Version="0.1.0-preview.9" />
                    
Directory.Packages.props
<PackageReference Include="Topwater.Agents" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Topwater.Agents --version 0.1.0-preview.9
                    
#r "nuget: Topwater.Agents, 0.1.0-preview.9"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Topwater.Agents@0.1.0-preview.9
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Topwater.Agents&version=0.1.0-preview.9&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Topwater.Agents&version=0.1.0-preview.9&prerelease
                    
Install as a Cake Tool

Topwater.Agents

Run Microsoft Agent Framework's shell tool and file tools in a Topwater shell: an interpreter in your process with its own file system, so no command the model writes starts a process or touches a file on the host. Experimental (TW003) and pinned to exact framework versions (Microsoft.Agents.AI.Tools.Shell 1.28.0-preview.261106.1, Microsoft.Agents.AI 1.28.0).

dotnet add package Topwater.Agents --prerelease
using Microsoft.Agents.AI;
using Topwater;
using Topwater.Agents;

var shell = new Shell();
await using var executor = new TopwaterShellExecutor(shell);

// the framework's shell tool: named run_shell, result in the framework's format (stdout, "stderr: ...", "exit_code: N")
AIAgent agent = chatClient.AsAIAgent(
    instructions: "You are a helpful assistant.",
    tools: [executor.AsAIFunction(requireApproval: false)]);
Console.WriteLine(await agent.RunAsync("How many lines are in notes.txt?"));
  • TopwaterShellExecutor is a ShellExecutor. The shell is persistent (directory, variables and files carry over). A command that hits one of the shell's limits comes back as a result: a timeout is exit code 124 with TimedOut set, and the note naming the limit ends Stderr. Output past 30,000 characters is cut and Truncated is set.
  • requireApproval defaults to true, as in the framework. Nothing a command does reaches the host, so you can turn it off; leave it on if you want a person to see each command anyway (it works with UseToolApproval()).
  • TopwaterFileStore is an AgentFileStore over one directory of the shell (by default the user's home), for FileAccessProvider and FileMemoryProvider. It runs as the shell's user, within the shell's disk limit, and refuses paths that leave its root or enter a mounted folder.
  • TopwaterMountChanges lets the model ask for a staged mount's changes to be applied, through the framework's tool approval: changes.AsAIFunction() is apply_mount_changes, and await changes.ReviewAsync(request) gives you the changes and a bounded summary to show your user. Approval applies exactly the reviewed changes, or nothing if they changed since; rejection leaves them pending.
  • Calls through every executor, file store and TopwaterMountChanges over the same shell run one at a time, together with the shell's AsAIFunction() and BashTool.ExecuteAsync.

If you use ShellEnvironmentProvider, set OverrideFamily = ShellFamily.Posix and your own InstructionsFormatter: its default text names the host's operating system, not the shell's.

For a plain bash tool with Topwater's own result format, shell.AsAIFunction() from Topwater.AI works in Agent Framework too. See docs/integrations.md.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0-preview.9 0 11/30/2026
0.1.0-preview.8 52 11/29/2026
0.1.0-preview.7 73 11/28/2026