Topwater.Agents
0.1.0-preview.9
dotnet add package Topwater.Agents --version 0.1.0-preview.9
NuGet\Install-Package Topwater.Agents -Version 0.1.0-preview.9
<PackageReference Include="Topwater.Agents" Version="0.1.0-preview.9" />
<PackageVersion Include="Topwater.Agents" Version="0.1.0-preview.9" />
<PackageReference Include="Topwater.Agents" />
paket add Topwater.Agents --version 0.1.0-preview.9
#r "nuget: Topwater.Agents, 0.1.0-preview.9"
#:package Topwater.Agents@0.1.0-preview.9
#addin nuget:?package=Topwater.Agents&version=0.1.0-preview.9&prerelease
#tool nuget:?package=Topwater.Agents&version=0.1.0-preview.9&prerelease
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?"));
TopwaterShellExecutoris aShellExecutor. 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 withTimedOutset, and the note naming the limit endsStderr. Output past 30,000 characters is cut andTruncatedis set.requireApprovaldefaults totrue, 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 withUseToolApproval()).TopwaterFileStoreis anAgentFileStoreover one directory of the shell (by default the user's home), forFileAccessProviderandFileMemoryProvider. 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.TopwaterMountChangeslets the model ask for a staged mount's changes to be applied, through the framework's tool approval:changes.AsAIFunction()isapply_mount_changes, andawait 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
TopwaterMountChangesover the same shell run one at a time, together with the shell'sAsAIFunction()andBashTool.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 | Versions 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. |
-
net10.0
- Microsoft.Agents.AI (= 1.28.0)
- Microsoft.Agents.AI.Tools.Shell (= 1.28.0-preview.261106.1)
- Microsoft.Extensions.AI (>= 11.0.1)
- Topwater (>= 0.1.0-preview.9)
-
net8.0
- Microsoft.Agents.AI (= 1.28.0)
- Microsoft.Agents.AI.Tools.Shell (= 1.28.0-preview.261106.1)
- Microsoft.Extensions.AI (>= 11.0.1)
- Topwater (>= 0.1.0-preview.9)
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 |