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
<PackageReference Include="Agentics.Extensions.Aspire.AgentTunnel" Version="0.8.0" />
<PackageVersion Include="Agentics.Extensions.Aspire.AgentTunnel" Version="0.8.0" />
<PackageReference Include="Agentics.Extensions.Aspire.AgentTunnel" />
paket add Agentics.Extensions.Aspire.AgentTunnel --version 0.8.0
#r "nuget: Agentics.Extensions.Aspire.AgentTunnel, 0.8.0"
#:package Agentics.Extensions.Aspire.AgentTunnel@0.8.0
#addin nuget:?package=Agentics.Extensions.Aspire.AgentTunnel&version=0.8.0
#tool nuget:?package=Agentics.Extensions.Aspire.AgentTunnel&version=0.8.0
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(theAspire.*ID prefix is Microsoft-reserved); the API lives in theAspire.Hostingnamespace, so a drop-inusing 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:
PKS_AGENT_TUNNEL_BINenv var (absolute path).- A
tools/folder co-located with the package (NuGet pack ships the binary there). PATHlookup.
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_SERVERselects the control server.AGENT_TUNNEL_BINselects a prebuilt CLI binary.AGENT_TUNNEL_SOURCEbuilds the CLI from a local pks-agent-tunnel checkout and reusesbin/agent-tunnelwhen 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 | Versions 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. |
-
net10.0
- Aspire.Hosting (>= 13.4.6)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.