Agentics.Extensions.Aspire.AgentTunnel 0.8.0

dotnet add package Agentics.Extensions.Aspire.AgentTunnel --version 0.8.0
                    
NuGet\Install-Package Agentics.Extensions.Aspire.AgentTunnel -Version 0.8.0
                    
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="Agentics.Extensions.Aspire.AgentTunnel" Version="0.8.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Agentics.Extensions.Aspire.AgentTunnel" Version="0.8.0" />
                    
Directory.Packages.props
<PackageReference Include="Agentics.Extensions.Aspire.AgentTunnel" />
                    
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 Agentics.Extensions.Aspire.AgentTunnel --version 0.8.0
                    
#r "nuget: Agentics.Extensions.Aspire.AgentTunnel, 0.8.0"
                    
#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 Agentics.Extensions.Aspire.AgentTunnel@0.8.0
                    
#: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=Agentics.Extensions.Aspire.AgentTunnel&version=0.8.0
                    
Install as a Cake Addin
#tool nuget:?package=Agentics.Extensions.Aspire.AgentTunnel&version=0.8.0
                    
Install as a Cake Tool

Aspire.Hosting.AgentTunnel

Aspire hosting integration for pks-agent-tunnel. A drop-in replacement for Aspire.Hosting.DevTunnels — same public surface, no Azure dependency, predictable URLs.

Install

dotnet add package Agentics.Extensions.Aspire.AgentTunnel

Published as Agentics.Extensions.Aspire.AgentTunnel (the Aspire.* ID prefix is Microsoft-reserved); the API lives in the Aspire.Hosting namespace, so a drop-in using Aspire.Hosting; keeps working unchanged.

Drop-in

- using Aspire.Hosting.DevTunnels;
+ using Aspire.Hosting.AgentTunnel;

  var tunnel = builder.AddDevTunnel("agentic-tunnel")
      .WithReference(wsRelay)
      .WithReference(pluginMarketplace)
      .WithAnonymousAccess();

  nextjs.WithEnvironment("WS_RELAY_PUBLIC_URL", tunnel.GetEndpoint(wsRelay, "http"));

The type DevTunnelResource is preserved (as an alias for AgentTunnelResource) so code that names the type by hand keeps compiling.

Workaround helpers from the original — WithDevTunnelCleanup(), WithTunnelHealing(...) — are not exposed: pks-agent-tunnel has no Azure split-brain to defend against.

Configuration

The extension spawns the agent-tunnel host CLI as a child process and parses its TUNNEL_READY stdout line. Locate the binary via:

  1. PKS_AGENT_TUNNEL_BIN env var (absolute path).
  2. A tools/ folder co-located with the package (NuGet pack ships the binary there).
  3. PATH lookup.

Set AgentTunnelResource.ServerUrl to point at the right server:

var tunnel = builder.AddAgentTunnel("agentic-tunnel");
tunnel.Resource.ServerUrl = "wss://tunnels.agentics.dk:7443";

The package also reads standard AppHost configuration:

  • AGENT_TUNNEL_SERVER selects the control server.
  • AGENT_TUNNEL_BIN selects a prebuilt CLI binary.
  • AGENT_TUNNEL_SOURCE builds the CLI from a local pks-agent-tunnel checkout and reuses bin/agent-tunnel when Go is unavailable.

The equivalent explicit source API is builder.AddAgentTunnel("agentic-tunnel").WithLocalSource("../pks-agent-tunnel").

Server

Run the pks-agent-tunnel-server — locally or as a Docker image at registry.kjeldager.io/agent-tunnel-server:latest.

Status

v0.1 — single-tunnel, HTTP slots only, anonymous-only access. TCP slots and token auth ship in v0.3.

Product Compatible and additional computed target framework versions.
.NET 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.8.0 179 8/4/2026
0.7.0 125 7/24/2026